Terminal
Terminal/Skill
Checks a Mixpanel metric for anomalies and baseline drift, then attributes the movement to segments to find the likely root cause.
By Mixpanel
Works with
npx skills add mixpanel/ai-plugins --skill monitor-metricsEngine required — resolve an engine per
ENGINE.md: one named in the conversation or loaded instructions is mandatory (not set up → offer/mixpanel:installfor it); otherwise use the Mixpanel MCP server, or offer/mixpanel:installif it's unavailable.
A focused diagnostic skill for a single metric at a time. Works for any project the user has access to. Requires a Mixpanel engine. Answers three questions cleanly:
metric-anomaly)metric-drift)metric-rca)Separation matters because the customer conversation is different for each: an anomaly is an incident, drift is a trend, and RCA is the segmentation story that makes either of the first two actionable.
metric-rca runs on top of an existing anomaly or drift diagnosis — it consumes the diagnosis payload, fans out across segmentation branches, and appends its findings to the diagnosis board. It does not perform detection itself.
This skill has three commands. Route to the right one based on the user's ask.
metric-anomalyDetect point-in-time anomalies — recent spikes, drops, and clusters in a single metric. Fits an additive seasonal baseline (median polish) and flags points by robust residual (MAD-based) against 7-day hourly and 30-day daily series. Produces flagged timestamps, classification (isolated / cluster / edge), and a verdict. Does not test for trend-level drift.
Trigger when the user wants to know whether a specific point looks weird — "is this spike real?", "did something happen yesterday?", "is this a blip?".
→ See commands/metric-anomaly.md
metric-driftDetect trend-level drift — whether the baseline has shifted. Runs mean-shift and variance-ratio tests on 60-day daily (last 30 vs prior 30) and 16-week weekly (last 8 vs prior 8) windows. Includes a lightweight outlier contamination check so it can run standalone without metric-anomaly first. Produces direction, magnitude, shape (step/slope/oscillating), and a verdict. Does not flag individual point anomalies.
Trigger when the user wants to know whether the trend has changed — "has this drifted?", "is the baseline different now?", "what's happened over the last month?".
→ See commands/metric-drift.md
metric-rcaRoot-cause attribution on top of an existing anomaly or drift diagnosis. Fans out across five branches — component decomposition, default-property breakdowns, distinct-id outliers, cohort comparison, and calendar/market context — over the same date windows the source command used. Ranks findings by concentration and deviation, renders charts for the important ones, and appends results to the diagnosis board.
Trigger when the user wants to know where the movement came from — "what's driving this drop?", "where is the spike concentrated?", "break this down", "run RCA", "is it a specific segment?". Requires a prior metric-anomaly or metric-drift run in the same session.
→ See commands/metric-rca.md
Route by matching the user's ask to the first branch that applies:
metric-anomaly first. It is cheaper (2 queries) and catches point-in-time issues that would otherwise contaminate a drift test.metric-drift directly.metric-anomaly first, then metric-drift. Drift picks up any anomaly context if present and downgrades confidence accordingly.metric-rca.metric-anomaly or metric-drift first (whichever fits their framing), then flow into metric-rca. Never run RCA cold — it needs the detection payload. These triggers route here on purpose: detection first, then RCA.metric_typeBefore either detection command fires queries, classify the metric into one of: count, unique_count, ratio, funnel, retention, unknown. Both metric-anomaly and metric-drift reference this single table — do not duplicate it into the command files.
| Detected | Classification |
|---|---|
Report type funnels | funnel |
Report type retention | retention |
Query template has A/B form or % of total (conversion rate, session rate, etc.) | ratio |
| Single-series count (event count, event count distinct users) | count |
| Single-series unique count | unique_count |
| Formula metric / custom SQL / anything else | unknown |
Store as metric_type on the metric series object. Used in every verdict card and in special-case routing (funnel, retention).
Both commands produce a structured verdict, not a data dump. The commands define their own output formats; common principles:
metric-drift"; "this does not flag individual anomalies — run metric-anomaly").Never output a wall of tables or raw query results. The CSA is the audience, and the goal is a verdict they can act on.
The shared setup and board-handoff steps live in references/execution.md:
Steps 0, 1, and 1.5 run for metric-anomaly and metric-drift before any detection query. metric-rca does not re-run them — it consumes the diagnosis payload. Read references/execution.md before running a command.
weekly-pulse.gtm-customer-intelligence.manage-lexicon.analyze-report. That skill is the lean read of what's there and deliberately doesn't chase causes. This skill is for statistical detection (anomaly / drift) plus RCA. On a bare "what's happening with this report?", start with analyze-report and hand off here when the user wants the why.metric-anomaly or metric-drift first, then metric-rca. RCA does not run cold.This skill is deliberately narrow: one metric, one diagnosis, one attribution pass.
references/execution.md — shared setup and board handoff (Steps 0, 1, 1.5, 2, 3)commands/metric-anomaly.md — point-in-time anomaly detection (additive seasonal baseline + robust residual; 2 queries; 7-day hourly + 30-day daily views)commands/metric-drift.md — trend-level drift detection (mean shift + variance ratio; 2 queries; 60-day daily + 16-week weekly views; owns shape classification)commands/metric-rca.md — root-cause attribution (5-branch segmentation fan-out on same windows as source command; ranks findings by concentration × deviation; appends to the diagnosis board)