debug-root-cause
Skill2 starsChanged 6 months agoMITView on GitHub
Use when something is broken — a bug, a test failure, unexpected behavior. Enforces the no-fix-without-root-cause loop.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- RedGranite/smartskilltheir own version, first seen Sep 11, 2026
- turntuptechnologies-ai/skillstheir own version, first seen Aug 6, 2026
- Sir-chawakorn/sanook-clitheir own version, first seen Jun 21, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- Sir-chawakorn/sanook-cli★ 9same name
- turntuptechnologies-ai/skills★ 1same name
- RedGranite/smartskill★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- code-reviewSkill
- planSkill
- save-learningSkill
- shipSkill
- specSkill
- tddSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
Read the actual error message and stack trace — top to bottom.
- Distinctive: line 22
Don't theorize yet. Collect evidence.
- Distinctive: line 26
Ask "why" repeatedly until you reach a cause, not a coincidence.
- Very specific: line 38
Run the full quality gate (rules/code-quality.md).
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Debug to Root Cause
The Iron Law: no fix without a confirmed root cause. Patching a symptom you don't understand just moves the bug. Work the four phases in order.
When to use
Any error, test failure, 500, stack trace, "it worked yesterday", or behavior that doesn't match expectations. Use this instead of immediately editing code.
The four phases
1. Investigate (gather facts, change nothing)
- Reproduce it reliably. If you can't reproduce it, you can't fix it.
- Read the actual error message and stack trace — top to bottom.
- Capture the exact inputs, environment, and steps that trigger it.
- Don't theorize yet. Collect evidence.
2. Analyze (find the why)
- Trace from the symptom back to the source. Follow the data.
- Ask "why" repeatedly until you reach a cause, not a coincidence.
- Distinguish where it surfaces from why it happens — often different.
3. Hypothesize (one testable theory)
- State a single, specific hypothesis about the root cause.
- Predict what you'd see if it's true. Test that prediction.
- Wrong? Back to phase 2 with what you learned. Don't guess-and-check edits.
4. Fix (root cause + regression test)
- Fix the actual cause, not the symptom.
- Write a test that fails before the fix and passes after. This proves the cause and prevents regression.
- Run the full quality gate (rules/code-quality.md).
After the fix
Record it: add a gotcha entry to rules/error-prevention.md (what happened,
why, how to prevent). If it caused real damage, write a lesson into memory
(rules/memory-system.md). That's how the bug stays dead.
Anti-patterns
- Changing things randomly to see what helps.
- Adding a try/except that hides the error instead of fixing it.
- "Fixed" without reproducing the original failure first.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

