agentleFS
pinexaipinexai/claude-code-skills/root-cause-debugger/SKILL.md

root-cause-debugger

Skill1 starsChanged 4 months agoMITView on GitHub

Use this skill when asked to fix a bug, when a stack trace or error message is pasted, when asked "why is this failing", or when investigating an intermittent failure or a regression (something that used to work and now doesn't). Triggers include: "fix this bug", "this is broken", a pasted traceback/exception, "why does X fail", "this used to work", "regression in Y". Do NOT use this skill for greenfield feature writing, for adding new functionality with no existing failure to explain, or for cosmetic/style changes — it exists to force a real diagnosis before any patch, not to slow down work that has no bug to diagnose.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 5

    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
  1. Distinctive:

    Localize: Use git log / git blame / bisection against recent diffs to narrow where the behavior changed, especially for regressions.

    line 34
  2. Distinctive:

    Verify the cause: before writing any fix. The winning hypothesis should be one you can state as a mechanism: "X happens because Y, which …

    line 44
  3. Distinctive:

    Never write a fix before stating an evidence-backed root cause.

    line 53
  4. Distinctive:

    If the cause can't be confirmed with available evidence, say so plainly instead of guessing and presenting the guess as diagnosed.

    line 55
  5. Distinctive:

    Before any code is changed, state:

    line 65

“Common” is measured: kept by at least 6 in 10 of the 3 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Root Cause Debugger

When this fires

The default failure mode when fixing a bug is to patch whatever line the stack trace points at until the symptom disappears, without ever confirming that's actually the cause. That produces fixes that don't hold — the bug comes back in a different form, or the real cause is still live elsewhere. This skill forces a differential diagnosis: reproduce, form multiple hypotheses, gather evidence, and confirm the cause before writing a single line of fix.

Protocol

  1. Reproduce it. Get the failure to happen on demand. If it can't be reproduced, say so explicitly and state what evidence you're working from instead (logs, a single report, a stack trace with no repro steps) — don't proceed as if you'd confirmed it.
  2. Localize. Use git log / git blame / bisection against recent diffs to narrow where the behavior changed, especially for regressions. For failures with no clear recent change, localize by narrowing the reproduction (smallest input, smallest code path that still fails).
  3. Form at least two hypotheses for the cause. A single hypothesis pursued immediately is exactly the symptom-patching this skill exists to prevent.
  4. Gather evidence for and against each hypothesis — add logging, use a debugger, read the actual code path, check inputs/state at the failure point. Evidence must be observed, not assumed.
  5. Verify the cause before writing any fix. The winning hypothesis should be one you can state as a mechanism: "X happens because Y, which causes Z" — not "it's probably something in this area."
  6. Fix, then confirm the reproduction is gone. Re-run the exact reproduction from step 1. A fix that wasn't verified against the original repro isn't confirmed.

Hard rules

  • Never write a fix before stating an evidence-backed root cause. "This might help" is not a root cause.
  • If the cause can't be confirmed with available evidence, say so plainly instead of guessing and presenting the guess as diagnosed.
  • A regression must be localized to a change (commit, dependency bump, config change) wherever the history makes that possible — "no idea when this started" is a last resort, not a first move.
  • The fix must address the mechanism identified in step 5, not just make the visible symptom stop.

Output

Before any code is changed, state:

Reproduction: <exact steps/command, or "could not reproduce — working from: ...">
Localization: <commit/change/code path narrowed to, or "no clear recent change">
Hypotheses considered:
  1. <hypothesis> — <evidence for/against>
  2. <hypothesis> — <evidence for/against>
Root cause: <the confirmed mechanism, citing the evidence that confirmed it>

Then apply the fix, and report the reproduction re-run result (pass/fail) against the original repro from step 1.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.