diagnoselisted
Install: claude install-skill pitimon/8-habit-ai-dev
# `/diagnose` — Active Bug Investigation (6 Phases)
**Habits**: H1 (Be Proactive — prevent recurrence, not just patch the symptom) + H5 (Seek First to Understand — reproduce before fix)
## When to Use
- A bug is reported and the root cause is **not** obvious
- A performance regression appeared; you need to localize what changed
- Tests passed locally but failed in CI, or vice versa
- A feature works for some inputs and fails for others — you need to find the boundary
- A previous fix didn't hold; the bug returned in a different form
This skill enforces the discipline **build a fast feedback loop before you guess**. Documented friction: a lesson in `~/.claude/lessons/2026-04-12-compression-worker-420-investigation.md` notes that a 30-minute log-analysis session could have been a 5-minute SQL-comparison session if Phase 1 had been done first.
## When to Skip
- Single-line bug with obvious root cause (typo, wrong constant, off-by-one in plain sight)
- Lint/format errors with a clear fix
- Rename refactors and dependency bumps with passing CI
- Stack trace points to a single line that you can read and immediately understand
For these, fix directly and run tests. Save the 6 phases for hard bugs.
## Predecessor `/research` Brief (Optional Input)
If you ran `/research` before this — or have a saved brief from a prior session — paste its path now. Standard locations:
- `~/.claude/plans/*.md` (Deep-mode briefs)
- `docs/specs/<slug>/research.md` (persisted briefs)
If no prio