Omnibus
Skill 94 of 200
Diagnose why a product metric changed (dropped, spiked, or plateaued) by orchestrating breakdowns, actors, paths, lifecycle, retention, and annotations queries.
6 minutes · 1,392 words · 15 sections
Install
npx skills add PostHog/skills --skill investigate-metricnpx skills add PostHog/skills/plugin marketplace add PostHog/skillsThe first command installs just this skill, by the name in its SKILL.md; the second installs the whole repository.
For “why did X change?” questions about a saved insight, dashboard tile, or pasted query, and for “explain this chart” or “walk me through this” when the user names no change. Don’t load this skill for plain “what is X?” questions — only when there’s a chart or an observed change to explain.
Targets PostHog MCP v2. Typed query tools accept the query body directly — pass
kind, series, dateRange as top-level fields, do not wrap in InsightVizNode.
| Tool | Purpose |
|---|---|
posthog:query-trends | Trends (count over time) |
posthog:query-funnel | Funnels (multi-step conversion) |
posthog:query-retention | Retention (cohort return rates) |
posthog:query-stickiness | Stickiness (active days per user) |
posthog:query-lifecycle | Lifecycle (new/returning/resurrecting/dormant) |
posthog:query-paths | Paths (navigation flow) |
posthog:query-trends-actors | Users behind a trend bucket (trends source only) |
posthog:execute-sql | Existing SQL insights and custom analysis |
posthog:read-data-schema | Discover events, properties, sample values |
posthog:insight-get / -query | Fetch a saved insight’s metadata / data |
posthog:explain-chart | Walk the user through a trends chart (Step 5) |
Plus the standard PostHog tools the playbooks reference by name (feature-flag-get-all,
experiment-list, annotations-list, query-error-tracking-issues-list, query-logs,
query-session-recordings-list, cohorts-list/-create, annotation-create,
insight-create).
compare_to_prior_periods.py (opens in a new tab) — auto-detects
interval and compares recent values to the natural cycle (day-of-week, hour-of-week,
or sequential). Use to resolve step 2.2 cheaply.breakdown_attribution.py (opens in a new tab) — ranks breakdown
segments by absolute delta and flags offsetting moves.python3 scripts/compare_to_prior_periods.py < query_result.json
WINDOW=7 python3 scripts/breakdown_attribution.py < breakdown_result.jsonRead query.kind from the source the user pointed at:
short_id): posthog:insight-get → query.kind. Use
posthog:insight-query if you also need the numbers.kind directly.posthog:read-data-schema and run it as one series over time with
posthog:query-trends. That query is your TrendsQuery.
When query-trends cannot express the metric, such as a warehouse-only metric or a custom
SQL join, run it with posthog:execute-sql and treat it as a HogQLQuery.| kind | Playbook |
|---|---|
TrendsQuery | trend-playbook.md (opens in a new tab) |
FunnelsQuery | funnel-playbook.md (opens in a new tab) |
RetentionQuery | retention-playbook.md (opens in a new tab) |
StickinessQuery | stickiness-playbook.md (opens in a new tab) |
LifecycleQuery | lifecycle-playbook.md (opens in a new tab) |
PathsQuery | paths-playbook.md (opens in a new tab) |
HogQLQuery | route by what the SQL aggregates (see below) |
If kind === "TrendsQuery" and trendsFilter.display === "BoxPlot", use
box-plot-playbook.md (opens in a new tab) — distribution metric, no
breakdowns.
For HogQLQuery insights, classify by the SQL’s shape: count over time → trend
playbook, multi-step conversion → funnel playbook, cohort return → retention playbook.
Run the SQL through posthog:execute-sql to get the data, then follow the closest
playbook’s steps. See HogQL insights in shared-patterns.md.
If the user’s question spans multiple kinds, run the playbooks in sequence.
Decide this now, before the investigation, because it changes which queries you keep.
When the user gave you a saved insight or a query that is a TrendsQuery over time (not a box plot, 2D heatmap or scatter plot), or named a metric you ran as one, the investigation ends with a chart explanation from posthog:explain-chart.
posthog:explain-chart exists only where chart explanations are enabled, so check for it now and read its schema.
Where PostHog tools run through exec, it is not in your own tool list: run info explain-chart before you decide it is missing.
When it does not exist, the findings go in a written report.
The chart explanation is the answer, in place of a notebook or a long reply. Write a notebook as well only when the user asks for one.
For anything else, such as a metric that only SQL can express, the findings go in a written report.
When it is a chart explanation:
TrendsQuery with a breakdown or a property filter, and use SQL only for what an insight query cannot express.Run the primary tool. Record baseline, current, delta (absolute and %), and the start of the anomaly window.
When the user asked you to explain a trends chart over time and named no change, find what stands out first with what-stands-out.md (opens in a new tab). Each moment it finds becomes its own anomaly to run through the rest of the steps, most striking first. For funnels, retention, paths and other kinds, use that kind’s playbook to choose what to look into.
Widen to 3–4× the user’s interval (or use compareFilter: {"compare": true} on
TrendsQuery / StickinessQuery; for other kinds run two date ranges).
Pipe the widened result through
compare_to_prior_periods.py (opens in a new tab) — it flags
seasonality, partial right-edge buckets, and real anomalies. If the movement is
normal variance, report that and stop.
In rough order of signal:
posthog:feature-flag-get-all → flags with updated_at near the anomaly start.posthog:experiment-list → start_date / end_date near the start.posthog:annotations-list → date_marker near the start.git log for the window if the repo is reachable (highest signal when available).Any match is a hypothesis to confirm in the playbook (usually via breakdown on
$feature/<flag_key>, app_version, or utm_source).
Open the playbook for the kind from Step 1 and follow its numbered steps. Carry the record from 2.1 and any candidates from 2.3 into it.
Pick a segment the suspected cause should not have affected and rerun there. Stable in the control = strong hypothesis; moved too = expand the investigation. Skip when 2.2 already explained the movement.
Before you write your answer, call posthog:explain-chart when the investigation has a TrendsQuery over time.
Do this after a long investigation too, and when most of your evidence is SQL.
For anything else, use the written report.
It draws the chart with each moment highlighted and lets the user step through them. Map the investigation onto it:
start and end copied exactly from the
chart’s days. The app works out each chapter’s numbers from the chart, so leave them out
of summary.cause, confidence and confidence_reason.evidence, each finding with the query that produced it, the
insightShortId of a saved insight, or a url to a GitHub pull request or commit. No other links are accepted. The chart explanation runs each query and draws it: an insight
query with its insight chart, and a HogQLQuery from its rows. Shape the SQL for the chart,
with the x-axis column first, then optionally one text column to break down by, then the numbers.
Prefer a series over time to a before-and-after comparison, so the user sees when the change happened.dateRange around the change, at the interval that shows it best, from minute to day.
Filter it to the segment the cause points at, such as the affected browser or region.**double asterisks** so the chart explanation highlights it.
Do the same in each cause.Call posthog:explain-chart first. It reports any chapter whose dates match no point on the
chart, so fix those dates and call it again.
When its response says the user already sees the result, the chart explanation is on screen, and you are done.
Otherwise call posthog:render-ui with tool_name explain-chart and the same input as tool_input.
When render-ui does not exist, call posthog:explain-chart-save with the same arguments and give the user the link it returns, which opens the chart explanation in PostHog.
When the call fails because the tool does not exist, or neither render-ui nor a link is available, the user sees nothing, so write the written report instead.
Then reply briefly. Say which chapter to look at first, then add only what the chart explanation cannot hold, such as a caveat about the data, a linked fix or a decision that is still open. End with one offer from below. The chart explanation already holds the chart, the chapters, their causes and their evidence, so do not describe the chart or list the moments again.
Without the chart explanation, use the format below. Offer to save key charts via posthog:insight-create.
If a cause is found and no annotation marks it, offer posthog:annotation-create.
See common-causes.md (opens in a new tab) for the cause taxonomy.
# Investigation: <metric>
**Anomaly**: <baseline> → <current> (<delta>) starting <date>
## Likely cause
<one sentence>
**Confidence**: low | medium | high — <one-line reason>
**Evidence**
- <query result>
- <flag / experiment / annotation / commit if applicable>
## Possible causes (ruled out)
- <hypothesis>: <why>
## Affected segment
- <shared properties of affected users/events>
## Data gaps
- <checks skipped and why>
## Suggested follow-ups
- <concrete next action>
- <offer to save chart / create annotation>Confidence rule of thumb:
Link insights and dashboards inline: [Name](/insights/short_id).
Diagnose why a product metric changed (dropped, spiked, or plateaued) by orchestrating breakdowns, actors, paths, lifecycle, retention, and annotations queries. Use when the user reports an anomaly, asks "why did X change?", asks to explain or walk them through a chart, or needs root-cause analysis for a trend, funnel, retention, stickiness, or lifecycle metric.
The verbatim description from this skill’s front matter — the string an agent matches on to decide whether to load it.
main, last pushed 8 November 2026.SKILL.md, not by matching a directory convention. 2 distinct layouts observed: skills/omnibus/*/SKILL.md, skills/posthog/all/skills/*/SKILL.md.h1 and no skipped levels:.claude-plugin/marketplace.json by PostHog, declaring 6 plugins. It is read for editorial metadata only — never as the skill index, which is always the repository tree./PostHog/skills.md, and each skill at its own .md URL.12 files · 45 KB
Everything this skill ships beside its prose. All of it is set here, as subchapters of skill 94.
Documentation the agent loads on demand, rather than up front.
Executable code the skill can run.