analytics-diagnostic-m…
The spine of analytics investigation. Use whenever interpreting analytics numbers, answering "why did X change", reading funnels,…
Pearl's three-rung causal hierarchy as a query classifier. Tags every analytics question as rung-1 (association, P(Y|X)), rung-2 (intervention, P(Y|do(X))), or rung-3 (counterfactual, P(Y_x|Y',X')) before answering. Refuses to escalate a rung-1 observational finding into a
Claude Code
$ npx -y skills add clamp-sh/analytics-skills --skill causal-query-classifier --agent claude-code
Codex
$ npx skills add clamp-sh/analytics-skills --skill causal-query-classifier -a codex -y
Cursor
$ npx skills add clamp-sh/analytics-skills --skill causal-query-classifier -a cursor -y
Gemini CLI
$ npx skills add clamp-sh/analytics-skills --skill causal-query-classifier -a gemini-cli -y
GitHub Copilot
$ npx skills add clamp-sh/analytics-skills --skill causal-query-classifier -a github-copilot -y
OpenCode
$ npx skills add clamp-sh/analytics-skills --skill causal-query-classifier -a opencode -y
Windsurf
$ npx skills add clamp-sh/analytics-skills --skill causal-query-classifier -a windsurf -y
name: causal-query-classifier description: Pearl's three-rung causal hierarchy as a query classifier. Tags every analytics question as rung-1 (association, P(Y|X)), rung-2 (intervention, P(Y|do(X))), or rung-3 (counterfactual, P(Y_x|Y',X')) before answering. Refuses to escalate a rung-1 observational finding into a rung-2 ship/kill recommendation without naming an identification strategy (back-door, instrumental variable, DiD, RDD, synthetic control). Use this skill whenever interpreting an analytics question that asks why or what-if, to classify it on Pearl's causal hierarchy before answering. Pairs with analytics-diagnostic-method. Triggers when Clamp MCP returns a comparison or trend that the user is about to act on, so the agent labels the claim's rung explicitly instead of laundering correlation into causation. Works with any observational source; Clamp MCP is the canonical integration via traffic.compare, funnels.list, and cohorts.compare. when_to_use: When the user asks "did X cause Y", "what if we ship Z", "would CVR have moved if we hadn't launched", "is the lift from the new page real", or any question shaped as a counterfactual or intervention. Also when the user is about to act on a comparison or trend that came back from Clamp MCP (or any analytics tool) and wants a yes/no recommendation rather than a description.
Most analytics arguments lose at the question, not at the data. Someone shipped a new pricing page, CVR went up the same week, and the deck says "the page lifted CVR by 18%." The data says nothing of the sort — it says CVR was higher the week after launch. Pearl's three-rung causal hierarchy gives you a vocabulary for catching that slide before it happens.
This skill makes the rung explicit. Every question is classified before it's answered. Rung-1 questions get rung-1 answers. Rung-2 questions get either a real identification strategy or a refusal to make the claim.
Judea Pearl's hierarchy ranks queries by what they require of the data. Each rung subsumes the one below.
What is the relationship between two observed variables, exactly as the world has shown them to us. No intervention, no counterfactual. Pure observation.
Rung-1 claims are always defensible from the data. They are also always silent about *why* the pattern holds. Mobile users may convert lower because mobile is worse, or because mobile attracts top-of-funnel browsers, or because the checkout form is broken on Safari. Rung-1 cannot distinguish these.
What would Y look like if we *forced* X to a specific value, holding everything else as it would have been. `do(X)` is Pearl's notation for an external setting of X — surgery on the causal graph that severs X from its usual causes.
P(Y | do(X)) is generally **not** equal to P(Y | X). The conditional is "among sessions where the new page was seen, what was CVR" — which is a rung-1 quantity contaminated by selection (the kind of users who saw the new page might differ from the kind who didn't). The interventional is "what would CVR be if we made everyone see the new page" — a counterfactual question about the world as it would be under a forced setting.
Rung-2 queries are answerable from observational data only if you can identify the causal effect through an explicit strategy. Named below.
What would Y have been for *this specific unit* if X had been different, given what we actually observed. Counterfactuals are unit-level and contrary to fact.
Rung-3 requires the strongest assumptions. It typically needs a structural model (synthetic control, causal forests, structural causal models), and it answers questions about specific units or specific historical moments — not generic policy.
| Question shape | Rung | What it actually asks | Identification strategies if observational | |---|---|---|---| | "What is X?" / "How does Y vary with X?" | 1 | P(Y|X) | None needed; descriptive | | "Why did X change?" | 1 or 2 | Depends — diagnostic (rung-1) or causal (rung-2) | If rung-2: requires explicit decomposition | | "Did X cause Y?" | 2 | P(Y|do(X)) | RCT, back-door adjustment, IV, DiD, RDD, synthetic control | | "Will X cause Y if we ship it?" | 2 | P(Y|do(X=on)) | RCT (preferred), or identification strate
Analytics skills for Claude, Cursor, and other AI agents. Read web analytics like a senior analyst: diagnose traffic changes, judge channel quality, read funnels, declare typed events, and read A/B tests without the usual rookie mistakes.
The spine of analytics investigation. Use whenever interpreting analytics numbers, answering "why did X change", reading funnels,…
One-time interview that captures the business context (industry, model, primary conversion, traffic range, ICP, data stack) into…
Formal time-series methods that augment the hand-coded fingerprint library in traffic-change-diagnosis. Use this skill when…
Bayesian counterpart to experiment-result-reader. Computes posterior P(variant beats control), credible intervals, and expected…
Build a refinable causal DAG before answering "did X cause Y" on observational data. Emits a Mermaid diagram of assumed causes,…
Bradford Hill's 9 viewpoints (1965) reframed as a checklist for product analytics. Use this skill before recommending a decision…
Use this skill to extract structured Markdown/JSON from PDFs and document images—tables with cell-level precision, formulas as…
Estimates intracellular metabolic fluxes from steady-state carbon-13 isotope-tracing measurements using validated atom maps,…