debug-loop-breaker
Skill0 starsChanged 5 months agoMITView on GitHub
Use when debugging has gone in circles — same error 2+ times, repeated failed fixes. Auto-trigger on "still not working", "same error", "try again" appearing twice in a session. Stops guessing, forces systematic diagnosis.
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- llms.txtllms.txt
- annotateSkill
- deploy-checklistSkill
- goalSkill
- growth-playbookSkill
- security-scannerSkill
- seo-auditSkill
- svg-diagramSkill
- tdd-disciplineSkill
- teaching-modeSkill
- verify-frontend-changeSkill
- SKILL_NAMESkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 11 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
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
- Distinctive: line 12
If you notice any of these signals appearing twice or more in a conversation, stop coding and switch to this protocol:
- Distinctive: line 29
Do not write another line of code until you finish steps 2-5.
- Distinctive: line 35
If you don't have it, ask the user: *"Can you paste the exact error output?"*
- Distinctive: line 39
Write out every assumption the current approach relies on.
- Distinctive: line 75
Create the smallest possible reproduction:
- Distinctive: line 81
If you can't reproduce it in isolation, the bug is in the interaction between components — now you know where to look.
- Distinctive: line 89
If you can't articulate the hypothesis, you don't understand the bug yet.
- Distinctive: line 93
Run the reproduction case from step 5.
- Distinctive: line 100
If you've done 3 single-change-and-verify cycles and it's still broken:
- Distinctive: line 120
Do not apologize. Do not say "let me try one more thing." Present the evidence and ask for help.
- Distinctive: line 138
3 failed attempts is the hard limit: Don't let the agent (or yourself) try a 4th variation of the same approach.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Debug Loop Breaker
Break out of repeated failed fixes. Triggered when the user says "still", "again", "same error", "not working", or "try again" for the 2nd+ time in a session.
Detection
If you notice any of these signals appearing twice or more in a conversation, stop coding and switch to this protocol:
- "still not working"
- "same error"
- "try again"
- "that didn't fix it"
- "again" (in the context of a persistent bug)
- You yourself are about to say "let me try..." for the 3rd time
You are in a debugging loop. More code will not save you. Slow down.
The Protocol
1. STOP
Say it out loud: "We're going in circles. Switching to the debug loop protocol."
Do not write another line of code until you finish steps 2-5.
2. STATE the actual error
Paste the exact error message or unexpected behavior. Not a summary. Not "it's failing". The literal output.
If you don't have it, ask the user: "Can you paste the exact error output?"
3. LIST assumptions
Write out every assumption the current approach relies on. Be paranoid. Examples:
- The server is running on port 3000
- The env var
DATABASE_URLis set and correct - The file was saved after the last edit
- The function is actually being called (not a dead code path)
- The dependency version matches what we expect
- The build picked up the latest changes
4. VERIFY each assumption
For every assumption above, run a concrete command. Not "I believe" — actually check.
# Is the server running?
lsof -i :3000
# Is the env var set?
echo $DATABASE_URL
# Is the file saved with our changes?
grep -n "the line we changed" path/to/file
# Is this code path even hit?
# Add a console.log / print and check output
# What version is installed?
npm ls <package> / pip show <package>Mark each assumption as CONFIRMED or BUSTED.
Any BUSTED assumption is your likely root cause. Fix that first.
5. ISOLATE
Create the smallest possible reproduction:
- A single test that fails
- A curl command that returns the wrong response
- A 5-line script that triggers the bug
If you can't reproduce it in isolation, the bug is in the interaction between components — now you know where to look.
6. SINGLE CHANGE
Make exactly one change. State your hypothesis before changing anything:
"I think X is happening because Y. Changing Z should fix it because..."
If you can't articulate the hypothesis, you don't understand the bug yet. Go back to step 4.
7. VERIFY
Run the reproduction case from step 5. Did it pass?
- Yes -> Run the full original test/flow to confirm. Done.
- No -> Back to step 6. This counts as one cycle.
8. ESCALATE (after 3 cycles)
If you've done 3 single-change-and-verify cycles and it's still broken:
I'M STUCK.
What we know:
- [confirmed assumptions]
- [what each attempt changed and why it didn't work]
What we've ruled out:
- [list]
My best remaining theories:
1. [theory + what would confirm it]
2. [theory + what would confirm it]
What I need from you:
- [specific question or access request]Do not apologize. Do not say "let me try one more thing." Present the evidence and ask for help.
Anti-Patterns (call these out when you catch yourself)
| Pattern | What's actually happening | Instead |
| Changing 3 things at once | Shotgun debugging — you won't know which one fixed it | One change per cycle |
| "Let me try..." with no hypothesis | Guessing | State what you expect and why before touching code |
| Re-reading the same file | Hoping new insight materializes | Read a different file — the bug is probably elsewhere |
| Assuming infra is fine | "The DB is definitely running" | Prove it. Run the command. |
| Editing code without running it | Optimism-driven development | Run after every change |
| Blaming the framework/library | Ego protection | 99% of the time it's your code |
Gotchas
- The most common false assumption is "the server restarted." Hot reload doesn't always pick up changes to env vars, config files, or new dependencies. When in doubt, kill and restart.
- The agent loves to re-read the same file hoping for new insight. If you've read a file twice and the bug isn't there, the bug is in a different file. Follow the data flow upstream.
- "Works in dev, breaks in prod" is almost always env vars or CORS. Check those before anything else.
- 3 failed attempts is the hard limit. Don't let the agent (or yourself) try a 4th variation of the same approach. Escalate or pivot.
One-Liner Version
STOP -> STATE the error -> LIST assumptions -> VERIFY each one -> ISOLATE smallest repro -> ONE change with a hypothesis -> VERIFY -> after 3 fails, ESCALATE with evidence.
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.

