Diagnose (Claude Code skill)
You invoke /diagnose on Claude Code when a bug has resisted for 2h and your 30 console.logs gave nothing. The skill enforces a 6-phase discipline: reproduce, build a deterministic feedback loop, falsifiable ranked hypotheses, surgical instrumentation, fix + regression test, post-mortem. Distributed by Matt Pocock in his skills repo (github.com/mattpocock/skills), phase 1 (build feedback loop) alone represents 90% of the fix per the author.
Strengths
- 6 named phases (reproduce → loop → hypothesise → instrument → fix → cleanup), no more freestyle debugging
- Forces 3-5 falsifiable ranked hypotheses before touching code, kills anchoring bias
- Mandatory [DEBUG-xxxx] tagging on every added log, cleanup is a single grep, zero forgotten debug logs in prod
- Separate perf branch (measure before fix) that avoids blind optimisation
Limitations
- Overkill on simple bugs, 6 phases for a typo is a no
- Requires real discipline: skip phase 1 (feedback loop) and everything else becomes theatre
- No long-term skill API stability guarantee (distributed outside official Anthropic registry)
Best for
- Devs trapped by non-deterministic bugs (races, flaky e2e, intermittent perf regressions)
- Tech leads who want to industrialise a shared post-mortem method
- QA teams looking for a reproducible protocol on verbose bug reports