# causal-inference-root-cause

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.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 110 installs · ★ 203 repo stars
- Author: lyndonkl
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/lyndonkl/claude/tree/HEAD/skills/causal-inference-root-cause/SKILL.md
- Updated: 2026-09-01
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/causal-inference-root-cause

## What it 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.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add lyndonkl/claude --skill causal-inference-root-cause -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/causal-inference-root-cause/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/causal-inference-root-cause/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add lyndonkl/claude --skill causal-inference-root-cause -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/causal-inference-root-cause/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add lyndonkl/claude --skill causal-inference-root-cause -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/causal-inference-root-cause/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install lyndonkl/claude skills/causal-inference-root-cause
```

2. **Manually: put the files in place**
- File: `.github/skills/causal-inference-root-cause/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add lyndonkl/claude --skill causal-inference-root-cause -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/lyndonkl/claude --path skills/causal-inference-root-cause
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/causal-inference-root-cause/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add lyndonkl/claude --skill causal-inference-root-cause -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/lyndonkl/claude/tree/HEAD/skills/causal-inference-root-cause/SKILL.md

## When to use it
- 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
- 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.

## Similar
- [root-cause-tracing](https://affpapa.org/en/nevibecode/skills/root-cause-tracing.md) — skill · 1400 installs
- [root-cause-analysis](https://affpapa.org/en/nevibecode/skills/autohandai-root-cause-analysis.md) — skill · ★ 219 repo stars
- [om-root-cause](https://affpapa.org/en/nevibecode/skills/om-root-cause.md) — skill · 3700 installs
- [Causal Inference](https://affpapa.org/en/nevibecode/skills/causal-inference.md) — skill · 544 installs
- [root-cause-capa](https://affpapa.org/en/nevibecode/skills/root-cause-capa.md) — skill · ★ 47914 repo stars
- [root-cause-analyst](https://affpapa.org/en/nevibecode/agents/root-cause-analyst.md) — subagent · ★ 23950 repo stars

From the same set: [lyndonkl/claude](https://affpapa.org/en/nevibecode/by/lyndonkl/claude.md) — 49 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
