diagnosing-bugs
Skill4 starsChanged 11 days agoMITView on GitHub
Diagnosis loop for hard bugs and performance regressions. Use when asked to diagnose or debug, or when a hard bug needs a reproducible feedback loop.
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 3 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
ryotaroh180105Skillclaude-handoff
Hand the current conversation off to a fresh background agent that picks up the work immediately.
Also in 41 projects that use this
simo97Skillmigrate-to-shoehorn
Migrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace `as` in tests, or needs partial test data.
Also in 54 projects that use this
FabienDehopreSkilldecision-mapping
Turn a loose idea into a sequenced map of investigation tickets, then drive them to resolution one at a time.
Also in 6 projects that use this
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 repository117 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- accessibilitySkill
- agent-watchdogSkill
- aipSkill
- animateSkill
- animation-performanceSkill
- animation-vocabularySkill
- ask-benSkill
- ask-sonnerSkill
- bazelSkill
- bend-lawsSkill
- blast-radiusSkill
- brain-dumpSkill
- break-uiSkill
- ci-fixesSkill
- codebase-designSkill
- codex-compatSkill
- codexSkill
- commit-push-prSkill
- connect-querySkill
- create-verification-skillSkill
- demoSkill
- development-lifecycleSkill
- docsSkill
- dogfoodSkill
- domain-modelingSkill
- e2e-testingSkill
- effect-tsSkill
- effect-v3-to-v4Skill
- efficient-frontierSkill
- eli5Skill
- excalidraw-diagramSkill
- extend-harnessSkill
- frontend-invariantsSkill
- frontend-starter-kitSkill
- full-sendSkill
- gesturesSkill
- golang-reviewSkill
- golangSkill
- goSkill
- grillingSkill
- handoffSkill
- hook-auditSkill
- implement-specSkill
- improve-animationsSkill
- improve-codebase-architectureSkill
- improveSkill
- launchdarklySkill
- lie-detectorSkill
- maintain-verification-skillSkill
- make-pr-easy-to-reviewSkill
- mobile-nativeSkill
- plan-arbiterSkill
- plow-aheadSkill
- postgresqlSkill
- primeSkill
- productSkill
- protobufSkill
- prototypeSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. 1 is common, 6 are distinctive, and 0 are very specific to this project.
1
Common
Most of the 180 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 50
No red-capable command, no Phase 2.
- Distinctive: line 54
Run the loop; Call the Skill tool with "dogfood" at the reporter's real entrypoint.
- Distinctive: line 74
Prefer debugger/REPL. React: inspection.
- Common: line 76
Never log everything and grep.
- Distinctive: line 83
Write the regression test before the fix at the correct seam.
- Distinctive: line 90
Call the Skill tool with "dogfood" for the identical user journey, then re-run the original unminimised Phase 1 loop.
- Distinctive: line 97
All debug instrumentation is removed.
“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
For defects or failed repairs, read Poteto.
Skip a phase only with reason. Use GLOSSARY.md (follow GLOSSARY-MAP.md when present) and ADRs; for third-party, API, or version drift, Call the Skill tool with "read-the-damn-docs" before ranking hypotheses.
Other hosts: dependency loading.
Redact
Replace every secret with <REDACTED>. Keep credentials in environment variables; quote only signal-bearing lines. Artifacts may contain auth headers. If redaction hides evidence, ask for a safer source.
Phase 1 -- Build a feedback loop
The feedback loop is the skill. Build a deterministic, agent-runnable pass/fail loop for the exact bug. Read code to construct it, not invent theories.
Strategies, roughly in order
- Failing test at the highest seam that reaches the bug: unit, integration, or E2E.
- Curl or HTTP script against the running service.
- CLI invocation with fixture input and a known-good stdout diff.
- Headless browser script that asserts DOM, console, or network behavior.
- Captured trace replay: request, payload, event log, or other real artifact.
- Throwaway harness: the smallest system slice that reaches the bug with one call.
- Property or fuzz loop for intermittent wrong output.
- Bisection harness suitable for
git bisect run. - Differential loop comparing old/new versions or configurations on the same input.
- HITL script from
scripts/hitl-loop.template.shonly when a human must act.
UI content/layout failures: Call the Skill tool with "break-ui" for schema-valid fixtures. Pin the failing fixture through the real component into this loop; retain original input for post-fix replay.
Tighten the loop
- Cache setup; skip unrelated initialization.
- Assert the exact symptom, not just "did not crash."
- Pin time, seeds, filesystem state and network inputs.
For nondeterministic bugs, raise the reproduction rate: repeat under controlled stress, parallelize, and narrow timing windows until the rate distinguishes hypotheses.
Without a loop, stop, list attempts, and request the missing environment, redacted artifact, or safe temporary instrumentation permission.
Completion criterion: a tight loop that goes red
Name one command already run at least once, with redacted invocation and output:
- Red-capable: drives the actual path and asserts the user's exact symptom.
- Deterministic: returns the same verdict, or a pinned high reproduction rate.
- Fast: seconds rather than minutes.
- Agent-runnable: unattended, except through the structured HITL script.
No red-capable command, no Phase 2.
Phase 2 -- Reproduce + minimise
For stateful bugs, capture the original replay packet before minimization. Run the loop; Call the Skill tool with "dogfood" at the reporter's real entrypoint. Confirm:
- The loop produces the failure the user described, not a nearby failure.
- It reproduces across multiple runs, or often enough to debug.
- It captures the exact symptom Phase 5 must disprove.
Minimise inputs, callers, configuration, data, and steps one at a time; rerun after each cut. Finish when every remaining element is load-bearing: removing any one makes the loop green. Retain this reproduction for the regression test; only then proceed.
Phase 3 -- Hypothesise
Generate 3-5 ranked, falsifiable hypotheses before testing; one hypothesis anchors on the first plausible idea. Each must predict what change makes the symptom disappear or worsen. Show the list so domain knowledge can rerank it, but continue when the user is unavailable. Discard claims without a testable prediction.
Phase 4 -- Instrument
Map each probe to one prediction. Change one variable at a time. Two repairs sharing a premise fail the same gate: return to Phase 3; run Poteto's premise probe before retrying.
- Prefer debugger/REPL. React: inspection.
- Log only boundaries that distinguish hypotheses.
- Never log everything and grep.
Prefix temporary logs, for example [DEBUG-a4f2], so cleanup can grep every match. For
performance, establish a measured baseline with a timing harness, profiler, or query plan,
then bisect. Measure first, fix second.
Phase 5 -- Fix + regression test
Write the regression test before the fix at the correct seam. It must exercise the real bug pattern and call chain; a nearby shallow unit gives false confidence. If no suitable seam exists, record that architecture gap. Otherwise:
- Turn the minimised reproduction into a failing test and observe RED. For forced RED, diff the mutation against a pristine copy; restore before testing the fix.
- Apply the smallest root-cause fix and observe GREEN.
- Run related checks.
- Call the Skill tool with "dogfood" for the identical user journey, then re-run the original unminimised Phase 1 loop.
Phase 6 -- Cleanup
Before declaring done:
/dogfoodconfirms the exact user reproduction no longer fails; the original loop passes.- The regression test passes, or the missing seam is documented.
- All debug instrumentation is removed; grep the unique prefix.
- Throwaway artifacts are deleted or clearly isolated.
- The proven root cause is recorded in the commit or PR.
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.

