causal-inference-root-cause — Claude Code skill: root cause analysis
causal-inference-root-cause — a skill that pushes an agent through a five-step causal investigation, so the answer to why something happened comes with a mechanism and a tested alternative.
no license 110 installs ★ 203 updated 2026-09-01
npx skills add lyndonkl/claude --skill causal-inference-root-cause -a claude-codeWhat causal-inference-root-cause does
The skill runs an agent through five steps: pin down the effect and its baseline, list competing explanations, build the causal model, test it, then write up and validate. Simple investigations get resources/template.md; harder ones are pointed at resources/methodology.md. Hypotheses come from repeated why-questions, cause categories, a timeline of what changed and differential diagnosis.
Testing borrows from epidemiology. Evidence is ranked from randomised trials down to expert opinion, and each link is checked against the 9 Bradford Hill factors, among them temporality, dose-response and plausibility. Confounders are mapped out in the open, and a correlation is not enough — a mechanism has to be named.
The write-up lands in causal-inference-root-cause.md and gets scored against resources/evaluators/rubric_causal_inference_root_cause.json. A 3.5 minimum is where the skill stops: below it, a tidy narrative without a counterfactual check still counts as unfinished.
What it helps with
- trace a conversion drop back to a payment provider change
- rule out the last deploy as the cause of an outage
- test whether a metric shift is seasonal
- write a postmortem that names a mechanism, not just symptoms
- estimate the effect of a new policy against confounders
Example prompts for the agent
- Find the root cause of the failing builds and show me the causal chain, not a list of correlations.
- Run a causal analysis of the signup drop and test the competing explanations against each other.
- Why did latency spike? Check the confounders and tell me what the counterfactual looks like.
How to install causal-inference-root-cause
1Skills CLI (Vercel)
npx skills add lyndonkl/claude --skill causal-inference-root-cause -a claude-code2Manually: put the files in place
~/.claude/skills/causal-inference-root-cause/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/causal-inference-root-cause/
1Skills CLI (Vercel)
npx skills add lyndonkl/claude --skill causal-inference-root-cause -a codex2Manually: put the files in place
.agents/skills/causal-inference-root-cause/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add lyndonkl/claude --skill causal-inference-root-cause -a cursor2Manually: put the files in place
.cursor/skills/causal-inference-root-cause/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install lyndonkl/claude skills/causal-inference-root-cause2Manually: put the files in place
.github/skills/causal-inference-root-cause/SKILL.md1Skills CLI (Vercel)
npx skills add lyndonkl/claude --skill causal-inference-root-cause -a gemini-cli2Platform CLI
gemini skills install https://github.com/lyndonkl/claude --path skills/causal-inference-root-causeManually: put the files in place
.devin/skills/causal-inference-root-cause/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add lyndonkl/claude --skill causal-inference-root-cause -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about causal-inference-root-cause
How do I install causal-inference-root-cause in Claude Code?
Run npx skills add lyndonkl/claude --skill causal-inference-root-cause -a claude-code. The skill file lands at ~/.claude/skills/causal-inference-root-cause/SKILL.md.
What does causal-inference-root-cause do?
It walks an agent through a five-step investigation of why something happened, keeping real causes apart from symptoms and spurious associations. You get a written analysis with a causal model, tested hypotheses and suggested interventions.
Which platforms can run this skill?
The same skill installs into Claude, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode, each with its own install command and skill path. For Copilot the command is gh skill install lyndonkl/claude causal-inference-root-cause.