diagnose
Skill1 starsChanged 35 days agoMITView on GitHub
Structured debugging loop for hard bugs: feedback loop → reproduce → hypothesize → instrument → fix → regression test. Use when: '/diagnose', 'debug this', 'why is this broken', 'this is failing', 'this throws', 'performance regression', 'flaky test', or any bug that isn't immediately obvious.
195 other projects use a version of this, 97 of them edited.
Adopted by
Most recently taken up by
- gandolh/my-personal-skillstheir own version, first seen Nov 29, 2026
- theishandubey/dotclaudetheir own version, first seen Nov 29, 2026
- gregale-dev/gregale-cursor-plugintheir own version, first seen Nov 29, 2026
- hcb2019/claude-code-skillsedited, first seen Nov 29, 2026
- Uniterra-Solutions/tidy-up-your-thoughtstheir own version, first seen Nov 29, 2026
- jiuyang5354/skillsedited, first seen Nov 29, 2026
Used with
Projects with it also use zoom-out, to-prd 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.
victorgarciaesgiSkillzoom-out
Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.
Also in 66 projects that use this
GoogleSkillto-prd
Turn the current conversation into a PRD and publish it to the project issue tracker — no interview, just synthesis of what you've already discussed.
Also in 63 projects that use this
GoogleSkillto-issues
Break a plan, spec, or PRD into independently-grabbable issues on the project issue tracker using tracer-bullet vertical slices.
Also in 56 projects that use this
simo97Skillwrite-a-skill
Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, or build a new skill.
Also in 49 projects that use this
simo97Skilledit-article
The user will invoke this skill to help them edit an article.
Also in 17 projects that use this
kennethkeimSkillubiquitous-language
Extract a DDD-style ubiquitous language glossary from the current conversation, flagging ambiguities and proposing canonical terms. Saves to UBIQUITOUS_LANGUAGE.md. Use when user wants to define domain terms, build a glossary, harden terminology, create a ubiquitous language, or mentions "domain model" or "DDD".
Also in 17 projects that use this
- +4 more from simo97
- +1 more from google
Other versions195 projects use a version of this.
Word for word · 0
None found.
Edited · 97
- formancehq/ledger★ 1.5k32% same
- victorgarciaesgi/regle★ 51734% same
- openvetta/open-vetta★ 51534% same
- amazingloft999-droid/mattpocock-skills★ 42234% same
- InditexTech/weavejs★ 27734% same
- letehaha/moneymatter★ 27134% same
- yamcodes/arkenv★ 15134% same
- alex-on-ai/WebReaper★ 14934% same
- aurorasoft2/Matt_Pocock_Skills★ 13334% same
- javimosch/supercli★ 5834% same
87 more not listed
Wrote their own version · 98
- github/awesome-copilot★ 42ksame name
- CherryHQ/cherry-studio-app★ 4.1ksame name
- pedrohcgs/claude-code-my-workflow★ 1.7ksame name
- getagentseal/founder-playbook★ 745same name
- microsoft/AutoSaddler★ 261same name
- avibebuilder/claude-prime★ 119same name
- KerberosClaw/kc_ai_skills★ 80same name
- skillberry-ai/cap-evolve★ 71same name
- tranhieutt/software_development_department★ 71same name
- TserenTserenov/FMT-exocortex-template★ 65same name
88 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 repository14 other files it gives its agents.
- appinsights-instrumentationSkill
- csharp-toolkitSkill
- delegateSkill
- deploy-verifySkill
- documentation-writerSkill
- flywheelSkill
- grill-meSkill
- javascript-typescript-jestSkill
- microsoft-docsSkill
- nuget-managerSkill
- performance-optimizationSkill
- python-fastapi-pytestSkill
- sql-toolkitSkill
- tddSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 178 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 10
When exploring the codebase, use the project's domain glossary (CONTEXT.md) to get a clear mental model of the relevant modules.
- Distinctive: line 42
Stop and say so. List what you tried.
- Distinctive: line 48
Run the loop. Watch the bug appear.
- Distinctive: line 64
If you cannot state the prediction, the hypothesis is a vibe — discard or sharpen.
- Distinctive: line 75
Never "log everything and grep"
- Distinctive: line 83
Write the regression test BEFORE the fix (if a correct seam exists)
“Common” is measured: kept by at least 6 in 10 of the 178 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
Diagnose
A discipline for hard bugs. Skip phases only when explicitly justified.
When exploring the codebase, use the project's domain glossary (CONTEXT.md) to get a clear mental model of the relevant modules.
Phase 1 — Build a Feedback Loop
This is the skill. Everything else is mechanical. If you have a fast, deterministic, agent-runnable pass/fail signal for the bug, you will find the cause. If you don't have one, no amount of staring at code will save you.
Spend disproportionate effort here. Be aggressive. Be creative. Refuse to give up.
Ways to construct one (try in this order):
- Failing test at whatever seam reaches the bug — unit, integration, e2e
- HTTP script (curl/httpx) against a running dev server
- CLI invocation with fixture input, diffing stdout against known-good
- Headless browser (Playwright) — drives UI, asserts on DOM/console/network
- Replay captured trace — save a real request/payload, replay through code path
- Throwaway harness — minimal subset of system exercising the bug path
- Property/fuzz loop — for "sometimes wrong output", run 1000 random inputs
- Bisection harness — automate
git bisect runbetween known-good and bad states - Differential loop — same input through old vs new version, diff outputs
Iterate on the loop:
- Can I make it faster? (Cache setup, skip unrelated init, narrow scope)
- Can I make the signal sharper? (Assert on the specific symptom, not "didn't crash")
- Can I make it more deterministic? (Pin time, seed RNG, isolate filesystem)
Non-deterministic bugs:
Loop the trigger 100×, parallelize, add stress, narrow timing windows. A 50%-flake is debuggable; 1% is not — keep raising the rate.
When you cannot build a loop:
Stop and say so. List what you tried. Ask the user for: (a) access to the reproducing environment, (b) a captured artifact (HAR, log dump, screen recording), or (c) permission to add temporary instrumentation.
Do not proceed to Phase 2 until you have a loop you believe in.
Phase 2 — Reproduce
Run the loop. Watch the bug appear. Confirm:
- The loop produces the failure mode the user described — not a different nearby failure
- The failure is reproducible across multiple runs
- You captured the exact symptom (error message, wrong output, timing)
Do not proceed until you reproduce.
Phase 3 — Hypothesize
Generate 3–5 ranked hypotheses before testing any of them. Single-hypothesis generation anchors on the first plausible idea.
Each hypothesis must be falsifiable:
Format: "If {X} is the cause, then {action Y} will make the bug disappear / make it worse."
If you cannot state the prediction, the hypothesis is a vibe — discard or sharpen.
Show the ranked list to the user before testing (they often have domain knowledge that re-ranks instantly). Don't block on it — proceed with your ranking if user is AFK.
Phase 4 — Instrument
Each probe must map to a specific prediction from Phase 3. Change one variable at a time.
Tool preference:
- Debugger / REPL inspection (one breakpoint beats ten logs)
- Targeted logs at boundaries that distinguish hypotheses
- Never "log everything and grep"
Tag every debug log with a unique prefix: [DEBUG-xxxx]. Cleanup = single grep.
For performance regressions: logs are usually wrong. Establish baseline measurement (timing harness, profiler, query plan), then bisect. Measure first, fix second.
Phase 5 — Fix + Regression Test
- Write the regression test BEFORE the fix (if a correct seam exists)
- Watch it fail
- Apply the fix
- Watch it pass
- Re-run the Phase 1 feedback loop against the original scenario
Correct seam = test exercises the real bug pattern as it occurs at the call site. If no correct seam exists, note it — the codebase architecture is preventing lockdown. Flag for /flywheel or architecture review.
Phase 6 — Cleanup + Post-mortem
Before declaring done:
- Original repro no longer reproduces (re-run Phase 1 loop)
- Regression test passes (or absence of seam documented)
- All
[DEBUG-...]instrumentation removed - Throwaway prototypes deleted
- Hypothesis that was correct is stated in commit message
Then ask: what would have prevented this bug? If the answer involves architectural change, hand off to /flywheel with specifics. Make the recommendation after the fix, not before — you have more information now.
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.

