obra/superpowers/skills/systematic-debugging
Systematic debugging
Use when hitting any bug, test failure or unexpected behavior, before proposing a fix.
What Systematic debugging does
The skill sets one rule for the agent: no fix until the root cause is known. It covers test failures, production bugs, build failures, performance problems and integration issues. The SKILL.md stresses it most for moments of time pressure or after earlier fixes have failed.
Work happens in four phases, each finished before the next. First the agent reads errors and stack traces in full, reproduces the problem, checks recent changes and, in systems with several components, logs what enters and leaves each boundary to see where things break. Bad values get traced back up the call chain to where they started. Next it compares the broken code with working examples and reference implementations, listing every difference. It then states one hypothesis and tests it with the smallest possible change. Only after that does it write a failing test, apply a single fix and confirm nothing else broke.
After three failed fixes the agent stops and raises the architecture with the person instead of trying a fourth. Supporting files explain backward tracing, validation at several layers once the cause is found, and replacing fixed sleeps in tests with condition polling. A bash script bisects a test suite to find which test leaves unwanted files behind.
Install
/plugin install superpowers@claude-plugins-officialRead the security check below before you run it. The repository's own instructions win if they differ.
Security check
What the skill's files do, from reading them. A flag that nobody has checked yet says "Not checked", never "No".
- Runs scripts
- Yes
- Uses the network
- No
- Installs hooks
- No
- Asks for secrets
- No
The scan found two script files and no network use, hooks or secrets. find-polluter.sh is a bash script that runs npm test on each test file matching a pattern and stops at the first one that creates a given file or folder. It runs only when called. condition-based-waiting-example.ts is example code; nothing in the skill executes it. Everything else is Markdown, including pressure-test scenarios written to test the skill. Because npm test runs your project's own tests, read the script and try it in a test repository first. The skill adds no hooks; the plugin has a session-start hook.
Scan details: Ships 2 script files: condition-based-waiting-example.ts, find-polluter.sh. Checked at commit 2ce8aa15d05b.
Use cases
- Tracking down a failing test before changing any code
- Finding which layer breaks in a multi-step CI, build or signing pipeline
- Replacing fixed sleeps in flaky tests with condition-based waits
- Finding which test in a suite creates stray files or directories
Limitations
- Ships inside the Superpowers plugin; the documented installs add the whole plugin, not this skill alone.
- Phase four refers to the test-driven-development and verification-before-completion skills from the same plugin.
- find-polluter.sh assumes an npm project, since it runs npm test once per matching file.
- condition-based-waiting-example.ts imports types from another codebase, so it is reference code rather than a drop-in file.
Sources
- systematic-debugging skill folderRepositoryPrimarygithub.com
- GitHub - obra/superpowers: An agentic skills framework & software development methodology that works. · GitHubRepositoryPrimarygithub.com
- raw.githubusercontent.com/obra/superpowers/2ce8aa15d05bd57213e6f746f953aafb7ded7a8b/skills/systematic-debugging/SKILL.mdWeb
- raw.githubusercontent.com/obra/superpowers/2ce8aa15d05bd57213e6f746f953aafb7ded7a8b/skills/systematic-debugging/root-cause-tracing.mdWeb
- raw.githubusercontent.com/obra/superpowers/2ce8aa15d05bd57213e6f746f953aafb7ded7a8b/skills/systematic-debugging/defense-in-depth.mdWeb
- raw.githubusercontent.com/obra/superpowers/2ce8aa15d05bd57213e6f746f953aafb7ded7a8b/skills/systematic-debugging/condition-based-waiting.mdWeb
- raw.githubusercontent.com/obra/superpowers/2ce8aa15d05bd57213e6f746f953aafb7ded7a8b/skills/systematic-debugging/find-polluter.shWeb
- raw.githubusercontent.com/obra/superpowers/2ce8aa15d05bd57213e6f746f953aafb7ded7a8b/skills/systematic-debugging/condition-based-waiting-example.tsWeb
- raw.githubusercontent.com/obra/superpowers/2ce8aa15d05bd57213e6f746f953aafb7ded7a8b/README.mdWeb
- raw.githubusercontent.com/obra/superpowers/2ce8aa15d05bd57213e6f746f953aafb7ded7a8b/hooks/hooks.jsonWeb


