diagnosing-bugs
Skill0 starsChanged 20 days agoMITView on GitHub
Diagnoses a hard bug or performance regression in <app> by building a red-capable feedback loop first, then minimising, ranking hypotheses, instrumenting one variable at a time and fixing the root cause.
193 other projects use a version of this.
Adopted by
Most recently taken up by
- quarkiverse/quarkus-reactive-messaging-nats-jetstreamtheir own version, first seen Nov 30, 2026
- Rain-kl/OpenFlaretheir own version, first seen Nov 30, 2026
- Forget-C/Jellyfishtheir own version, first seen Nov 29, 2026
- 27Aaron/skillstheir own version, first seen Nov 29, 2026
- swimmesberger/Elariontheir own version, first seen Nov 29, 2026
- MarkTripoli/skillstheir own version, first seen Nov 29, 2026
Used with
Projects with it also use setup-ts-deep-modules, loop-me 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.
liufeng1976Skillsetup-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 54 projects that use this
RoentekSkillloop-me
Grill me about specs for the workflows I want to build, within this workspace.
Also in 66 projects that use this
LesaniSkillwriting-beats
Shape an article as a journey of beats, choose-your-own-adventure style. The user picks a starting beat from the raw material, you write only that beat, then offer options for where to pivot next, beat by beat, until the article reaches a natural end. Use when the user has raw material and wants to assemble it as a narrative rather than an argument.
Also in 71 projects that use this
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 149 projects that use this
LesaniSkillwriting-shape
Take a markdown file of raw material and shape it into an article through a conversational session — drafting candidate openings, growing the piece paragraph by paragraph, arguing about format (lists, tables, callouts, quotes) at each step. Use when the user has a pile of notes, fragments, or a rough draft and wants help turning it into something publishable.
Also in 68 projects that use this
richard12511Skillclaude-handoff
Hand the current conversation off to a fresh background agent that picks up the work immediately.
Also in 51 projects that use this
- +1 more from Lesani
Other versions193 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 193
- mattpocock/skills★ 335ksame name
- QuivrHQ/quivr★ 40ksame name
- The-Vibe-Company/quivr★ 40ksame name
- GreyDGL/PentestGPT★ 16ksame name
- mdiri-ai/SoduWork★ 9.1ksame name
- Forget-C/Jellyfish★ 7.5ksame name
- ArcReel/ArcReel★ 6.8ksame name
- vinvcn/mattpocock-skills-zh-CN★ 6.2ksame name
- withcoral/coral★ 5ksame name
- bestofjs/bestofjs★ 3.1ksame name
183 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 repository24 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- add-linux-packagingSkill
- add-sliceSkill
- add-viewSkill
- claim-checkSkill
- clean-room-rebuildSkill
- corpus-retrievalSkill
- domain-modelingSkill
- graphifySkill
- grillingSkill
- learnSkill
- planSkill
- platform-portSkill
- researchSkill
- reviewSkill
- shipSkill
- specSkill
- tddSkill
- verified-statusSkill
- visual-reviewSkill
- qt-best-practicesSkill
- qt-portSkill
- qt-reviewSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 6 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 182 edited versions we read keep these.
6
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 20
Do NOT activate this skill when:
- Distinctive: line 49
If the bug is non-deterministic, raise the reproduction rate (loop the trigger, parallelise, narrow the timing window, add stress) until it …
- Distinctive: line 59
Write the regression test before the fix, and only at a seam that exercises the real bug pattern.
- Distinctive: line 62
After applying the fix, re-run the original, un-minimised scenario.
- Distinctive: line 63
Never claim a fix works without a passing run of the original loop.
- Distinctive: line 64
If no loop can be built, stop and say so: list what was tried and ask for access to a reproducing environment, a redacted capture, or …
“Common” is measured: kept by at least 6 in 10 of the 182 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
<app> Diagnosing Bugs skill
Reusable workflow for finding the cause of a hard bug or performance regression. An agent invokes this skill; the requester supplies the symptom, the skill supplies the loop.
When to Activate
Activate this skill when something in <app> is broken and the cause is not
already visible: a stack trace nobody has read, a wrong value, a test that
fails for no clear reason, a request that takes too long, a regression that
appeared between two known states.
Do NOT activate this skill when:
- The cause is known and the task is the fix (go straight to the change).
- The request is feature work rather than a defect (use
plan). - The request is to review a diff (use
review).
Core Principles
- The feedback loop is the skill. A tight pass/fail signal that goes red on THIS bug is what finds the cause; staring at code is not.
- Red before theory. No hypothesis is allowed before one command exists that can fail on this exact symptom, and that command has been run at least once.
- Minimise, then hypothesise. A minimal repro shrinks the suspect set and becomes the regression test.
- Hypotheses come as a ranked list of three to five, each stating the prediction it makes. A hypothesis with no prediction is a vibe.
- One variable per probe. Each probe maps to one stated prediction.
- Fix the root cause where all callers route through it, not the path the report happened to name.
- Measure first for performance work: a baseline before a change, a bisect before a guess.
- Redact secrets before showing commands, output or captured artifacts.
Rules
- The loop must be red-capable (it asserts the requester's exact symptom, not "did not crash"), deterministic, fast (seconds, not minutes) and agent-runnable. Show the invocation and its output before moving on.
- If the bug is non-deterministic, raise the reproduction rate (loop the trigger, parallelise, narrow the timing window, add stress) until it is debuggable. A one-percent flake is not a loop.
- Minimise by cutting inputs, callers, config and data one at a time, re-running after each cut. Every remaining element must be load-bearing: removing any one of them turns the loop green.
- List the ranked hypotheses and show them to the requester before testing. Proceed with the ranking if the requester is away.
- Change one variable at a time. Never "log everything and grep".
- Tag every debug log with a unique prefix so cleanup is one grep.
- Write the regression test before the fix, and only at a seam that exercises the real bug pattern. If no such seam exists, that absence is the finding: report it instead of writing a shallow test.
- After applying the fix, re-run the original, un-minimised scenario. Never claim a fix works without a passing run of the original loop.
- If no loop can be built, stop and say so: list what was tried and ask for access to a reproducing environment, a redacted capture, or permission to add temporary instrumentation. Do not hypothesise without a loop.
- Redact every secret in the commands, outputs and artifacts shown: replace it in place and quote only the lines that carry the signal.
- State the confirmed cause in the commit message, so the next debugger starts from the truth.
Research References
| Claim | Source | Year | Link |
| The red-loop sequence: feedback loop, minimise, hypothesise, instrument, fix, cleanup | mattpocock/skills, skills/engineering/diagnosing-bugs/SKILL.md | 2026 | skills/engineering/diagnosing-bugs/SKILL.md |
| A seam must exercise the real bug pattern or the regression test gives false confidence | mattpocock/skills, skills/engineering/diagnosing-bugs/SKILL.md | 2026 | skills/engineering/diagnosing-bugs/SKILL.md |
| The gate ladder that has to be green before a change lands | PLAYBOOK_TESTS.md | - | PLAYBOOK_TESTS.md |
| Secrets never enter the repository, the logs or the settings files | PLAYBOOK_SECURITY.md | - | PLAYBOOK_SECURITY.md |
Output Format
Deliver, in order:
- The feedback loop: the exact command, its redacted output, and why it is red-capable for this symptom.
- The minimised repro: the smallest scenario that still goes red.
- The ranked hypotheses, each with its prediction.
- The probe results, one variable per probe, and which hypothesis was confirmed or eliminated.
- The root cause in one sentence, then the fix.
- The regression test at the chosen seam, or the missing-seam finding.
- The cleanup status: original repro green, regression test green, debug instrumentation removed.
Example:
diagnosing-bugs: loop = `ctest -R note_sync --output-on-failure`
(red: expected 1 sync call, got 0) | hypothesis 1 confirmed | fix: the sync
port dispatches on the committed event, not the request | regression test
added at the use-case seamDoes 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.

