debug-failure
Skill1 starsChanged 36 days agoMITView on GitHub
Use when a command fails or the runtime misbehaves and you don't have a root cause yet. Before touching code, see the error unfiltered, reproduce it, and find the ROOT CAUSE with file:line — one fix at a time, and re-validate the hypothesis if it doesn't clear the symptom. Your stack's error patterns go in the user-section.
6 other projects use a version of this.
Adopted by
Most recently taken up by
- bInference-Lab/bInferencetheir own version, first seen Nov 29, 2026
- kishormorol/promptaliastheir own version, first seen Nov 16, 2026
- yaohuangguan/remote-arctheir own version, first seen Nov 1, 2026
- Remote-Arc/remote-arctheir own version, first seen Nov 1, 2026
- yaohuangguan/agent-playbooktheir own version, first seen Nov 1, 2026
- SauravSrivastav/claude-code-production-startertheir own version, first seen Jun 6, 2026
Used with
Projects with it also use audit-test-suite, change-data-safely and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
yaohuangguanSkillaudit-test-suite
Find where an existing test suite is weak and decide what to test next, ranked by risk. Use this when asked to add missing tests, find gaps, raise coverage, assess test quality or see which areas are thin, even if the request only mentions a coverage percentage.
Also in 3 projects that use this
yaohuangguanSkillchange-data-safely
Change a database schema or stored data without breaking running code or losing data. Use this for any migration, new or changed column, backfill, bulk update, delete, index, or change to a stored format, including in small projects. Data mistakes are often impossible to undo.
Also in 3 projects that use this
MicrosoftSkillfix-flaky-test
Reproduces and fixes flaky or quarantined tests. Tries local reproduction first (fast), then falls back to CI reproduce workflow (reproduce-flaky-tests.yml). Use this when asked to investigate, reproduce, debug, or fix a flaky test, a quarantined test, or an intermittently failing test.
Also in 3 projects that use this
dabstractorSkillwrite-pull-request
Write a pull request to an open source repository. Lead with the user-facing problem in a personal voice, then a scannable technical fix. Use when opening or drafting a PR or contribution.
Also in 3 projects that use this
Codagent-AISkillimplement-change
Implements an approved change in one continuous session, with tiered test runs. Use when asked to implement a change from its approved definition, or to invoke codagent:implement-change.
Also in 3 projects that use this
- +6 more from yaohuangguan
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- yaohuangguan/remote-arc★ 5same name
- bInference-Lab/bInference★ 2same name
- kishormorol/promptalias★ 1same name
- Remote-Arc/remote-arc★ 1same name
- yaohuangguan/agent-playbook★ 1same name
- SauravSrivastav/claude-code-production-starter★ 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 repository41 other files it gives its agents.
- AGENTS.mdAGENTS.md
- patient/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- patient/CLAUDE.mdCLAUDE.md
- author-skillSkill
- context-intakeSkill
- dominioSkill
- follow-up-prsSkill
- locate-codeSkill
- master-planSkill
- plan-advancedSkill
- plan-simpleSkill
- pytestSkill
- quality-attributesSkill
- resolve-ticketSkill
- review-diffSkill
- scoped-gateSkill
- secure-by-designSkill
- security-invariantsSkill
- solution-designSkill
- spec-bootstrapSkill
- verify-before-doneSkill
- author-skillSkill
- context-intakeSkill
- debug-failureSkill
- dominioSkill
- follow-up-prsSkill
- locate-codeSkill
- master-planSkill
- plan-advancedSkill
- plan-simpleSkill
- pytestSkill
- quality-attributesSkill
- resolve-ticketSkill
- review-diffSkill
- scoped-gateSkill
- secure-by-designSkill
- security-invariantsSkill
- solution-designSkill
- spec-bootstrapSkill
- verify-before-doneSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 32
In the main agent: ask the user directly with the same four items — symptom, tried hypotheses + results, next hypothesis + evidence — and a …
- Distinctive: line 39
One fix at a time: Never mix a real fix with a "preventive" change — it hides which one worked and blocks a clean bisect.
- Very specific: line 42
Don't add logs/try-catch/fallbacks to "cover": instead of understanding — that hides the bug, it doesn't fix it.
“Common” is measured: kept by at least 6 in 10 of the 6 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
<!-- navori:managed id="debug-failure-base" hash="59054bb9" version="0.12.3" source="@navori/core" fmkeys="name,description,metadata" -->Debug failure — the one cycle
A failure is not a mandate to change code. This skill forces diagnosis before any fix, and forces a hypothesis re-check when the fix doesn't clear the symptom.
The trigger is "I don't know why it failed yet", not the size of the output. Measured across 57 audited sessions and 281 failed commands, the median failure is 7 lines long — a three-line failure you can't explain earns the same protocol as a long one.
The cycle (in order)
- See the error unfiltered. The exit code is not evidence. Check the command you just ran:
2>/dev/nulldiscards the error stream,| tail -5may have cut the line that matters, and a wrapper can swallow a child's stderr. Re-run it unfiltered before diagnosing. Diagnosing from a truncated stream is how a fix gets aimed at the wrong error. - Reproduce it. No fix without a repro you can run again in this turn — "it probably is X" without a rerun is not a diagnosis. If it only reproduces in prod/staging and not locally, that itself is a fact about the cause (env var, cache, data, a different backend).
- Find the ROOT cause,
file:line. Separate error from chatter first (progress lines, warnings and logs with no stack are not the failure). Classify the type — types/compiler, lint, build, runtime, or blocked by a hook/permission rule (read the reason, never work around the guard) — each has a distinct cause shape. One root error usually cascades into the rest (a missing import breaks everything downstream): find that one, not each symptom. When the failure crosses components (request → service → data layer → response → render), instrument each border with what enters and what leaves, and compare stage to stage to see where the shape changes or data goes missing — that border is where the root cause lives. - Apply a single fix against the root cause found in step 3, then re-run and re-classify. Don't fire several fixes at once against the symptoms, and don't bundle an unrelated "improvement" into the same change.
- If the fix doesn't clear the symptom on the first post-fix repro, stop patching and re-validate the hypothesis — don't escalate with a second patch on top of the first. Re-read the original symptom (literally, not from memory), state the diff you applied in one sentence ("changed X in file:line from Y to Z because W"), and check whether W logically implies the symptom should be gone. If it should and isn't, the model of the flow is incomplete — there's a step you're not seeing (caching, a different runtime side, a middleware, stale state). Pick ONE new hypothesis before touching code again.
- After two failed attempts on the same bug, stop and escalate — the channel depends on where you're running:
- Inside a subagent (no way to ask the user): report
BLOCKEDin your handoff file, with the original symptom, each hypothesis tried, its applied fix and its repro result, and the hypothesis you'd try next with the evidence behind it. The caller decides, you don't invent a fourth patch. - In the main agent: ask the user directly with the same four items — symptom, tried hypotheses + results, next hypothesis + evidence — and a concrete question ("do you know more context that supports or refutes this?").
- Inside a subagent (no way to ask the user): report
Once step 4's repro is clean, apply verify-before-done before declaring the fix complete — this skill validates the SYMPTOM is gone, verify-before-done validates the rest of the gate still is.
Rules
- No fix without a root cause.
file:lineplus why it fails, not "it probably is X". - One fix at a time. Never mix a real fix with a "preventive" change — it hides which one worked and blocks a clean bisect.
- Don't fix symptoms that disappear on their own once the root is fixed.
- Warning ≠ error — a warning doesn't block; don't spend the turn on it unless asked.
- Don't add logs/try-catch/fallbacks to "cover" instead of understanding — that hides the bug, it doesn't fix it.
- "It's flaky" needs evidence of real flakiness, not a shrug after one failed rerun.
Red flags (stop)
- About to make a second change on the same line without having re-run the repro.
- About to write "now it should work" without fresh evidence from this turn.
- Reverting and re-applying variations of the same change.
- The diff accumulates more than 3 attempts on the same file for the same symptom.
<!-- /navori:managed id="debug-failure-base" -->Your stack's error patterns
<!-- user: document here the recurring errors of YOUR toolchain and their fix, for instant triage. Suggestions:
- Specific noise filters (build/runner lines that are NOT errors).
- Typical errors with their cause + fix (e.g. codegen not run, server/client boundary, import path/alias, missing env).
- Regeneration/validation commands (codegen, migrations) that resolve entire categories of errors.
- Known race conditions or caches specific to this repo (CDN, redis, browser SW, build cache).
-->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.

