diagnosing-bugs

A skill in mattpocock/skills · 321,860 stars on GitHub

Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.

Security grade of this SKILL.md: SAFE · how we grade

How to install diagnosing-bugs

npx skills add mattpocock/skills --skill diagnosing-bugs -a claude-code

The skills CLI copies this one skill into Claude Code (use -a for another agent). Or read its SKILL.md on GitHub.

What the SKILL.md says

A discipline for hard bugs. Skip phases only when explicitly justified. When exploring the codebase, read GLOSSARY.md (if it exists) to get a clear mental model of the relevant modules, and check ADRs in the area you're touching. This skill has you show commands, outputs and captured artifacts. Redact every secret first: write in its place. Build loops against env vars, so the credential stays in the environment rather than in what you show. Captured artifacts carry auth headers: quote only the lines that carry the signal. If the redacted output is not enough to diagnose the bug, say so and ask the user. This is the skill. Everything else is mechanical. If you have a tight pass/fail signal for the bug (one that goes red on _this_ bug), you will find the cause; bisection, hypothesis-testing, and instrumentation all just consume it.

Other skills in mattpocock/skills

  • ask-matt Ask which skill or flow fits your situation. A router over the skills in this repo.
  • code-review Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes: Standards (does the code follow this repo's doc…
  • codebase-design Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportuniti…
  • domain-modeling Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or edi…
  • git-guardrails-claude-code Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wa…
  • grill-me A relentless interview to sharpen a plan or design.
  • grill-with-docs A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.
  • grilling Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' tri…
  • handoff Compact the current conversation into a handoff document for another agent to pick up.
  • implement Implement a piece of work based on a spec or set of tickets.
  • implement-spec Implement the result of /to-spec and /to-tickets in code.
  • improve-codebase-architecture Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
  • migrate-to-shoehorn Migrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace `as` in tests…
  • prototype Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right…
  • research Investigate a question against high-trust primary sources and capture the findings as a Markdown file in the repo. Use when the user wants…
  • retro Conduct a retrospective on a coding session.
  • scaffold-exercises Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold…
  • setup-matt-pocock-skills Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before f…
  • setup-pre-commit Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-com…
  • tdd Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integrat…