debug
Skill2 starsChanged 14 days agoMITView on GitHub
The agent-craft debugging method for TypeScript, React, and Next.js — reproduce, localize top-down (page → section → primitive), map references both ways, trace to the root cause (asking where, why, and how for wrong-value bugs), and account for the blast radius before fixing. Use whenever the user reports a bug, regression, crash, flaky behavior, "wrong value", "it used to work", or asks why something renders or computes incorrectly, even when they only ask for a quick fix.
192 other projects use a version of this.
Adopted by
Most recently taken up by
- PeanutGT/NutsSkillstheir own version, first seen Nov 8, 2026
- jskswamy/skillstheir own version, first seen Nov 8, 2026
- Firzus/agent-skillstheir own version, first seen Nov 8, 2026
- domengabrovsek/agent-configtheir own version, first seen Nov 8, 2026
- domengabrovsek/claudetheir own version, first seen Nov 8, 2026
- microsoft/veronatheir own version, first seen Nov 8, 2026
Used with
Projects with it also use add-discord, add-slack and 10 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.
MicrosoftSkilladd-discord
Add Discord bot channel integration via Chat SDK.
Also in 11 projects that use this
MicrosoftSkilladd-slack
Add Slack channel integration via Chat SDK.
Also in 11 projects that use this
- +10 more from microsoft
Other versions192 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 192
- Yeachan-Heo/oh-my-claude-sisyphus★ 41ksame name
- Yeachan-Heo/oh-my-claudecode★ 41ksame name
- anthropics/knowledge-work-plugins★ 35ksame name
- gavrielc/nanoclaw★ 31ksame name
- nanocoai/nanoclaw★ 31ksame name
- qwibitai/nanoclaw★ 31ksame name
- openai/symphony★ 27ksame name
- FalkorDB/FalkorDB★ 10ksame name
- NVIDIA/TensorRT-Model-Optimizer★ 5.6ksame name
- NVIDIA/Model-Optimizer★ 5.6ksame name
182 more not listed
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 repository9 other files it gives its agents.
- templates/CLAUDE.mdCLAUDE.md
- componentSkill
- conventionsSkill
- featureSkill
- formSkill
- nextjs-pageSkill
- planSkill
- reviewSkill
- serviceSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 175 edited versions we read keep these.
4
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 12
No fix without a reproduction: If you can't reproduce it, say so and ask for the input, route, or account state that triggers it.
- Distinctive: line 31
Stop at the first place where correct input becomes wrong output.
- Distinctive: line 46
If some consumers depend on the broken behavior, the shared code was two things.
- Distinctive: line 51
Every consumer from step 4 still behaves: typecheck, tests, and a look at the screens that share the code.
“Common” is measured: kept by at least 6 in 10 of the 175 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
agent-craft Debug
A bug is found by narrowing its location, fixed by tracing its cause, and shipped after checking who else it touches. Work the five steps in order and report in the format at the end.
Gates
- No fix without a reproduction. If you can't reproduce it, say so and ask for the input, route, or account state that triggers it.
- No edit before the root cause is named as "correct input becomes wrong output at
file:linebecause <assumption that doesn't hold>". - No edit to shared code before its consumers are listed (step 4).
- No flag added to a shared function so two callers can disagree. That is two functions.
1. Localize: walk the tree down
Reproduce, then narrow along page → section → primitive. At each level ask whether the bug still reproduces below this point, and descend. The result is the defect site: where the bug shows, not yet where it lives. If localizing takes more than a few jumps, report that as a traceability finding too.
2. Gather: map references both ways
- Inbound: grep the defect file's import path. With direct imports and no barrels,
rg "components/date-range-picker"is the complete consumer list. - Outbound: its imports — hooks, services, context, constants.
3. Trace: follow references to the cause
Walk outbound from the defect site toward the data: component → hook → action or service → http. The bug usually lives where a decision is made, not where its result renders.
- The
'Error in <fn>::'log prefix tells you which layer produced a failure. - Stop at the first place where correct input becomes wrong output. That is the bug; everything after it is symptom.
Wrong-value bugs: where, why, how
A crash comes with a stack trace; a wrong value doesn't. At each site on the path from step 2, ask:
- Where does this value come from? Every transform between the boundary and the render is a candidate: the parser, a
??default, a cast, anew Date(...), a.find(), a cache, an optimistic overlay. - Why is it shaped this way here? Each transform assumes something (this field is always present, this string is a date, this list has the row). Name the assumption; the one that fails for this input is the bug.
- How does each consumer read it? A value that is correct at the source but read in the wrong unit, shape, or timezone by one consumer is a coupling bug; take it to step 4.
4. Blast radius: account before fixing
- List every consumer of the file you are about to change (step 2's grep, run on the cause file).
- For each one: does the fix change a contract it relies on, or only the broken behavior?
- Fix once at the shared root rather than patching each caller.
- If some consumers depend on the broken behavior, the shared code was two things. Split it into two functions; don't add a flag.
5. Verify
- The original reproduction is clean.
- Every consumer from step 4 still behaves: typecheck, tests, and a look at the screens that share the code.
- A regression test sits next to where the decision lives, not where the symptom rendered.
- The diff holds only the fix and its test.
Report format
Reproduction: <route / input / state> → <observed> (expected <…>)
Defect site: <file:line> — where it shows
Root cause: <file:line> — <assumption that doesn't hold for this input>
Blast radius: <N consumers of the cause file> — <unchanged | contract change: …>
Fix: <one line>
Regression: <test file> — <what it pins>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.

