agentleFS
jazzpujols34jazzpujols34/claude-skills/skills/debug-loop-breaker/SKILL.md

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.

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
  1. Distinctive:

    If you notice any of these signals appearing twice or more in a conversation, stop coding and switch to this protocol:

    line 12
  2. Distinctive:

    Do not write another line of code until you finish steps 2-5.

    line 29
  3. Distinctive:

    If you don't have it, ask the user: *"Can you paste the exact error output?"*

    line 35
  4. Distinctive:

    Write out every assumption the current approach relies on.

    line 39
  5. Distinctive:

    Create the smallest possible reproduction:

    line 75
  6. Distinctive:

    If you can't reproduce it in isolation, the bug is in the interaction between components — now you know where to look.

    line 81
  7. Distinctive:

    If you can't articulate the hypothesis, you don't understand the bug yet.

    line 89
  8. Distinctive:

    Run the reproduction case from step 5.

    line 93
  9. Distinctive:

    If you've done 3 single-change-and-verify cycles and it's still broken:

    line 100
  10. Distinctive:

    Do not apologize. Do not say "let me try one more thing." Present the evidence and ask for help.

    line 120
  11. Distinctive:

    3 failed attempts is the hard limit: Don't let the agent (or yourself) try a 4th variation of the same approach.

    line 138

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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_URL is 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)

PatternWhat's actually happeningInstead
Changing 3 things at onceShotgun debugging — you won't know which one fixed itOne change per cycle
"Let me try..." with no hypothesisGuessingState what you expect and why before touching code
Re-reading the same fileHoping new insight materializesRead 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 itOptimism-driven developmentRun after every change
Blaming the framework/libraryEgo protection99% 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.