root-cause
Skill81 starsChanged 4 months agoApache-2.0View on GitHub
Find the mechanism behind a failure instead of patching its symptom - reproduce first, one variable per experiment with the prediction written before the run, exit by naming the mechanism and pinning it with a failing test. Use for a bug, an unexplained red test, or a failure that will not reproduce.
8 other projects use a version of this.
Adopted by
Most recently taken up by
- niksavis/basiclytheir own version, first seen Oct 5, 2026
- crbnos/carbontheir own version, first seen Oct 4, 2026
- nadirali1350/vettedtheir own version, first seen Sep 30, 2026
- nadiwerk/trust-no-agenttheir own version, first seen Sep 30, 2026
- lifekit-hq/devclawtheir own version, first seen Sep 7, 2026
- Vesely/skillstheir own version, first seen May 1, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- crbnos/carbon★ 2.7ksame name
- Vesely/skills★ 28same name
- composio-community/support-skills★ 19same name
- nadirali1350/vetted★ 2same name
- hugo082/skills★ 1same name
- lifekit-hq/devclaw★ 1same name
- nadiwerk/trust-no-agent★ 1same name
- niksavis/basicly★ 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 repository15 other files it gives its agents.
- docs/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- browser-checkSkill
- code-reviewSkill
- deslopSkill
- doctorSkill
- fidelity-gateSkill
- helloSkill
- pr-feedbackSkill
- prompt-tuningSkill
- retroSkill
- runSkill
- setupSkill
- skill-writingSkill
- statusSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 45
Do not re-read the code hoping to spot it.
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Root cause — working a failure down to its mechanism
This is the situation the conductor is told to spend its most expensive reasoning on: a diagnosis, a failure nobody can reproduce, two agents who disagree. Spending more thinking on an undisciplined search just produces a more confident wrong answer, so here is the discipline.
Reproduce first. Everything else is downstream of this
A fix for a bug you cannot reproduce is a guess with a diff attached. You cannot tell whether it worked, and neither can the reviewer — the bug's absence after the change is indistinguishable from the bug's absence before it.
Get to the smallest reliable reproduction you can, and write down the exact command, input and environment. If it reproduces only sometimes, capture the rate — "3 of 20 runs" is a fact you can measure against later, "it is flaky" is not. If it will not reproduce at all, that is now the task: what does the failing environment have that yours does not — version, data, timezone, concurrency, permissions, a warm cache?
Read the whole error
The first line names where it surfaced, not where it went wrong. Read the full stack, the frames from your own code in particular, and everything logged in the seconds before. The answer is stated outright more often than anyone expects, which is why "I read the error" and "I read the first line of the error" have to be different sentences.
One variable, and write the prediction first
Change ONE thing per experiment, and write down what you expect to happen before you run it. An experiment whose outcome you did not predict teaches almost nothing: whatever comes back, it confirms something you already believed. A prediction that turns out wrong is the single most informative event available to you, and you only get it by committing first.
Two changes at once and you have learned nothing about either.
Halve the surface
Do not re-read the code hoping to spot it. Bisect.
- Over time:
git bisectagainst a command that exits non-zero on the failure. A scriptable check turns an afternoon into a few minutes. - Over the input: cut it in half, keep the half that still fails, repeat.
- Over the system: disable, stub or bypass half the pipeline. Where does the value stop being correct? Instrument at the boundary between two components before you go inside either.
It is your code before it is the library
The base rate favours the code changed most recently by the fewest people —
yours. Suspect the dependency only after the evidence points there, and then
read the installed version's source, not your memory of the API and not the
documentation for a version you might not have. node_modules is on disk; the
answer is a grep away, and a remembered signature has already sent people
down a day of the wrong road.
When three hypotheses have died
The wrong assumption is one you have not written down. Stop testing and list what you believe is true about the system — which file is loaded, which branch is running, which build is deployed, which database you are pointed at, that the change you made is even in the process you are running. Then test the cheapest item on that list.
Almost every long debugging session ends here: something everyone was certain
of was not true. prompt-tuning has the sibling rule for non-deterministic
work — after three failed attempts at the same defect, name it a known
limitation and hand it to a person rather than taking a fourth blind swing.
Exiting
- Name the MECHANISM, not the symptom. "The cache key omits the locale, so the second request serves the first request's body" is a root cause. "The page showed the wrong language" is the symptom you started with.
- Pin it with a failing test before the fix. Written after the fix, a test only proves the code's current behaviour; written before, it proves the bug existed and is gone. This is also what the reviewer will ask for.
- Check for siblings. The same mechanism usually has other victims — another cache key, another unhandled path. Find them now, while you understand it.
- Report the mechanism, the evidence, the fix and the blast radius, plus the hypotheses you killed. Those save the next person from re-running your dead ends, and they are the part everyone omits.
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.

