Evidence-based debugging that forbids guessing. Use for any bug, crash, failing test, regression, wrong output, performance problem or unexpected behaviour, before proposing a fix.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Root Cause?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/alptugince-root-cause)
---
name: root-cause
description: Evidence-based debugging that forbids guessing. Use for any bug, crash, failing test, regression, wrong output, performance problem or unexpected behaviour, before proposing a fix.
---
# Root cause
The failure this skill prevents: confidently naming "the smoking gun" without having read the code or reproduced the problem.
## Rules
- No claim about a cause until the code path that produces the symptom has been read in this session and quoted (file:line).
- No fix until the problem is reproduced, or it is stated explicitly that reproduction was impossible and why.
- Every hypothesis has a test that could prove it wrong. Run that test.
## Procedure
1. **Restate the symptom precisely**: expected vs actual, inputs, environment, first bad version if known. If the report is vague (a screenshot, "???"), use the project feature map to locate the feature before anything else.
2. **Reproduce** with the smallest reliable trigger. Save the reproduction as a test or script.
3. **Trace the path**: from the entry point (UI event, request, command, frame update) follow the actual calls to where the wrong value or behaviour appears. Use subagents to search in parallel when the code base is large; ask them to return file:line evidence, not opinions.
4. **List hypotheses** (at most three), each with the evidence for it and the observation that would refute it.
5. **Discriminate**: add logging, assertions, a debugger breakpoint, a trace or a bisect (`git bisect run <repro>`) until exactly one hypothesis survives.
6. **Fix the cause**, not the symptom. If the cause sits in a dependency or another team's area, report it and fix only within scope.
7. **Prove it**: the reproduction now passes, a regression test exists, and the `verify` skill passes.
8. **Prevent recurrence**: if this class of bug can be caught mechanically, run `failure-to-guardrail`.
## Output
Root cause (one sentence, with file:line), evidence, fix, regression test name, verification result.