diagnosing-bugs
Skill3 starsChanged 2 months agoMITView on GitHub
Prefer reproduction before a fix. Use these phases as a feedback loop, not a rigid waterfall: a falsifiable hypothesis or targeted instrumentation may be needed to obtain the first reproduction. State what the evidence establishes and what remains uncertain. When exploring the codebase, read CONTEXT.md if it exists and follow ADRs that apply to the affected modules. Read-only inspection and reproduction may begin immediately. Before creating a harness or test, adding instrumentation, applying a fix, or making any other implementation…
193 other projects use a version of this.
Adopted by
Most recently taken up by
- ChatbotXIO/ChatbotXtheir own version, first seen Nov 9, 2026
- wowyuarm/dsh-agent-teamtheir own version, first seen Nov 8, 2026
- Contexera/dsh-agent-teamtheir own version, first seen Nov 8, 2026
- The-Vibe-Company/quivrtheir own version, first seen Nov 8, 2026
- gaoyu06/harnesstheir own version, first seen Nov 8, 2026
- DnsQueen/orcinus-skillstheir own version, first seen Nov 8, 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 43 projects that use this
RoentekSkillloop-me
Grill me about specs for the workflows I want to build, within this workspace.
Also in 55 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 58 projects that use this
AWSSkillto-questionnaire
Turn a decision you can't fully answer into a questionnaire for someone else to fill in.
Also in 88 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 56 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 122 projects that use this
- +1 more from Lesani
- +2 more from aws
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★ 309ksame name
- QuivrHQ/quivr★ 40ksame name
- The-Vibe-Company/quivr★ 40ksame name
- GreyDGL/PentestGPT★ 16ksame name
- ArcReel/ArcReel★ 6.3ksame name
- vinvcn/mattpocock-skills-zh-CN★ 5.5ksame name
- withcoral/coral★ 4.9ksame name
- bestofjs/bestofjs★ 3.1ksame name
- getsentry/sentry-react-native★ 1.8ksame name
- ChatbotXIO/ChatbotX★ 1.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 repository31 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- codebase-designSkill
- code-reviewSkill
- dispatch-ticketsSkill
- grill-with-docsSkill
- implementSkill
- improve-codebase-architectureSkill
- orchestrateSkill
- prototypeSkill
- researchSkill
- resolving-merge-conflictsSkill
- setup-omskillsSkill
- tddSkill
- to-specSkill
- to-ticketsSkill
- triageSkill
- wayfinderSkill
- cavemanSkill
- designSkill
- excalidrawSkill
- grill-meSkill
- handoffSkill
- model-routingSkill
- prompt-comprehension-auditsSkill
- teachSkill
- tmux-workerSkill
- voiceSkill
- wormholeSkill
- write-a-skillSkill
- writing-great-skillsSkill
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 10 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 180 edited versions we read keep these.
10
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Prefer reproduction before a fix.
- Very specific: line 16
When exploring the codebase, read CONTEXT.md if it exists and follow ADRs that apply to the affected modules.
- Distinctive: line 19
Read-only inspection and reproduction may begin immediately.
- Distinctive: line 59
If a reliable loop is unavailable, use captured evidence and an explicit falsifiable hypothesis to design a discriminating probe under …
- Distinctive: line 74
Use the feedback loop or captured evidence to distinguish the original symptom from nearby failures.
- Distinctive: line 78
Remove inputs, callers, configuration, data, and steps one at a time when doing so preserves the relevant failure path.
- Distinctive: line 135
When a valid seam exists:
- Distinctive: line 140
Run relevant existing checks and the original, unminimised scenario.
- Distinctive: line 142
When no faithful automated seam exists, document that limitation and use the strongest available before/after evidence.
- Distinctive: line 159
Remove owned temporary instrumentation unless retaining it was explicitly authorized.
- Distinctive: line 161
Remove throwaway harnesses or keep useful ones in a clearly marked location according to repository retention rules.
- Very specific: line 171
If the investigation exposes a durable architectural problem, explain what would prevent recurrence and recommend …
“Common” is measured: kept by at least 6 in 10 of the 180 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
Prefer reproduction before a fix. Use these phases as a feedback loop, not a rigid waterfall: a falsifiable hypothesis or targeted instrumentation may be needed to obtain the first reproduction. State what the evidence establishes and what remains uncertain.
When exploring the codebase, read CONTEXT.md if it exists and follow ADRs that
apply to the affected modules.
Read-only inspection and reproduction may begin immediately. Before creating a harness or test, adding instrumentation, applying a fix, or making any other implementation mutation, pass the adaptive Delivery mode gate. Honor topology and maintainer availability already established semantically; ask only for a materially unresolved dimension. An untracked request or exactly one selected Ticket stays with the current conversational owner through the authorized stopping point, whether the maintainer stays or authorizes work while away. Absence alone adds no readiness, Prompt Audit, or dispatcher.
Phase 1 — Establish the symptom and feedback loop
Identify the expected behavior, observed failure, relevant environment, and available evidence. Prefer one command that reaches the actual bug path and distinguishes the reported symptom from unrelated failures.
Choose the smallest useful approach:
- An existing unit, integration, or end-to-end test at a seam that reaches the bug.
- A CLI fixture, HTTP request, browser interaction, or replay of a captured event/log.
- A throwaway harness containing the minimum callers and dependencies needed to reach the failure.
- A property/fuzz run, concurrency workload, or differential comparison with recorded inputs and conditions.
- A timing harness, profiler, query plan, or bounded
git bisectinvestigation when history and evidence make it useful. - A
scripts/hitl-loop.template.shrecord when a human action is unavoidable.
Assert the symptom, not merely process success. Reduce avoidable setup and control time, random seeds, and external dependencies where practical without removing the behavior under investigation.
For intermittent bugs, record attempts or exposure, observed failures, conditions, and reproduction rate. Choose a bounded workload proportionate to the observed frequency, cost, and operational risk; no fixed number of attempts or minimum failure rate determines whether investigation may continue. Non-recurrence alone does not disprove a rare failure.
If a reliable loop is unavailable, use captured evidence and an explicit falsifiable hypothesis to design a discriminating probe under phases 3–4. Ask for missing artifacts or access only when they are genuinely needed. Production instrumentation requires appropriate authorization; do not infer it from permission to debug locally. If neither evidence nor authorized investigation can advance the question, report the concrete blocker instead of inventing a cause.
This phase is complete when the symptom and environment are identified and either a runnable feedback loop has an observed result, or the evidence gap and next authorized discriminating probe are explicit. Record commands, outcomes, and limitations; do not label an unobserved reproduction as successful.
Phase 2 — Reproduce and minimise
Use the feedback loop or captured evidence to distinguish the original symptom from nearby failures. Preserve the exact error, output difference, or timing for comparison.
Remove inputs, callers, configuration, data, and steps one at a time when doing so preserves the relevant failure path. Re-run after each meaningful reduction and restore a removed part when evidence shows it was necessary. For rare failures, account for exposure and uncertainty rather than treating one passing run as proof that a reduction removed the bug.
This phase is complete when the smallest currently supported reproduction or evidence packet is identified, with any remaining minimisation limits stated. Return to hypotheses or instrumentation when more evidence is needed; exhaustive minimisation is not a prerequisite for a useful probe.
Phase 3 — Form and test hypotheses
State the evidence-backed candidate cause and its falsifiable prediction:
If
<X>is the cause, then<changing Y>will remove the symptom or<observing Z>will distinguish it from the alternatives.
One strong hypothesis is enough to begin. Add and rank alternatives when the evidence supports them or a failed probe leaves competing explanations; do not manufacture a quota. A maintainer-supplied hypothesis is a candidate to test, not a confirmed cause.
Show the current hypothesis and planned probe concisely. Continue within established authorization without a ceremonial approval gate; ask only when the probe's scope or risk needs a new decision.
This phase is complete when each hypothesis being tested has a discriminating prediction and an authorized probe. Revise or discard it when observations contradict it.
Phase 4 — Instrument and compare
Map each probe to its prediction and change one causal variable at a time where
practical. Prefer a debugger, REPL, focused trace, profiler, or logs at the
relevant boundary over broad logging. Mark temporary instrumentation so it can
be found and removed, for example with a unique [DEBUG-a4f2] tag.
Preserve useful error context without capturing secrets or unnecessary user data. Record when instrumentation may change timing or mask the failure. Compare before and after under equivalent conditions.
For a performance regression, record a numerical baseline before claiming improvement. Use history or bisect when it helps isolate the regression; neither is mandatory when the relevant cause can be tested directly.
This phase is complete when the probe has an observed result that supports, contradicts, or narrows the hypothesis. An inconclusive result returns to investigation; it is not evidence of a fix.
Phase 5 — Fix and regression evidence
Apply the smallest correction supported by the investigation. Prefer a regression test before the fix when an available seam reaches the bug pattern through its actual callers; a test that omits the faulty ordering or coordination is not that regression test.
When a valid seam exists:
- Convert the reproduction into a test and capture its failure on the original symptom.
- Apply the fix and capture the passing result.
- Run relevant existing checks and the original, unminimised scenario.
When no faithful automated seam exists, document that limitation and use the strongest available before/after evidence. Do not fabricate a test or weaken a valid one to make the candidate pass. A candidate correction with incomplete causal verification remains explicitly provisional.
This phase is complete when the correction and applicable checks have observed results, and any remaining causal or regression-coverage uncertainty is stated.
Phase 6 — Cleanup and handoff
Before reporting completion:
- Re-run the original scenario or equivalent probe and report the result. For intermittent bugs, include exposure and observed failure counts rather than claiming that non-recurrence proves elimination.
- Report regression-test and repository-check results, or the exact missing evidence.
- Remove owned temporary instrumentation unless retaining it was explicitly authorized; preserve unrelated diagnostics and work.
- Remove throwaway harnesses or keep useful ones in a clearly marked location according to repository retention rules.
- Describe the supported cause and correction in the commit or handoff; separate confirmed evidence from remaining hypotheses.
This phase is complete when the candidate, evidence, cleanup, and remaining limitations are accounted for. A verified fix may be delivered under the repository workflow; unresolved verification must not be reported as confirmed success.
If the investigation exposes a durable architectural problem, explain what would
prevent recurrence and recommend improve-codebase-architecture when a separate
design investigation is useful. Do not automatically launch adjacent work.
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.

