agentleFS
ProjectWajaProjectWaja/claude-skillcraft/skills/debug-circuit/SKILL.md

debug-circuit

Skill0 starsChanged 6 months agoMITView on GitHub

Circuit breaker for debug loops — after 3 failed fixes, forces a strategic pause and new approach. Use when a fix keeps failing or you are retrying the same thing.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    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:

    Stop brute-forcing. If the same approach fails three times, the approach is wrong.

    line 14
  2. Distinctive:

    Do NOT try a 4th variation of the same approach.

    line 28
  3. Distinctive:

    Do not reset the counter by making trivial changes.

    line 53
  4. Distinctive:

    When reporting to the user, be transparent: "This is attempt 3 and I'm not making progress.

    line 54
  5. Distinctive:

    If the user says "keep trying," acknowledge their preference, but still present the reframe before continuing.

    line 55

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

Stop brute-forcing. If the same approach fails three times, the approach is wrong.

The Circuit Breaker

Track Attempts

Mentally track each debug attempt for a given issue:

  • Attempt 1: Try the most likely fix. If it fails, note what you learned.
  • Attempt 2: Try a different fix informed by attempt 1. If it fails, note what you learned.
  • Attempt 3: Try one more variation. If it fails — STOP.

When the Circuit Breaks (3 failures)

Do NOT try a 4th variation of the same approach. Instead:

  1. Summarize what you know. List every attempt, what happened, and what it ruled out.
  2. Reframe the problem. The bug might not be where you think it is. Common reframes:
    • "Maybe it's not a code bug — check config, environment, or data"
    • "Maybe the error message is misleading — trace the actual execution path"
    • "Maybe the test is wrong, not the code"
    • "Maybe the dependency version changed behavior"
  3. Propose a different approach. At least two alternatives. Present them to the user.
  4. Ask for help if stuck. "I've tried X, Y, and Z. None worked. Here's what I've ruled out. What am I missing?"

Reset Conditions

The circuit resets when:

  • The user provides new information
  • You identify a genuinely different root cause
  • You switch to a fundamentally different approach (not a variation of the same one)

Why This Matters

Debug loops are the #1 cost sink in AI-assisted coding. A 30-second pause to rethink saves 30 minutes of circular debugging. The discipline of stopping is more valuable than the cleverness of the next attempt.

Rules

  • Count failed attempts honestly. A "fix" that creates a new error counts as a failure.
  • Do not reset the counter by making trivial changes. Adding a console.log is not a new approach.
  • When reporting to the user, be transparent: "This is attempt 3 and I'm not making progress. Let me step back."
  • If the user says "keep trying," acknowledge their preference, but still present the reframe before continuing.

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.