root-cause-debugging
Skill0 starsChanged 8 days agoMITView on GitHub
Use when investigating a defect, regression, flaky or intermittent failure, failed deploy, or unexplained runtime behaviour, and before attempting a second fix for the same symptom. Corrects the responsible mechanism instead of hiding a downstream symptom.
9 other projects use a version of this.
Adopted by
Most recently taken up by
- reddygopalkrishna/developer-agent-skillstheir own version, first seen Nov 8, 2026
- plori-ai/skillstheir own version, first seen Oct 22, 2026
- yuchi-chang/no-capetheir own version, first seen Oct 8, 2026
- AL-JANEF/janef-forgetheir own version, first seen Sep 19, 2026
- AL-JANEF/janefskillstheir own version, first seen Sep 19, 2026
- adamentwistle/fable-skillstheir own version, first seen Sep 3, 2026
Used with
Projects with it also use security-audit.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
CloudflareSkillsecurity-audit
Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons. Use for security questions, focused reviews, vulnerability research, security audits, or pen tests. Run the complete workflow only for explicit codebase audit or pen-test requests, full/comprehensive/end-to-end reviews, or requested report artifacts.
Also in 4 projects that use this
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- adamentwistle/fable-skills★ 98same name
- reddygopalkrishna/developer-agent-skills★ 8same name
- 05-deepak-patidar/claude-skills★ 4same name
- yuchi-chang/no-cape★ 2same name
- AL-JANEF/janef-forge★ 1same name
- AL-JANEF/janefskills★ 1same name
- HEMANTH-A-7/engram★ 1same name
- nolotus/skills★ 0same name
- plori-ai/skills★ 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 repository14 other files it gives its agents.
- AGENTS.mdAGENTS.md
- backend-engineeringSkill
- change-planningSkill
- change-reviewSkill
- device-healthSkill
- genai-engineeringSkill
- instruction-maintenanceSkill
- pakemSkill
- pakem-updateSkill
- project-bootstrapSkill
- release-deliverySkill
- sensitive-operationsSkill
- state-and-handoffSkill
- ui-ux-qualitySkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. 0 are common, 14 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
14
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 19
Never describe an unconfirmed change as a fix.
- Distinctive: line 26
Verify that the running artifact contains the code being evaluated.
- Distinctive: line 30
When known good and bad revisions exist, prefer bounded comparison or git bisect over rereading the codebase.
- Distinctive: line 35
Follow one failing operation through every responsible boundary.
- Distinctive: line 39
Never put secrets or personal data in telemetry.
- Distinctive: line 53
Prefer experiments that change one variable and rule alternatives in or out.
- Distinctive: line 57
Before changing code, name the first violated contract or incorrect state, the component that owns it, the mechanism that produced it, and …
- Distinctive: line 64
Remove failed experimental workarounds unless separately approved, and inspect sibling paths that share the corrected contract.
- Distinctive: line 70
Prefer a regression test that fails for the expected reason before the fix and passes after it.
- Distinctive: line 72
Verify the owning component, the affected boundary contracts, a realistic integration path, and the original user-visible flow as risk …
- Distinctive: line 79
After one failed fix, stop patching and update the causal model with what the result disproved.
- Distinctive: line 81
After two failed fixes for the same symptom, make no third change until the failing state and artifact identities are re-established, …
- Distinctive: line 89
Keep mitigation, causal correction, and cosmetic restoration separate.
- Distinctive: line 95
Keep raw logs out of plans and handoffs.
“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 Debugging
Debugging is controlled causal investigation, not a sequence of plausible patches. Logs, traces, tests, code, and graphs are observations; an explanation stays a hypothesis until evidence distinguishes it from the alternatives.
1. Establish the failure
- Separate observed behaviour from hypotheses.
- Record expected and observed behaviour, exact input and sequence, affected and unaffected cases, frequency, and the first known bad state when available.
- Build the narrowest faithful reproduction. If reproduction is impractical, state that limit and name the evidence that substitutes for it.
- Never describe an unconfirmed change as a fix.
2. Confirm the tested state
- Record repository revisions and relevant working-tree changes, built artifact or image identity, configuration schema, migration state, dependency versions, and runtime topology as applicable.
- Verify that the running artifact contains the code being evaluated. Build success and build logs do not prove runtime behaviour or deployment identity.
- Isolate investigation from unrelated changes with a branch or worktree based on the intended revision. Never discard user work for isolation.
- When known good and bad revisions exist, prefer bounded comparison or
git bisectover rereading the codebase.
3. Trace the responsible path
- Follow one failing operation through every responsible boundary.
- At each boundary compare actual input, output, state transition, ownership, timeout, retry, and error contracts.
- Correlate processes with an existing safe request, job, or trace identifier. Never put secrets or personal data in telemetry.
- Account for stale containers, caches, persisted data, clocks, concurrency, retries, feature flags, environment drift, and instrumentation side effects.
- Instrumentation exposes a boundary; it is not a correction. Remove or justify it afterwards under normal privacy and review rules.
4. Manage hypotheses
- For recurrent, cross-boundary, asynchronous, or stateful failures, keep a hypothesis ledger (template).
- For each hypothesis record the mechanism, supporting and conflicting evidence, a prediction that must hold, the smallest discriminating experiment, and the result: confirmed, rejected, or inconclusive.
- Preserve negative results so later sessions do not repeat disproven work.
- Prefer experiments that change one variable and rule alternatives in or out.
5. Prove and correct the cause
- Before changing code, name the first violated contract or incorrect state, the component that owns it, the mechanism that produced it, and how it explains every downstream symptom.
- Root cause can be a conjunction of conditions; do not force a single-cause story or stop at the first correlation.
- Fix the responsible mechanism and contract in its owning component. Do not compensate downstream because that hides the symptom.
- Remove failed experimental workarounds unless separately approved, and inspect sibling paths that share the corrected contract.
6. Verify the correction
- Prove the correction against the original failure fingerprint.
- Prefer a regression test that fails for the expected reason before the fix and passes after it.
- Verify the owning component, the affected boundary contracts, a realistic integration path, and the original user-visible flow as risk requires.
- Exercise relevant negative, retry, duplicate, timeout, cancellation, restart, concurrency, and partial-failure cases.
7. Circuit breaker
- After one failed fix, stop patching and update the causal model with what the result disproved.
- After two failed fixes for the same symptom, make no third change until the failing state and artifact identities are re-established, competing hypotheses are reviewed, and a new discriminating experiment is defined.
- Seek an independent review of the evidence when available. A fresh opinion without new evidence is not progress.
8. Mitigation, restoration, and record
- Keep mitigation, causal correction, and cosmetic restoration separate.
- Urgent mitigation may protect users, data, security, or availability before diagnosis completes. Label it temporary and record risk, owner, rollback, and removal condition. It does not close the problem.
- For significant or recurring failures write an incident record (template).
- Keep raw logs out of plans and handoffs; keep safe references and the facts needed to resume.
- In planned work, keep an unknown cause explicitly unknown: plan reproduction, instrumentation, and diagnosis first, update the design with the supported explanation, then implement. Mark a fix task done only after its regression and runtime evidence pass.
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.

