debug-loop
Skill4 starsChanged 8 months agoMITView on GitHub
Autonomous debugging workflow: reproduce the failure, isolate the highest-leverage blocker, fix it, rerun, and prove success with runtime evidence. Use this skill when the user reports a bug, a test failure, a crash, a startup error, a build failure, or says anything like: "it's broken", "not working", "error", "crash", "fix this", "debug", "why does this fail", "help me find the bug", "it worked before", or when you encounter an error during implementation that needs systematic debugging. Also use when launching an app for the first time and verifying it runs correctly.
- Reads credentials
- Deletes or force-pushes
- Installs packages
4 other projects use a version of this.
Adopted by
Most recently taken up by
- proffesor-for-testing/agentic-qetheir own version, first seen Oct 25, 2026
- archiforge/agent-crafttheir own version, first seen Oct 20, 2026
- tyroneross/claude-code-debuggertheir own version, first seen Sep 7, 2026
- bt2go/claude-skillstheir own version, first seen Aug 1, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- proffesor-for-testing/agentic-qe★ 524same name
- tyroneross/claude-code-debugger★ 2same name
- archiforge/agent-craft★ 0same name
- bt2go/claude-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 repository4 other files it gives its agents.
- implementSkill
- lean-typescriptSkill
- roadmapSkill
- spec-drivenSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. 0 are common, 16 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
16
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 37
Before touching code, gather information:
- Distinctive: line 50
Run the exact command the user ran (or the exact action that triggers the bug).
- Distinctive: line 59
If it doesn't reproduce:
- Distinctive: line 60
Check environment differences (Node version, OS, env vars)
- Distinctive: line 61
Ask for exact reproduction steps
- Distinctive: line 85
When the root cause isn't obvious:
- Distinctive: line 100
Prefer upstream fixes over downstream workarounds
- Distinctive: line 101
If the fix is >10 lines, pause and reconsider — you might be fixing the wrong thing
- Distinctive: line 118
Run the exact same command from Phase 2.
- Distinctive: line 120
If the original error is gone but a new one appears → go back to Phase 3 (isolate the new blocker).
- Distinctive: line 122
If the error persists → your fix was wrong.
- Distinctive: line 131
Test output showing green passes
- Distinctive: line 141
When launching an app for the first time, the debug loop becomes a verification loop:
- Very specific: line 144
Check for missing env vars (.env.example vs .env)
- Very specific: line 145
Run build (pnpm build) — fix any type/compile errors
- Very specific: line 146
Run dev server (pnpm dev) — verify it starts
- Very specific: line 148
Run tests (pnpm test) — verify test suite passes
- Distinctive: line 162
Never debug runtime issues if the app won't even start.
- Distinctive: line 168
When debugging is complete, report:
- Distinctive: line 185
Downstream workarounds: instead of upstream fixes — masks the real problem
“Common” is measured: kept by at least 6 in 10 of the 4 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
Debug Loop
Prove the root cause before fixing. Every debug session follows the same loop until the problem is solved or you run out of hypotheses to test.
The Loop
1. CONTEXT → Read error messages, logs, recent changes
2. REPRODUCE → Run the exact command/action that fails
3. ISOLATE → Find the single highest-leverage blocker
4. FIX → Apply the minimal fix (one change at a time)
5. RERUN → Run the exact same command/action again
6. PROVE → Show runtime evidence of successRepeat steps 3-6 until all blockers are resolved. Never skip REPRODUCE or PROVE.
Phase 1: Context
Before touching code, gather information:
- Read the error — the full stack trace, not just the first line
- Check recent changes —
git diff HEAD~3or recent file modifications - Read the config — package.json scripts, tsconfig, env files
- Check dependencies —
node_modulesexists? Lock file matches?
The error message usually tells you where to look. Read it carefully.
Phase 2: Reproduce
Run the exact command the user ran (or the exact action that triggers the bug).
# Whatever they told you, run it verbatim first
pnpm dev
pnpm test
pnpm buildIf it doesn't reproduce:
- Check environment differences (Node version, OS, env vars)
- Ask for exact reproduction steps
- Try
rm -rf node_modules && pnpm installfor dependency issues
You cannot fix what you cannot reproduce.
Phase 3: Isolate
You likely see multiple errors. Don't fix them all at once. Find the first domino:
Priority ladder
- Missing dependency / import error — nothing works until this is fixed
- Type error at build time — prevents compilation
- Runtime crash on startup — app never reaches functional state
- Runtime error on action — specific feature is broken
- Wrong behavior — works but produces incorrect results
- Performance issue — works correctly but too slow
Fix from the top. Lower-priority issues often disappear when higher ones are resolved.
Isolation technique
When the root cause isn't obvious:
- Binary search — comment out half the code, does it still fail?
- Minimal reproduction — extract the failing code into a standalone file
- Dependency elimination — does it fail with mocked dependencies?
- Git bisect — which commit introduced the regression?
Phase 4: Fix
Apply the minimal fix that addresses the root cause:
- Fix the cause, not the symptom
- Change one thing at a time
- Prefer upstream fixes over downstream workarounds
- If the fix is >10 lines, pause and reconsider — you might be fixing the wrong thing
Common fix patterns
| Symptom | Likely cause | Fix |
Cannot find module | Missing dep or wrong import path | pnpm add X or fix path |
TypeError: X is not a function | Wrong import (default vs named) | Check the library's export |
EADDRINUSE | Port already occupied | Kill existing process or change port |
Type 'X' is not assignable | Schema/type mismatch after change | Update the type or the usage |
CORS error | Server doesn't allow origin | Add CORS headers server-side |
Module not found in build | Missing from dependencies (in devDependencies) | Move to correct section |
Phase 5: Rerun
Run the exact same command from Phase 2. Not a different one. Not a subset.
If the original error is gone but a new one appears → go back to Phase 3 (isolate the new blocker).
If the error persists → your fix was wrong. Revert it. Go back to Phase 3 with new information.
Phase 6: Prove
Show runtime evidence that the fix works:
- Terminal output showing clean startup
- Test output showing green passes
- Browser/app screenshot showing the feature working
- HTTP response showing correct data
"I think it should work now" is not proof. Run it and show the output.
Launch Verification (for first-time startup)
When launching an app for the first time, the debug loop becomes a verification loop:
- Install dependencies (
pnpm install) - Check for missing env vars (
.env.examplevs.env) - Run build (
pnpm build) — fix any type/compile errors - Run dev server (
pnpm dev) — verify it starts - Hit the main endpoint/UI — verify it responds
- Run tests (
pnpm test) — verify test suite passes
Each step that fails enters the debug loop until resolved.
Separate Launcher from Runtime Bugs
Launcher bugs prevent the app from starting at all. Fix these first:
- Missing env vars, wrong Node version, missing deps, port conflicts, bad config
Runtime bugs appear after startup. Fix these second:
- Broken features, wrong data, UI issues, API errors
Never debug runtime issues if the app won't even start.
Handoff Summary
When debugging is complete, report:
## Debug Summary
- **Problem**: [1-sentence description of the original issue]
- **Root cause**: [what actually caused it]
- **Fix**: [what you changed, with file paths]
- **Evidence**: [command + output proving it works]
- **Regression risk**: [low/medium/high + what to watch for]Anti-Patterns
- Fixing without reproducing — you're guessing, not debugging
- Fixing multiple things at once — you won't know which fix worked
- Downstream workarounds instead of upstream fixes — masks the real problem
- Reading code instead of running code — theories need runtime evidence
- Ignoring the stack trace — it literally tells you where the bug is
- "It works on my machine" — reproduce in the exact failing environment
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.

