diagnose
Skill2 starsChanged 3 days agoApache-2.0View on GitHub
Find the cause of a hard bug or regression. Use when stuck on a known bug, unexplained test failure, flaky CI or performance regression.
195 other projects use a version of this.
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-skillstheir own version, first seen Nov 29, 2026
- Uniterra-Solutions/tidy-up-your-thoughtstheir own version, first seen Nov 29, 2026
- jiuyang5354/skillstheir own version, 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 · 0
None found.
Wrote their own version · 195
- github/awesome-copilot★ 42ksame 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★ 517same name
- openvetta/open-vetta★ 515same name
- amazingloft999-droid/mattpocock-skills★ 422same name
- InditexTech/weavejs★ 277same name
- letehaha/moneymatter★ 271same name
185 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 repository27 other files it gives its agents.
- agent-issueSkill
- agent-prSkill
- ask-wizSkill
- build-ticketSkill
- dream-cycleSkill
- feedbackSkill
- ghostSkill
- grillSkill
- handoffSkill
- hill-climbSkill
- huntrSkill
- imageSkill
- installSkill
- jevSkill
- launch-fleetSkill
- researchSkill
- review-ticketSkill
- role-callSkill
- setupSkill
- son-of-antonSkill
- to-specSkill
- to-ticketsSkill
- triageSkill
- wait-whatSkill
- wayfindSkill
- where-are-weSkill
- write-driverSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 4 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 178 edited versions we read keep these.
4
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 14
Read the project's AGENTS.md or CLAUDE.md, its glossary and the ADRs for the area.
- Distinctive: line 19
Scope: keep the caller's role, owned paths, approval gates and the 1 + 1 review limit.
- Distinctive: line 69
Write 3–5 ranked hypotheses, each with a prediction: "if X, changing Y removes it." Discard any you cannot falsify.
- Distinctive: line 86
Run it red. If red needed a mutation, diff against a pristine copy.
- Distinctive: line 91
Follow the project's proof-first commits and state the cause in the commit or pull request.
“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
No theory without a loop. First run one command that goes red on the reported bug. Then minimise it, rank hypotheses, test one prediction at a time, and fix with a regression test. Skip a later phase only with a stated reason; the red loop cannot be skipped.
Read the project's AGENTS.md or CLAUDE.md, its glossary and the ADRs for
the area. Run the helper as python3 -I <this skill's folder>/scripts/loop.py.
Guards
- Scope: keep the caller's role, owned paths, approval gates and the 1 + 1 review limit. Diagnosis grants no permission to edit elsewhere, run against a live system, merge or start agents. The orchestrator's diagnosis only supplies a cause and direction for its decision; it never resets 1 + 1.
- Privacy: replace every secret with
<REDACTED>before showing commands, outputs or artifacts. Keep credentials in environment variables, never in arguments. Quote only diagnostic lines; headers can be secrets. Public records carry synthetic reproducers and technical facts: no thread ids, exact user words, real identifiers or links into private files. Keep private captures in the configured private repository. Record a user decision in your own words with its date and the open-development private-record pointer. If redaction removes the signal, say so and ask; never expose it.
1. Build the red loop
Reading code to build a reproducer is fine; explaining the cause first is
not. Prefer, in order: a failing test at the seam that reaches the bug; an
HTTP script; a CLI run on fixture input against a known-good snapshot; a
headless browser assertion; a redacted trace replayed through the isolated
path; a throwaway harness; a seeded fuzz loop; git bisect run in an
isolated copy; or old against new on the same input. Assert the exact
symptom, pin time and seeds, isolate files and network, and aim for seconds.
Last resort, a human loop: bash <this skill's folder>/scripts/hitl-loop.template.sh
'<step>' '<symptom question>'. Exit 1 means the symptom is present, 0 absent,
2 inconclusive; map 2 to 125 under git bisect run. The human signs in
themselves and answers only y or n. Without a terminal they can answer, ask;
never invent the answer.
Flaky: set the effort first (the ticket's budget, if given), then amplify
with repeats, stress or injected delays until loop.py rate --runs N
[--timeout S] -- <command> shows a high failure rate. Record its line, the
seed and configuration before and after amplification. A lucky pass proves
nothing; never retry until green.
Done when you have run one fast, agent-runnable command on the real bug
path and can show its redacted red output and the symptom it asserts. If you
cannot build it, stop and ask for the missing environment, a redacted capture
or permission for temporary instrumentation: on the ticket with
build-ticket's needs-info procedure, otherwise to the caller. Do not
hypothesise or instrument production while waiting.
2. Minimise
Confirm the loop catches the reported failure, not a nearby one. Cut inputs, callers, configuration, data and steps one at a time, rerunning after each. Done when removing any remaining element loses the failure.
3. Rank hypotheses
Write 3–5 ranked hypotheses, each with a prediction: "if X, changing Y removes it." Discard any you cannot falsify. Show the ranking on the ticket (or to the caller) and carry on without waiting.
4. Probe one prediction at a time
Change one variable per run and update the ranking. Prefer a debugger, then
boundary logs tagged with one prefix from loop.py tag; never log everything
and look for a story. For a performance regression, measure a baseline with a
timer, profiler or query plan, then bisect; logs are not a measurement.
Done when one probe has distinguished the cause.
5. Fix with a regression test
- Turn the minimised loop into a test at a seam that exercises the real call pattern. No correct seam: record that gap and ask; an untested fix is not done.
- Run it red. If red needed a mutation, diff against a pristine copy.
- Apply the smallest fix for the established cause, and run the test green.
- Rerun the original loop. For a flake, rerun
loop.py ratewith the same command and runs; retries never erase failures.
Follow the project's proof-first commits and state the cause in the commit or pull request. Fixture tests prove fixture behaviour, never live behaviour.
6. Clean up and report
loop.py clean '<prefix>' must print clean:; remove every leftover it
names and any throwaway harness. Then leave a diagnosis comment on the ticket
or issue: the loop command, symptom and redacted red output; the cause and
the probe that showed it, or "unsolved"; the regression test and original
loop results; any rate lines and effort spent; and every open gap. If the
effort ran out unsolved, list what you tried and ask for the next step.
Credit: adapted from Matt Pocock's skills under the MIT License; the notice and sources are in NOTICE.md.
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.

