Root-cause a bug already in front of you, instead of guessing at fixes. Use on triggers like "root cause this", "why is this failing", "debug systematically", "this test is flaky", "it works locally but not in CI", or when a fix attempt has already failed once. Enforces a phased evidence-first process before any code change. Not a feature-build or ship workflow.
npx skills add https://github.com/BlackBeltTechnology/pi-agent-dashboard --skill systematic-debugging
A bug is a gap between what the code does and what you believe it does. Guessing at fixes closes the gap by accident, if at all — and each blind edit adds a new variable that hides the real cause. Systematic debugging is the discipline of gathering evidence until the cause is known, then changing exactly one thing.
The failure mode this skill prevents: reading a stack trace, forming an instant theory, editing code to match the theory, re-running, and repeating. That loop feels like progress and usually is not — it mutates the system faster than it explains it.
When NOT to use:
Each phase has a success criterion. Do not advance until it is met. Skipping ahead is the whole antipattern.
Phase 1 ROOT CAUSE gather evidence ─▶ criterion: you can state the cause in one sentence
│ with evidence, not a guess
▼
Phase 2 PATTERN is this cause elsewhere? ─▶ criterion: you've searched for sibling
│ instances of the same class of bug
▼
Phase 3 HYPOTHESIS change ONE variable ─▶ criterion: a prediction that, if wrong,
│ disproves your theory (a real test)
▼
Phase 4 IMPLEMENTATION fix + regression test ─▶ criterion: a test that fails before the fix
and passes after
Collect evidence before forming a theory. The goal of this phase is a sentence of the form *"X fails because Y, and here is the observation that shows Y."*
console.log can't reach the state (closure variables, a paused async frame, the Electron main process, WebSocket server internals), reach for the node-inspect-debugger skill — real breakpoints and a scope-chain dump beat sprinkled logs.Success criterion: you can name the cause in one sentence, backed by an observation. If you can only say "I think it's the cache," you are not done with Phase 1.
A bug is rarely unique. Before fixing this instance, ask whether the same *class* of mistake exists elsewhere.
Success criterion: you've searched for sibling instances and know whether the fix is one-site or systemic.
State a hypothesis that could be wrong — and how you'd know. A theory that can't be disproven isn't a diagnosis, it's a belief.
Success criterion: you have a one-variable change and a falsifiable prediction.
Only now do you write the fix.
Success criterion: a test that fails before the fix and passes after, plus a green wider suite.
Fast, captured feedback is what makes evidence cheap. Use this repo's documented convention — run once, capture, then grep the file instead of re-running to see errors:
npm test 2>&1 | tee /tmp/pi-test.log # run once, capture everything
grep -nE 'FAIL|Error|✗|✘' /tmp/pi-test.log # find failures
grep -n -A 20 'FAIL ' /tmp/pi-test.log # failure + context
Never rerun npm test just to re-read an error you already produced — grep the captured log. Each unnecessary rerun is latency between you and the cause.
After three failed fixes, STOP. Three misses means your model of the system is wrong, not that the fourth edit is the charm. Continuing to patch against a broken model deepens the hole.
When you hit three:
doubt-driven-review skill — spawn a fresh-context adversarial reviewer to cross-examine the *architecture* and your assumptions, not just this line. The premise you've been protecting for three attempts is the thing to doubt.The Rule of Three is a circuit breaker against sunk-cost debugging. Honour it.
if (x == null) return) without knowing why x is nulldoubt-driven-review rather than a fourth blind attemptTake blackbelttechnology/systematic-debugging from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.