About this skill
Systematic Debugging Loop
Coding agents debug by guessing: change a line, rerun, change another line. This skill takes guessing off the table. The agent may not propose a fix until it has read the error, reproduced the bug, checked what changed and traced the bad value back to where it starts. Then it tests one hypothesis at a time with the smallest possible change, writes a failing test before the fix, and verifies the fix with real command output. After three failed fixes it stops and asks you whether the design is wrong, instead of trying a fourth.
How it works. Install it and the agent loads it whenever it hits a bug, a failing test or a build failure, or type /systematic-debugging-loop with the symptom. It works through four phases: root cause investigation, pattern analysis (find working code that is similar and list every difference), hypothesis and testing, and implementation. A table of common excuses ("just try this first", "emergency, no time") with the answer to each keeps it from skipping steps under pressure.
Included techniques. root-cause-tracing.md (trace a bad value backwards up the call stack), defense-in-depth.md (validate at every layer once the cause is known), condition-based-waiting.md with a TypeScript example (replace sleeps in flaky tests with polling for the condition), and find-polluter.sh (runs test files one by one with npm test to find which one creates an unwanted file or directory; adapt the command for other runners).
Based on systematic-debugging by Jesse Vincent (MIT): https://github.com/obra/superpowers
What we changed
- Made it standalone: two references to other Superpowers skills that are not included (TDD and verification) are replaced with one-line inline rules.
- Renamed to
systematic-debugging-loop, expanded the description, normalized frontmatter to the SKILL.md spec. - Added attribution (
NOTICE.md,LICENSES/). The four phases, red flags and supporting files are the upstream text.
Checked against
Claude Code 2.1.317 (desktop app, Claude Opus 5.5), 2026-11-07. Installed under .claude/skills/systematic-debugging-loop/, loaded from SKILL.md and run end to end on a stale-cache bug in a Python project (unittest): the four phases found the root cause, a failing test came before the one-line fix, and 5 of 5 tests passed. find-polluter.sh is npm-only and one example path was wrong; both are noted or fixed (NOTICE.md). The example output on this page is from that run, shortened. Not yet checked: automatic triggering from the skill description in a fresh session (the run started from an explicit request), and Codex, Cursor, GitHub Copilot and Gemini CLI, which read the same SKILL.md format but have not been run.
How to install
Copy the files/ folder of the download to either location in your project:
.agents/skills/systematic-debugging-loop/(Codex, Cursor, Copilot, Gemini CLI and others that read.agents/skills).claude/skills/systematic-debugging-loop/(Claude Code)
Or download the zip from this page and unpack it there. find-polluter.sh needs bash; make it executable with chmod +x if your unzip tool drops the flag.
Not a fit
Typos and one-line errors where the message already names the fix. The loop is still fast there, but you will not notice the difference.
