diagnose-bug
Skill2 starsChanged 8 days agoMITView on GitHub
Finds the cause of an everyday bug and proves it before anyone fixes it. Questions the ticket first, pins down what fails and how often, ranks the suspects with "not a bug" always among them, checks the cheapest first, reproduces the bug with a control, proves the smallest fix in that repro, and has a fresh helper try to break the answer. Ends with a short diagnosis and a fix plan for the user to approve. Never changes a checkout anyone works in. Use for a bug ticket, a Sentry issue or an error to explain, or for "diagnose this", "why does this happen", "find the root cause" or "is this a bug". Hard bugs and questions about a number go to orb's Research world.
- Reads credentials
8 other projects use a version of this.
Adopted by
Most recently taken up by
- LikeMindsCommunity/agentic-workflow-backendtheir own version, first seen Oct 20, 2026
- evelan-de/claude-code-pluginstheir own version, first seen Oct 17, 2026
- blockscout/frontendtheir own version, first seen Oct 17, 2026
- santos-sanz/ai-dev-workflowtheir own version, first seen Oct 13, 2026
- nhat092005/skillstheir own version, first seen Oct 13, 2026
- shady2k/skillstheir own version, first seen Oct 11, 2026
Used with
Projects with it also use to-spec.
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.
GoogleSkillto-spec
Turn the current conversation into a spec and publish it to the project issue tracker — no interview, just synthesis of what you've already discussed.
Also in 3 projects that use this
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- blockscout/frontend★ 310same name
- flurdy/agent-skills★ 9same name
- shady2k/skills★ 6same name
- evelan-de/claude-code-plugins★ 3same name
- awcameron/skills★ 1same name
- nhat092005/skills★ 1same name
- LikeMindsCommunity/agentic-workflow-backend★ 0same name
- santos-sanz/ai-dev-workflow★ 0same name
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 repository18 other files it gives its agents.
- approve-planSkill
- check-impactSkill
- context-packSkill
- design-forgeSkill
- deslopSkill
- falsifySkill
- forgeSkill
- gap-analysisSkill
- interrogateSkill
- make-fixtureSkill
- micro-loopSkill
- phased-loopSkill
- pick-tierSkill
- ship-planSkill
- simple-loopSkill
- taste-testSkill
- unslopSkill
- wait-whatSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
4
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
Read its git history: log and blame of the lines involved.
- Distinctive: line 38
Stop once a check decides between suspects.
- Distinctive: line 49
Fix where the bad state starts,: not with a guard where it shows up.
- Distinctive: line 69
Write to production, push, or reply on tickets or in chat.
“Common” is measured: kept by at least 6 in 10 of the 8 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 bug
Tickets often blame the wrong thing, and the first cause that fits is often not the real one. You find the cause and prove it with a run, not an argument. This is Research's bug method for one agent in one sitting. You're done when the user could run your repro by hand, see it fail, and see it pass with your fix.
Input
- The bug: a ticket, a Sentry link, an error or the user's words. Open it with whatever tool reads it. One you can't read becomes a question.
- The repo, or repos, the bug lives in.
Notes
Keep everything in .plans/<bug>/ in the repo, which git ignores: diagnosis.md, the repro in repro/, and the fix as fix.patch. Write diagnosis.md as you go, so a fresh session can pick it up. Mark every fact by how you know it: seen (you ran or queried it), read in code (file:line), documented, told (by the user or the ticket) or guessed.
1. Is it a bug?
- Pin it down: the exact error or wrong result, how often out of how many, where, and since when.
- Find what changed around the start: the git log of the code involved, deploys and config changes.
- List what the ticket takes for granted, like "it used to work", "only buyers from X" or "the button is broken". Check the cheapest first. A wrong one can end the job: say so and stop.
2. Suspects
- Write two or more causes, most likely first. Each is a code path with file:line, traced from where the input comes in to where it goes wrong, plus the check that would rule it out.
- "Not a bug" is always on the list: by design, bad data from somewhere else, or a wrong measurement.
- Look for the same code copied elsewhere. It has the same bug.
3. Check the cheapest first
- Read the code.
- Read its git history: log and blame of the lines involved. Was a fix tried and reverted, and why?
- Pull read-only data: logs, Sentry, staging, or a database you already have access to.
- Build a repro.
Stop once a check decides between suspects. Rule a suspect out only on evidence, and write down what ruled it out.
4. Repro with a control
- Make the bug happen on purpose: a failing test where one fits, else a script or a staging request.
- It counts only with a control. On the same setup, it fails with the suspect's mechanism and passes without it.
- Write down how the repro differs from production: version, data size, config, load. A result that rests on one of these holds only if that difference doesn't matter.
- Couldn't reproduce it? Say what would make it reproducible. Don't guess a fix.
5. Prove the fix
- Fix where the bad state starts, not with a guard where it shows up. Pick the smallest such fix.
- It counts only if the repro passes with it and fails without it.
- Check git history for the same fix, tried before and reverted.
- Run the tests around the code you touched.
6. A fresh helper attacks it
Start one helper agent with the notes and the repro. Its job is to break your answer: find another cause that explains the same facts, check that the repro shows the real error, check each count's denominator, and check that the fix removes the cause instead of hiding it. If it breaks your answer, go back to step 2 once. If the second answer breaks too, report what's still open.
Asking the user
- Ask once, in one numbered batch, then keep checking whatever doesn't need the answers. Wait only when nothing else is left.
- Ask for data, not only answers: an export, a screenshot with its filters and time window visible, or access to a table. Say exactly what, which suspects it decides between, and where you think it lives. Pulling data by hand is normal.
Too big for this
Stop and say it needs Research when the cheap checks and one repro attempt don't prove a cause, when the question is about a rate or a number rather than a wrong result, or when it needs a load test or a simulation. Leave diagnosis.md complete, so the user can start a Research colony with it as input.
Never
- Write to production, push, or reply on tickets or in chat.
- Change a checkout anyone works in. Try repros and fixes in a throwaway git worktree, keep the repro and
fix.patchin the notes, then remove the worktree. - Open
.env, or print a token.
Output
Five bullets:
- What happened, in plain words.
- Why, with file:line.
- How often and how bad, with the denominator.
- How to see it yourself: the exact command or steps, which fail today.
- The fix, and that the repro passes with it.
Then the other suspects, each with what ruled it out, and anything still open. If it isn't a bug, say what it is and stop there.
Otherwise end with a fix plan for the user to approve, in forge's shape: Problem, Solution, Acceptance criteria (one is that the repro passes), and a table of test cases. Once they approve, approve-plan takes it to a PR. In orb, add a plate item with orb plate add "Approve the fix for <bug>" --verb approve. As a colonist, report to your chief instead.
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.

