diagnose

Structured debugging workflow for reproducing, minimizing, and fixing hard bugs and performance regressions.

mattpocock ↓ 234k
Claude Code
View source ↗

What it does

  • Can I make it faster? (Cache setup, skip unrelated init, narrow the test scope.)
  • Can I make the signal sharper? (Assert on the specific symptom, not "didn't crash".)
  • Can I make it more deterministic? (Pin time, seed RNG, isolate filesystem, freeze network.)
  • [ ] The loop produces the failure mode the user described — not a different failure that happens to be nearby. Wrong bug = wrong fix.
  • [ ] The failure is reproducible across multiple runs (or, for non-deterministic bugs, reproducible at a high enough rate to debug against).
  • [ ] You have captured the exact symptom (error message, wrong output, slow timing) so later phases can verify the fix actually addresses it.
  • [ ] Original repro no longer reproduces (re-run the Phase 1 loop)

Derived from the skill's own SKILL.md documentation · extracted 2026-07-23

Structured debugging workflow for reproducing, minimizing, and fixing hard bugs and performance regressions.

Source

Repository: https://github.com/mattpocock/skills

diagnose FAQ

What does the diagnose skill do?

Disciplined diagnosis loop for hard bugs and performance regressions. Reproduce → minimise → hypothesise → instrument → fix → regression-test. Use when user says "diagnose this" / "debug this", reports a bug, says something is broken/throwing/failing, or describes a performance regression. Can I make it faster? (Cache setup, skip unrelated init, narrow the test scope.) Can I make the signal sharper? (Assert on the specific symptom, not "didn't crash".)

How do I install diagnose?

Run: npx -y skills add https://github.com/mattpocock/skills --skill diagnose --agent claude-code — the source lives at github.com/mattpocock/skills.

Maintain diagnose?

Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.

diagnose on getagentictools
[![diagnose on getagentictools](https://getagentictools.com/badge/skills/mattpocock-skills-diagnose.svg)](https://getagentictools.com/skills/mattpocock-skills-diagnose?ref=badge)
npx agentictools info skills/mattpocock-skills-diagnose

The second line is the CLI lookup for this page — handy in READMEs and docs.