diagnosing-bugs
Skill1 starsChanged 16 days agoMITView on GitHub
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.
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 repository57 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-loginSkill
- animateSkill
- app-intentsSkill
- app-store-connectSkill
- architectSkill
- arenaSkill
- blast-radiusSkill
- codebase-designSkill
- code-qualitySkill
- correctSkill
- domain-modelingSkill
- eli5Skill
- engineering-principlesSkill
- gauntlet-loopSkill
- gh-stackSkill
- goal-swarmSkill
- grillingSkill
- grill-with-docsSkill
- handoffSkill
- howSkill
- improve-codebase-architectureSkill
- ios-hapticsSkill
- koubouSkill
- mergeSkill
- orchestrationSkill
- prototypeSkill
- prSkill
- react-best-practicesSkill
- react-doctorSkill
- reframeSkill
- repo-cleanupSkill
- researchSkill
- retroSkill
- review-fix-loopSkill
- reviewSkill
- review-sweepSkill
- seoSkill
- setup-sreestackSkill
- show-dont-tellSkill
- showroomSkill
- snipsnap-do-choresSkill
- snip-snapSkill
- swift-testing-modernizationSkill
- swiftuiSkill
- tddSkill
- to-specSkill
- to-ticketsSkill
- triageSkill
- ui-designSkill
- uikitSkill
- verifySkill
- wayfinderSkill
- web-component-inspirationSkill
- whySkill
- writing-for-agentsSkill
- xcode-security-auditSkill
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 9 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 180 edited versions we read keep these.
9
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 15
Use Fix Root Causes for repair ownership and root-cause decisions, and Attack the Premise when successive fixes fail the same check.
- Very specific: line 22
Read potentially sensitive artifacts through a redacting filter so secrets become <REDACTED> before tool output enters the conversation.
- Distinctive: line 41
Follow host browser routing.
- Distinctive: line 98
provisional diagnosis: when it cannot be replayed.
- Distinctive: line 107
Run the loop repeatedly. Confirm it goes red on the user's failure rather than a nearby bug, and retain the exact error, output, or timing …
- Very specific: line 129
Prefer debugger or REPL inspection.
- Distinctive: line 143
If no correct seam exists, record the architectural limitation for the cleanup report.
- Distinctive: line 158
Search for the unique debug prefix to confirm removal.
- Distinctive: line 161
When evidence establishes a recurring failure class, pass examples and the verified cause to correct.
- Distinctive: line 166
If the decisive fact required deep investigation, propose the cheapest persistent signal that would have exposed it earlier: a health …
- Distinctive: line 170
Keep persistent signals distinct from temporary probes.
“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
Build a tight signal for the user's exact symptom, reproduce and minimise it, then test causes and repair. Skip a phase only with an explicit reason; the artifact-only path below supports diagnosis, not a verified fix.
Resolve glossary paths with glossary paths before reading or writing domain vocabulary. Read an existing glossary and relevant ADRs when exploring the affected modules. Use Fix Root Causes for repair ownership and root-cause decisions, and Attack the Premise when successive fixes fail the same check. This skill owns the runnable loop.
Protect evidence
Read potentially sensitive artifacts through a redacting filter so secrets
become <REDACTED> before tool output enters the conversation. This applies
to inspection reads as well as final reports. Build commands against environment
variables so credentials stay in the environment. Captures may contain auth
headers; quote only the lines needed for the signal. If redacted evidence is
insufficient, explain what is missing and ask the user.
Phase 1: Build a feedback loop
Spend the effort needed to make one command catch this bug. For performance work, read measurement validity before building or using a baseline, choosing a fix, or reporting comparisons.
Try these loop forms in roughly this order:
- A failing unit, integration, or end-to-end test at a seam that reaches the bug.
- Curl or an HTTP script against a running dev server.
- A CLI with fixture input and a known-good output comparison.
- A browser reproduction asserting visible state, DOM, console, or network. Follow host browser routing; in T3 Code use the collaborative preview and recovery rules before a standalone driver's allowed fallback or explicit request.
- Replay of a captured request, payload, or event log through the affected path.
- A throwaway harness with the minimal system and mocked dependencies.
- A property or fuzz loop for intermittent wrong output.
- A bisection harness checking known commit, dataset, or version states.
- A differential loop comparing versions or configurations on the same input.
- As a last resort, a human-assisted script based on
scripts/hitl-loop.template.sh, with captured observations returned to you.
Apple targets
Load the reference matching the evidence needed:
- Runtime behavior, crashes, or suspected hangs: Apple runtime.
- Slow launch, hitches, excess CPU, or other measured regressions: Apple performance. For a hang, classify and reproduce it with the runtime reference first; profile when delay needs measurement.
- Growing memory, abandoned objects, retain cycles, or memory-pressure termination: Apple memory.
These refine this loop. After establishing cause and repair, use verify for
the final Apple user workflow check.
Make the signal tight
Narrow setup and scope, assert the specific symptom, and pin time, random seeds, filesystem, and network where relevant. Aim for seconds rather than minutes. For nondeterministic failures, increase and pin the reproduction rate with repetition, concurrency, stress, or controlled timing; record the observed rate.
For timing and lifecycle failures, capture starting state, event order, and active operation identity, including relevant cancellation, replacement, and completion timing. Use Model the Domain when repairing invalid states or transitions.
Phase 1 is complete when you have run one named command and shown its redacted invocation and output. The command must be:
- Red-capable: drive the actual bug path and assert the user's exact symptom, with a verdict that can turn red on this bug and green after repair.
- Deterministic: the same verdict on repeat, or a pinned, high reproduction rate suitable for debugging a flaky bug.
- Fast: seconds, not minutes.
- Agent-runnable: unattended, with human participation only through the HITL template.
Establish this signal before forming a theory. Without it or the matching artifact below, stop before hypothesising.
When a runnable loop is unavailable
State what you tried and what prevents reproduction. Ask for access to the affected environment, a redacted captured artifact (HAR, logs, core dump, or timestamped recording), or permission for temporary production instrumentation.
An artifact capturing the exact symptom in the affected build supports a provisional diagnosis when it cannot be replayed. Skip Phases 2 and 4; use Phase 3's ranked falsifiable hypotheses and compare predictions with the artifact, code, or independent observations. Distinguish supported conclusions from untested ones. Stay on this diagnosis-only path until a runnable reproduction exists: Phase 5 and a verified-fix claim require that loop. Without a matching artifact, stop before hypotheses.
Phase 2: Reproduce and minimise
Run the loop repeatedly. Confirm it goes red on the user's failure rather than a nearby bug, and retain the exact error, output, or timing as repair evidence. For a flaky failure, confirm the reproduction rate is high enough to debug.
Shrink the scenario one input, caller, configuration, datum, or step at a time; rerun after each removal. Keep the original scenario for final verification. Finish when the failure is reproduced and every remaining element is load-bearing: removing it makes the loop green. Proceed only after both reproduction and minimisation; the provisional path skips this phase.
Phase 3: Rank falsifiable hypotheses
Generate 3–5 ranked hypotheses before testing any. For each, name a prediction: “If X causes this, changing Y will remove the failure or changing Z will worsen it.” Sharpen or discard a hypothesis without a testable prediction.
Show the ranking to the user before testing so they can supply domain knowledge or prior exclusions. Continue with that ranking while they are unavailable.
Phase 4: Probe predictions
Map each probe to a Phase 3 prediction and change one variable at a time.
Prefer debugger or REPL inspection; otherwise place targeted logs at boundaries
that distinguish hypotheses. Tag every temporary log with a unique prefix such
as [DEBUG-a4f2] so cleanup can find it. Avoid broad logging.
For performance regressions, establish the baseline with a timing harness, profiler, or query plan, then bisect. Measure before fixing; apply the shared measurement-validity requirements.
Phase 5: Fix and add a regression test
Choose a correct seam: the test must exercise the real bug pattern at its call site, including multiple callers or a triggering chain when required. A shallow test that misses the pattern cannot lock down the repair.
If no correct seam exists, record the architectural limitation for the cleanup report. If one exists:
- Turn the minimised repro into a regression test before editing the fix.
- Watch the test fail.
- Apply the repair.
- Watch the test pass.
In either case, rerun the Phase 1 loop against the original, unminimised scenario.
Phase 6: Clean up and report
Finish only when the original repro is green, the regression test passes (or its missing seam is documented), and temporary logs and throwaway prototypes are removed or the prototypes moved to a clearly marked debug location. Search for the unique debug prefix to confirm removal. State the supported cause in the result and any commit or PR message.
When evidence establishes a recurring failure class, pass examples and the verified cause to correct. Historical mining and broader prevention require that scope from the user; keep active diagnosis focused on this failure. An isolated incident supports a regression repair, not recurrence.
If the decisive fact required deep investigation, propose the cheapest persistent signal that would have exposed it earlier: a health check, counter, or structured log. Name the fact and the signal's runtime and privacy costs. Implement only within the authorized fix; otherwise report it as a follow-up. Keep persistent signals distinct from temporary probes.
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.

