checking-member-access
Explains what a member or a role can do in a PostHog project, using the access control MCP tools. Use when the user asks what someone can see or edit, who can…
Runs and reasons about the automated AI health check that suggests path-cleaning rules for web-analytics teams. Use when asked to generate path-cleaning suggestions for a team or cohort, to run the suggestion check, to review/apply AI-suggested rules, to inspect
$ npx -y skills add posthog/posthog --skill suggesting-path-cleaning-rules --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/suggesting-path-cleaning-rulesContext preview
The summary Claude sees to decide when to auto-load this skill.
Runs and reasons about the automated AI health check that suggests path-cleaning rules for web-analytics teams. Use when asked to generate path-cleaning suggestions for a team or cohort, to run the suggestion check, to review/apply AI-suggested rules, to inspect
name: suggesting-path-cleaning-rules description: 'Runs and reasons about the automated AI health check that suggests path-cleaning rules for web-analytics teams. Use when asked to generate path-cleaning suggestions for a team or cohort, to run the suggestion check, to review/apply AI-suggested rules, to inspect path_cleaning_suggestions health issues, or to extend the suggestion pipeline. Covers the suggest_path_cleaning_rules management command, the path_cleaning_suggestions health check, the cohort gating (precompute teams), and how suggestions are validated against real paths before storage. For hand-authoring or applying rules directly, use managing-path-cleaning-rules instead.'
Many teams never configure path cleaning, so their Web analytics breakdowns fragment across thousands of near-identical URLs. This feature **proactively suggests** cleaning rules for the web-analytics precompute cohort: weekly, for each team, it samples real paths, asks the LLM for `{regex, alias}` rules, validates them against the team's own paths, and stores them for review.
It **only suggests** — it never auto-applies. Applying rewrites historical numbers in every cleaned chart, so that stays a human decision (the existing settings UI, or the `--apply` flag below after review). To hand-author or directly apply rules, use the `managing-path-cleaning-rules` skill.
(`get_llm_client(product="web_analytics", team_id=...)`, model `WEB_ANALYTICS_PATH_CLEANING_SUGGESTIONS_MODEL`, default `claude-haiku-4-5`).
`replaceRegexpAll` uses) and test-applies it to the sampled paths. Rules that don't compile or match nothing are dropped; survivors get a dense `order`, a `match_count`, and in-memory before/after `examples` (printed by the management command, never stored — health-issue payloads are readable with just `health_issue:read` and must not leak real paths). This is the skill's "test before saving" step, automated.
generation, no storage.
(dedupes by regex, continues `order`).
dedicated model. One active issue per team (`hash_keys=[]`); `payload` carries `rules`, `model`, `sampled_path_count`, `distinct_path_count`. Applying (or hand-configuring rules) resolves the issue on the next check run; dismissal is the health-issue `dismissed` flag.
(`products/web_analytics/backend/temporal/health_checks/path_cleaning_suggestions.py`), a health check on the shared health-check framework, weekly (Mon 06:23 UTC), small sequential batches because each eligible team costs an LLM call. Teams with an existing active suggestion are re-emitted without a fresh LLM round trip.
enrollment list `WEB_ANALYTICS_LAZY_PRECOMPUTE_TEAM_IDS`.
`generate_suggestions_for_team` returns a status:
suggest for teams actively using web analytics. Bypass with `--ignore-visit-gate`.
adds no value, so we don't spend tokens.
are never stored, so they can't shadow an actionable suggestion).
latest `suggested` row as regex → alias previews with match counts; "Apply all" (project admins only) merges the rules, the close button dismisses. Driven by `pathCleaningSuggestionsLogic`.
same banner during Web analytics onboarding.
`POST /api/projects/:id/web_analytics_path_cleaning_suggestions/generate/` produces and stores a fresh suggestion on demand; `GET .../{issue_id}/preview/` applies the rules to a fresh sample of the team's top paths and returns before/after pairs (read scope, computed on demand, never stored — this backs the banner's "Preview on your paths" modal); `POST .../{issue_id}/apply/` merges the rules and resolves the issue (project admin only — the same gate the team API puts on `path_cleaning_filters`). Listing and dismissing go through the generic health-issues API (`GET /api/projects/:id/health_issues/?kind=path_cleaning_suggestions&status=active&dismissed=false`, `PATCH .../health_issues/{id}/` with `{"dismissed": true}`).
remediation guidance for humans and agents.
`products/web_analytics/mcp/tools.yaml` (`web-analytics-path-cleaning-suggestions-{generate,apply}`), so a user can ask Max to sugg
:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Repo: posthog/posthog
Explains what a member or a role can do in a PostHog project, using the access control MCP tools. Use when the user asks what someone can see or edit, who can…
Analyze the most expensive users in AI observability and explain why they cost so much. Use when the user asks about top spenders, expensive users, per-user…
Author continuously-running online evaluations in PostHog AI observability, grounded in real failure modes you've identified. Use when the user wants…
Find where an AI/LLM application is failing in production and surface the failure patterns, working from real traces. Use when someone wants to understand…
Investigate AI observability clusters — understand usage patterns in AI/LLM traffic, compare cluster behavior, compute cost/latency metrics, and drill into…
Investigate LLM spend in PostHog — total cost over time, cost by model, provider, user, trace, or custom dimension, token and cache-hit economics, and cost…