diagnosing-bugs
Skill0 starsChanged 32 days agoMITView on GitHub
Diagnoses a hard <app> bug or performance regression with a red-capable feedback loop, a minimised repro, ranked falsifiable hypotheses, targeted instrumentation, and a regression test.
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 repository23 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- add-handlerSkill
- add-moduleSkill
- claim-checkSkill
- clean-room-rebuildSkill
- corpus-retrievalSkill
- depguard-guardSkill
- domain-modelingSkill
- graphifySkill
- grillingSkill
- learnSkill
- ownership-authorSkill
- planSkill
- researchSkill
- reviewSkill
- shipSkill
- specSkill
- tddSkill
- verified-statusSkill
- nodejs-best-practicesSkill
- nodejs-portSkill
- nodejs-reviewSkill
The file
We split this skill into the rules it gives an agent
7 rules. 1 is common, 5 are distinctive, and 1 is very specific to this project.
1
Common
Most of the 182 edited versions we read keep these.
5
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
- Very specific: line 24
Do NOT activate this skill when the cause is already known and the work is the fix itself (go straight to /tdd), or when the request is a …
- Distinctive: line 34
Tighten the loop: Treat it as a product: faster (cache setup, narrow scope), sharper (assert the exact symptom, not "did not crash"), more …
- Distinctive: line 45
One variable at a time: Every probe maps to one prediction.
- Distinctive: line 57
Never proceed to hypothesis without a loop.
- Distinctive: line 64
Prefer a debugger or REPL inspection over logs.
- Common: line 68
Write the regression test before the fix, but only at a correct seam: one where the test exercises the real bug pattern as it occurs at the …
- Distinctive: line 72
No fabricated data: never invent a stack trace, a log line, a timing, a file path or a command output that was not actually observed.
“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 diagnosis loop for hard bugs and performance regressions in
<app>. An agent invokes this skill; the agent supplies domain judgement, the skill supplies the phase discipline.
When to Activate
Activate this skill when a bug in <app> is hard to pin down: a wrong
result, a crash, a hang, or a performance regression. Typical triggers:
- The request says "diagnose", "debug this", "why does this fail", or reports something broken, throwing, failing or slow.
- A test fails intermittently, or only in CI, or only under load.
- A regression appeared between two known states (a commit, a migration, a dependency bump) and the cause is not obvious.
Do NOT activate this skill when the cause is already known and the work is
the fix itself (go straight to /tdd), or when the request is a code
review of a known diff (use /review).
Core Principles
- The feedback loop is the skill. Everything else consumes it. Build one command that goes red on this bug and green once fixed, before forming any theory. Reading code to build a theory first is the failure this skill prevents.
- Tighten the loop. Treat it as a product: faster (cache setup, narrow scope), sharper (assert the exact symptom, not "did not crash"), more deterministic (pin time, seed randomness, isolate the filesystem, freeze the network). A 30-second flaky loop is barely better than no loop.
- Reproduce, then minimise. Cut inputs, callers, config, data and steps one at a time, re-running the loop after each cut, until every remaining element is load-bearing (removing any one turns the loop green). The minimised repro is the regression test later.
- Rank before testing. Generate 3 to 5 hypotheses and make each falsifiable ("if X is the cause, then changing Y makes the bug disappear"). A hypothesis whose prediction cannot be stated is a vibe.
- One variable at a time. Every probe maps to one prediction. For performance regressions, measure a baseline first (timing, profiler, query plan) and bisect; logs are usually the wrong tool.
- The symptom, not a neighbour. The loop must reproduce what the user described. Catching a different nearby failure means fixing the wrong bug.
Rules
- Redact every secret before showing commands, output or captured
artifacts: write
<REDACTED>in place of the value, build loops against environment variables so credentials stay in the environment, and quote only the lines carrying the signal (captured traces carry auth headers). - Never proceed to hypothesis without a loop. If no loop can be built, say so explicitly, list what you tried, and ask for access to the reproducing environment, a redacted captured artifact (HAR, log dump, core dump, timestamped recording), or permission to add temporary instrumentation.
- For non-deterministic bugs, aim for a higher reproduction rate, not a clean repro: loop the trigger, parallelise, add stress, narrow timing windows. A 50% flake is debuggable, 1% is not.
- Prefer a debugger or REPL inspection over logs; one breakpoint beats ten log lines. Never "log everything and grep".
- Tag every temporary debug log with a unique prefix such as
[DEBUG-a4f2]so cleanup is one grep. Untagged logs survive. - Write the regression test before the fix, but only at a correct seam: one where the test exercises the real bug pattern as it occurs at the call site. If no correct seam exists, that absence is the finding and must be reported, not worked around with a shallow test.
- No fabricated data: never invent a stack trace, a log line, a timing, a file path or a command output that was not actually observed.
Research References
| Claim | Source | Year | Link |
| Diagnosis phases, loop-first discipline and falsifiable-hypothesis rule | skills/engineering/diagnosing-bugs/SKILL.md (upstream, MIT) | 2026 | local file |
| Node test runner selection for a single failing case | node --test --test-name-pattern | n/a | local tool |
Output Format
Raw structured prose, not a code fence:
### <app> diagnosis, <symptom in one line>
Loop: <one command>, red: <observed failure> | green after fix: <expected>
Minimised repro: <the smallest failing scenario>
Hypotheses (ranked): 1. <hypothesis>, predicts: <prediction>
Probes run: <probe> → <result> (supports/refutes <hypothesis n>)
Root cause: <the hypothesis that survived>
Fix: <what changed, where>
Regression test: <file>:<test> at seam <seam> | no correct seam exists: <why>
Cleanup: [DEBUG-*] logs removed: <yes/no> | throwaway harnesses removed: <yes/no>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.

