diagnose
Skill0 starsChanged 2 months agoMITView on GitHub
Works a bug or performance regression through a gated loop — reproduce, minimise, hypothesise, instrument, fix, regression-test — without touching code before the fault is understood. Use when something is broken, throwing, failing, or slow.
193 other projects use a version of this.
Adopted by
Most recently taken up by
- agent-services-at/pluginstheir own version, first seen Nov 8, 2026
- Eclipter/agentstheir own version, first seen Nov 8, 2026
- venhdev/skillstheir own version, first seen Nov 8, 2026
- ishandutta2007/Awesome-Claude-Skillstheir own version, first seen Nov 8, 2026
- DeevsDeevs/agent-systemtheir own version, first seen Nov 8, 2026
- pedrohcgs/claude-code-my-workflowtheir own version, first seen Nov 8, 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 61 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 56 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 53 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
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 44 projects that use this
AnasX7Skillsetup-pre-commit
Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.
Also in 27 projects that use this
- +4 more from simo97
Other versions193 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 193
- github/awesome-copilot★ 41ksame name
- epicenter-md/epicenter★ 4.8ksame name
- EpicenterHQ/epicenter★ 4.8ksame name
- CherryHQ/cherry-studio-app★ 4.1ksame name
- pedrohcgs/claude-code-my-workflow★ 1.7ksame name
- formancehq/ledger★ 1.5ksame name
- getagentseal/founder-playbook★ 745same name
- victorgarciaesgi/regle★ 508same name
- amazingloft999-droid/mattpocock-skills★ 422same name
- openvetta/open-vetta★ 302same 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 repository16 other files it gives its agents.
- adversarial-reviewSkill
- changelogSkill
- cve-patchSkill
- docs-driftSkill
- good-readmeSkill
- improve-designSkill
- improve-seoSkill
- janitorSkill
- kickoffSkill
- nta-scanSkill
- refactor-oopSkill
- repo-reconSkill
- software-architectureSkill
- spec-driven-devSkill
- stack-adviseSkill
- your-skill-nameSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 174 edited versions we read keep these.
5
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 34
Prefer a failing test; fall back to a script or a request against a locally running instance.
- Distinctive: line 69
No code changes before step 5, other than temporary instrumentation.
- Distinctive: line 75
Never mutate real state to reproduce: use a disposable database, fixture, or process, never a live one.
- Distinctive: line 77
Do not weaken or delete a failing test to make the suite green.
- Distinctive: line 79
If you cannot get past a gate, report where you stopped and what you have.
“Common” is measured: kept by at least 6 in 10 of the 174 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
Goal
The root cause of one defect, proven by a reproduction that goes red before the fix and green after it, with a regression test that keeps it that way.
Context
Check first:
- The symptom. If the operator has not described one, find it: a failing test, a red CI job, a stack trace in the logs, an open issue. Get the exact error text, the input that triggers it, and the expected behaviour before doing anything else. If you cannot find one, ask, and go no further until you have it.
- How the project runs its tests and a single test in isolation, so the feedback loop is seconds rather than minutes.
- Whether the bug is new: a release, tag, or commit where it did not happen. A known-good point makes it a regression, and step 3 can bisect it.
- Existing tests near the fault. They show how the code is meant to be exercised and where a regression test belongs.
Steps
Each step is a gate. Do not move on until it has produced what it says.
- Reproduce. Get a command that fails, reliably, for the reason reported. Prefer a failing test; fall back to a script or a request against a locally running instance. For a slowdown, the command is a timing or benchmark, run enough times to tell the difference from noise. If you cannot reproduce it, stop and report what you tried — a fix for a bug you cannot see is a guess.
- Minimise. Shrink the input, the setup, and the code path until the smallest thing that still fails remains. Strip everything the failure does not depend on. The minimal case is what becomes the regression test.
- Hypothesise. Write down one specific claim about the cause — which line,
which value, which ordering — and what observation would prove it wrong.
"Something in the parser" is not a hypothesis; "
parse()treats an empty string as the end of input at line 142" is. For a regression, bisect first:git bisect start <bad> <good>, thengit bisect run <repro>with the step 1 command (exit 0 is good, 125 skips a commit that will not build), thengit bisect reset. It needs a clean working tree. The commit it names narrows the hypothesis to that diff. - Instrument. Test the hypothesis with evidence, not by reading harder: a debugger, a print of the actual value at the suspect point, an assertion, a profiler for a regression in speed. If the evidence disproves it, return to step 3 with what you learned. Remove instrumentation before the fix lands.
- Fix. Change the smallest thing that corrects the cause you proved, not the symptom you saw. If the true fix is large or touches a design decision, stop and say so with the evidence rather than patching around it.
- Regression-test. Turn the minimal case from step 2 into a permanent test beside the existing ones. Confirm it fails with the fix reverted and passes with it applied, then run the full suite. For a slowdown, the test is a benchmark with a threshold the slow code fails, with enough margin not to flake in CI. Where no stable threshold exists, record the before and after measurements and the command that took them instead.
In plan mode, stop before the first edit, which is usually step 4's instrumentation. The plan is the reproduction, the hypothesis, and how you will instrument, fix, and test it.
Constraints
- No code changes before step 5, other than temporary instrumentation. A fix attempted before the cause is proven is a second bug waiting to happen.
- One defect per run. If you find another on the way, note it under Also found and leave it.
- The fix touches only what the cause requires. No drive-by refactors, renames, formatting, or "while I was here" cleanups.
- Never mutate real state to reproduce: use a disposable database, fixture, or process, never a live one.
- Do not weaken or delete a failing test to make the suite green. If a test is wrong, say why with evidence and let the operator decide.
- If you cannot get past a gate, report where you stopped and what you have. A partial diagnosis with evidence is worth more than a complete one without.
Done when
The regression test fails on the pre-fix code and passes on the post-fix code (or, for a slowdown with no stable threshold, before and after measurements are recorded), the full suite passes, and the diff contains only the fix and the test.
Output
- Symptom — what was reported, quoted.
- Reproduction — the exact command that failed, and its output.
- Cause — the line or interaction at fault as
path:line, and the evidence that proved it. List hypotheses that were tested and ruled out. - Fix — what changed and why that is the cause and not the symptom.
- Regression test — where it lives, and confirmation it went red then green; for a slowdown without one, the measurements and their command.
- Also found — other defects noticed and left alone.
- Stopped at — if a gate could not be passed: which one, what was tried, and what would get through it.
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.

