two-strike-debug
Skill0 starsChanged 4 months agoMITView on GitHub
Use when anything fails — a test, build, deploy, script, or unexpected runtime behavior — BEFORE proposing a fix, and again whenever a fix attempt has just failed. Triggers: "fails", "broken", "error", "still not working", "neveikia", "lūžta", "klaida", "vis dar neveikia", "vėl ta pati klaida". Not for: code that hasn't been run yet, or mechanical lint/type complaints with obvious fixes.
In this repository9 other files it gives its agents.
- adversarial-verifySkill
- agent-fanoutSkill
- compounding-engineeringSkill
- deployment-checkSkill
- goal-contractSkill
- karpathy-guidelinesSkill
- recon-firstSkill
- universal-loopSkill
- writing-claude-mdSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
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 63
After the fix, verification-before-completion gates the "done" claim.
- Distinctive: line 64
When even re-diagnosis has failed and the user reports failure again, escalate per compounding-engineering §5: fresh context, carrying …
≈ “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
Two-Strike Debug
Triggers automatically when relevant; invoke directly with /two-strike-debug or ask, e.g. "diagnose this failure".
A fix without a confirmed diagnosis is a guess. Two failed guesses of the same kind mean the diagnosis is wrong — not the implementation.
Protocol — in order, no skipping
1. REPRODUCE deterministically. Can't reproduce → THAT is the task now,
not fixing blind.
2. READ the actual, full error output. Not your memory of a similar
error — most of the time the answer is already in the output.
3. LOCALIZE to the smallest failing unit: bisect commits, halve inputs,
instrument boundaries. Instrument BEFORE speculating.
4. HYPOTHESIZE in one sentence: "It fails because X."
Can't write that sentence → return to 3.
5. EXPERIMENT with the smallest change that tests ONLY the hypothesis.
One variable at a time.
6. FIX — and first capture the failing case as a test where
possible: red→green proves the test tests the right thing.
7. RE-VERIFY with the exact check that originally failed, then the full
gate (build + tests), not just the local one.The two-strike rule
Two fixes of the same class have failed → STOP. The bug is in your diagnosis, not your implementation. Return to step 3 assuming "my hypothesis was wrong." A third attempt at the same idea is forbidden — looping on a wrong theory is the most expensive failure mode there is.
Anti-patterns
- ✗ Pattern-match fixes — "I've seen this, it's probably X" — without reading the real output. A similar symptom is not the same cause.
- ✗ Shotgun fixes: changing several things at once. Even if it passes, you won't know why.
- ✗ Suppressing the error to get green: catch-and-ignore, loosening an assertion. Allowed only with an explicit statement of why the CHECK was wrong, not the code.
- ✗ Labeling a failure "flaky" without running it 5 times. Instability is data, not an excuse.
- ✗ Restarting / clearing / reinstalling as step 1. A state reset can mask the bug and destroy the evidence.
Relationship to other skills
- Runs inside universal-loop Step 5 (Loop): the loop counts iterations; this protocol makes each iteration count.
- After the fix, verification-before-completion gates the "done" claim.
- When even re-diagnosis has failed and the user reports failure again, escalate per compounding-engineering §5: fresh context, carrying evidence, not hypotheses.
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.

