debug-failure
Skill1 starsChanged 3 months agoMITView on GitHub
Track a failure to its root cause and fix it. Use when something is broken — "this is failing", "why is X broken", "fix this error", "debug X", "X throws Y", "the tests are failing", "it stopped working", "I'm getting an error", "this crashes". Use it for any report of behaviour that is wrong, rather than a request for behaviour that is new.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- 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
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- yaohuangguan/remote-arc★ 5same 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 repository6 other files it gives its agents.
- build-newSkill
- explain-codeSkill
- plan-approachSkill
- review-diffSkill
- update-featureSkill
- write-testsSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
5
Distinctive
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 17
Read the whole error — stack frame, message, and the line it names — or, where there is no error, the exact wrong output.
- Distinctive: line 32
Run the new test, then the whole suite, and remove any logging you added.
- Distinctive: line 40
If git diff or recent commits touch the failing path, look there first — a failure that started recently usually started with a change.
- Distinctive: line 42
If two hypotheses both fit, say which you tested and what ruled the other out.
- Distinctive: line 43
If you cannot reproduce it, do not change code.
“Common” is measured: kept by at least 6 in 10 of the 4 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
Debug a failure
Debug this: $ARGUMENTS. If that is empty, work from the user's last message.
How to work
- Reproduce it first. Run the failing command or test and read the actual output. A fix for a failure you have not seen is a guess. If the command destroys or changes anything beyond its own output (it deletes, deploys, migrates, sends or charges), do not run it again: reproduce from the logs, a dry run or a copy, or ask.
- Read the whole error — stack frame, message, and the line it names — or, where there is no error, the exact wrong output. Then read the code that produced it.
- Form one hypothesis that explains all of the evidence, including anything that looks irrelevant. Check it before writing a fix: add a log line, run a narrower test, inspect the state. If the user asked only why it is broken, stop here: remove any logging you added, report the cause and the fix you would make, and apply it when they ask.
- Unless an existing test already fails on this bug, write a test that reproduces the failure and watch it fail. If no test can express it (a build, a config, an environment), or the project has no test setup, say so and keep the failing output.
- Fix the cause, not the symptom. Silencing the error, widening a catch, or hard-coding the reported input is not a fix. Handling a boundary the code should always have handled is. Never get to green by weakening, skipping or deleting a failing test; if the test itself is wrong, show why and change only the part of it that is wrong (setup, call or assertion).
- Run the new test, then the whole suite, and remove any logging you added. Where no test expresses the failure, run the command from step 1 again and show its output now; if that command must not be run again, say the fix is unverified against the original failure and give the user the command.
Rules
- Change one thing at a time. Two simultaneous edits mean you do not know which worked.
- If
git diffor recent commits touch the failing path, look there first — a failure that started recently usually started with a change. - If two hypotheses both fit, say which you tested and what ruled the other out.
- If you cannot reproduce it, do not change code. Report what you tried, the most likely cause, and the fix you would propose. If the user then asks for that fix anyway, apply it and label it unverified.
Report back
State the root cause in one sentence, the fix, the regression test, and the evidence: the failing output before, and after it the test command with its summary line, or the re-run command and its output. Name any test you changed and why. A fix applied without reproducing the failure is unverified, and the report says so.
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.

