diagnosing-bugs
Skill0 starsChanged 3 months agoMITView on GitHub
A diagnostic loop for difficult bugs and performance problems. Use when the owner says “fix this bug,” “diagnose,” or “debug,” or when something is broken, failing, slow, or strange. Six phases: reproduce → minimize → hypothesize → instrument → fix → follow up. (Adapted from mattpocock/skills diagnosing-bugs, MIT)
123 other projects use a version of this.
Adopted by
Most recently taken up by
- mattpocock/skillstheir own version, first seen Oct 8, 2026
- saintdle/agentflowtheir own version, first seen Oct 6, 2026
- rafaelob/pragmatic-agent-skillstheir own version, first seen Oct 5, 2026
- AlexisBalayre/claude-code-configtheir own version, first seen Oct 5, 2026
- KroxiDev/engineering-skillstheir own version, first seen Oct 5, 2026
- michielvandermeer/skillstheir own version, first seen Oct 4, 2026
Used with
Projects with it also use wizard, writing-beats 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.
AWSSkillwizard
Generate an interactive bash wizard that walks a human through steps only they can perform. Use when provisioning infrastructure, setting up credentials or CI secrets, walking an unfamiliar third-party dashboard, or running a one-off migration or cutover. Don't invoke this for steps the agent can perform itself.
Also in 57 projects that use this
RoentekSkillwriting-beats
Writing, exploit — assemble raw material into a journey of beats, grounding each term before a beat leans on it.
Also in 23 projects that use this
loulanyueSkillsetup-ts-deep-modules
Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.
Also in 16 projects that use this
AWSSkillask-matt
Ask which skill or flow fits your situation. A router over the skills in this repo.
Also in 35 projects that use this
RoentekSkillwriting-shape
Writing, exploit — shape raw material into an article, paragraph by paragraph.
Also in 21 projects that use this
- +5 more from aws
- +2 more from Roentek
Other versions123 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 123
- mattpocock/skills★ 335ksame name
- vinvcn/mattpocock-skills-zh-CN★ 4.6ksame name
- getsentry/sentry-react-native★ 1.8ksame name
- getsentry/sentry-dart★ 873same name
- stevesolun/ctx★ 588same name
- nodetool-ai/nodetool★ 551same name
- chrisdoc/hevy-mcp★ 498same name
- mxyhi/ok-skills★ 492same name
- aws/graph-explorer★ 484same name
- devcxl/mattpocock-skills-zh★ 426same name
113 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 repository6 other files it gives its agents.
- grill-meSkill
- grill-with-docsSkill
- motion-formulasSkill
- qcSkill
- quiet-renderSkill
- release-gateSkill
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 115 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 8
Do not merely “try a fix.” First build a loop that reproduces and verifies the bug automatically.
- Distinctive: line 16
Use the loop to reproduce the exact symptom the owner saw.
- Distinctive: line 20
Before testing, rank three to five hypotheses.
- Distinctive: line 28
When possible, preserve the reproduction case before changing the code.
“Common” is measured: kept by at least 6 in 10 of the 115 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
diagnosing-bugs — The reproduction loop is 90% of the work
Do not merely “try a fix.” First build a loop that reproduces and verifies the bug automatically. Do not fix by guesswork.
Phase 1 — Build the feedback loop (the core step)
First build a reproduction loop that detects the bug automatically (priority: failing test > dry-run script > frame/log inspection). Make it fast, deterministic, and runnable by the agent itself. “Once the loop is right, 90% of the bug is solved.”
Phase 2 — Reproduce and minimize
Use the loop to reproduce the exact symptom the owner saw. Then remove unnecessary elements one at a time until you have a minimal reproduction.
Phase 3 — Form testable hypotheses
Before testing, rank three to five hypotheses. Write each in falsifiable form: “If X is the cause, changing Y will make the bug disappear.”
Phase 4 — Instrument
Measure only the specific prediction you are testing: debugger, targeted logs, or direct data output. Do not spray logs everywhere.
Phase 5 — Fix and prevent regression
When possible, preserve the reproduction case before changing the code. After the fix, verify it with the same loop.
Phase 6 — Clean up and follow up
Confirm that the original symptom no longer reproduces, remove debugging instrumentation, and record the prevention lesson in the relevant rulebook. Add a “do not remove” comment to defensive code.
(This loop found five bugs in one of our sourcing engines: a rate-limit surge, seed explosion, score-string crash, retry loop, and batched-response JSON failure. Each went through reproduce → hypothesize → fix → verify.)
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.

