with one click
diagnose
// Investigate a bug using structured differential diagnosis. Use when the user says "diagnose", "investigate this", "what's causing this", or "figure out why".
// Investigate a bug using structured differential diagnosis. Use when the user says "diagnose", "investigate this", "what's causing this", or "figure out why".
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | diagnose |
| description | Investigate a bug using structured differential diagnosis. Use when the user says "diagnose", "investigate this", "what's causing this", or "figure out why". |
| argument-hint | <symptom description> |
| user-invocable | true |
| allowed-tools | Bash, Read, Grep, Glob, Task |
| model | opus |
Investigate a bug systematically by gathering evidence, forming multiple hypotheses, and testing each before proposing any fix. This prevents the "guess and fix" anti-pattern.
Gather the symptom from $ARGUMENTS or ask the user. Document:
Collect evidence — read logs, error output, and relevant source code:
docs/LINEAR_SNAPSHOT.md for related tracked bugsgit log --oneline -20 and git diff HEAD~5Form hypotheses — generate 2-4 distinct possible causes:
Hypothesis 1: [cause] — Evidence for: [X] | Evidence against: [Y]
Hypothesis 2: [cause] — Evidence for: [X] | Evidence against: [Y]
Hypothesis 3: [cause] — Evidence for: [X] | Evidence against: [Y]
Test each hypothesis — for each one, find confirming or disconfirming evidence:
Report findings in structured format:
## Diagnosis: [symptom summary]
### Evidence Collected
- [evidence 1 with file:line]
- [evidence 2 with file:line]
### Hypotheses Tested
1. [hypothesis] — [CONFIRMED/RULED OUT/INCONCLUSIVE]
Evidence: [what confirmed or ruled it out]
2. [hypothesis] — [CONFIRMED/RULED OUT/INCONCLUSIVE]
Evidence: [what confirmed or ruled it out]
### Root Cause
[Most likely cause with supporting evidence]
### Recommended Fix
[Specific fix with file:line targets]
[What could go wrong with this fix]
### What This Is NOT
[Ruled-out causes — prevents revisiting dead ends]
Do NOT implement the fix — present the diagnosis and let the user decide.
/document-bug to log findings in Linear if the bug isn't already tracked