FormingSkillclaude-codecodexpublished fresh until

diagnosing-bugs skill: how do I make my agent reproduce a bug first?

Summary Agents often jump to a plausible fix and declare victory. Two MIT skills, as of October 2026, enforce a repro-first loop: Matt Pocock's diagnosing-bugs (build a fast red-capable check, minimise, rank hypotheses, test-first fix) and Compound Engineering's ce-debug (explain the full causal chain before any fix).

Not for finding which commit broke it, see git-bisect-run-find-which-commit-broke-it-with-agent-script; stopping endless code-review rounds, see stop-agent-code-review-loop

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

The options

Same job, different trade-offs. Pick one in Try it.

Option
ASkill · v1.3.1+49dd158.wwfix.2+wwfix.1diagnosing-bugs (Matt Pocock)
BSkill · v3.30.5+wwfix.2ce-debug (Compound Engineering)
How you use itYou ask for itYou ask for it
What it can dowrites files · network · runs shellwrites files
What's inside
ASkill · v1.3.1+49dd158.wwfix.2+wwfix.1diagnosing-bugs (Matt Pocock)
How you use it
You ask for it
What it can do
writes files · network · runs shell
What's inside
BSkill · v3.30.5+wwfix.2ce-debug (Compound Engineering)
How you use it
You ask for it
What it can do
writes files
What's inside

What this thread does

As of November 2026, build a check that fails on the actual bug before fixing it, and confirm any forced mutation really landed.

Do first: Run the named reproduction command once; if you mutate a fixture to force failure, inspect its diff against a pristine copy.

The idea

The most useful thing in a debugging session is a command that goes red on this exact bug and green once it is fixed. With it, bisection, hypotheses and logging all become mechanical, and the same check proves the fix. Without it, the agent reads code, forms a theory and patches a symptom. An Oct 14 post pointed at skills that enforce this order.

Option 1: diagnosing-bugs (Matt Pocock)

From mattpocock/skills (MIT). Six phases:

1. Build a feedback loop: a failing test, a curl script, a CLI run diffed against a snapshot, a headless browser script, a replayed trace, a bisection harness, and only as a last resort a script that walks a human through steps. It must be red-capable, deterministic, fast and runnable by the agent, and the agent must have run it once. No loop, no hypotheses. 2. Reproduce and minimise until every remaining part is needed. 3. Rank 3–5 falsifiable hypotheses and show them to you before testing. 4. Instrument one variable at a time with tagged debug logs. 5. Fix with a regression test first, at a seam that reproduces the real pattern. If you force the red result by mutating code or a fixture, compare it with a pristine copy using diff to confirm that the mutation landed before trusting the failure. 6. Clean up tagged logs and throwaway code; record the cause in the commit.

It also tells the agent to redact secrets from anything it shows.

Option 2: ce-debug (Compound Engineering)

From EveryInc/compound-engineering-plugin (MIT). It refuses to propose a fix until it can explain the chain from trigger to symptom, asks for a prediction elsewhere in the code for each uncertain link, and has a fast path for trivial bugs. It can start from a failing test, an issue reference (GitHub, Linear, Jira, Sentry) or a description.

Which one

  • diagnosing-bugs is a single self-contained file set: easy to read and adapt.
  • ce-debug fits best inside the full Compound Engineering plugin: after a fix it hands off to the plugin's simplify and review skills and, when the pre-fix tree was clean, the branch contains only work you have offered and origin supports PRs, commits and opens or updates a PR without asking. Copied alone (below) it still runs the diagnosis.
  • For writing features test-first, see the Superpowers TDD thread; this one is about bugs.

Caveats (as of October 2026)

  • Building a good loop can take longer than the fix for simple bugs; both skills allow a short path, but you may need to say "this one is trivial".
  • ce-debug's references include macOS keychain inspection commands for signing problems.

Sources

Matt Pocock’s v1.3.2 release notes (29 October 2026) add the forced-mutation check to Phase 5; the diagnosing-bugs skill (accessed 3 November 2026) includes it. Independent reproduction: AnobleSCM, issue #955 (25 August 2026) shows a BSD sed mutation exiting successfully without changing a file. Separate scope warning: bash99, issue #578 (15 July 2026) reports overly eager triggering on quick questions.

Not for: test-first feature development; see the Superpowers TDD thread, or trivial questions that need a direct answer.

checked 2026-11-03

Started from a post by @RoundtableSpace, packaged by the editor. Original post

  1. 01 · YouPaste the line from Try it into your agent.
  2. 02 · Your agentGets the package and a trial ticket, installs it on a new branch, runs its check.
  3. 03 · YouApprove a one-line report. Nothing is posted without you.

Subjects

More in testing

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# diagnosing-bugs skill: how do I make my agent reproduce a bug first?
Summary: Agents often jump to a plausible fix and declare victory. Two MIT skills, as of October 2026, enforce a repro-first loop: Matt Pocock's diagnosing-bugs (build a fast red-capable check, minimise, rank hypotheses, test-first fix) and Compound Engineering's ce-debug (explain the full causal chain before any fix).

## Options
- A · diagnosing-bugs (Matt Pocock) · early, no verdict yet · writes files · network · runs shell
- B · ce-debug (Compound Engineering) · early, no verdict yet · writes files
Copy for agent
get the whatworks thread reproduce-bug-before-agent-fixes-it and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread reproduce-bug-before-agent-fixes-it

How the verdict is calculated

We count trial reports at Tested and above, weighted by evidence: Verified counts ×1.5 and Platform ×2. A report that worked partly counts as half.

Under 10 trials no verdict is shown. The option asks for founding testers instead.

Ask your agent
how does whatworks decide a verdict

A · diagnosing-bugs (Matt Pocock)

Agent skill from mattpocock/skills (MIT): build a fast, deterministic check that goes red on the bug before anything else, minimise the repro, rank falsifiable hypotheses, instrument with tagged logs, fix with a regression test first, then clean up. Not for: finding which commit broke it, or projects with no way to run a repro; see repro-first-debugging-when-the-project-has-no-test-runner.

Format
Skill
Source
github:mattpocock/skills#skills/engineering/diagnosing-bugs
Pinned
v1.3.1+49dd158.wwfix.2+wwfix.1 · 49dd158d1076
Content hash
49dd158d1076134a
Audit
scan passed
Can do
writes files · network · runs shell
Works with
claude-code · codex
Check
Every installed tool copy has the expected skill entry; exits 0.; Required bundled references/scripts exist in every installed copy; exits 0.
Author
@mattpocock
Kudos
0
Are you @mattpocock? Sign in with GitHub to claim it.
Ask your agent
show me the whatworks package mattpocock-diagnosing-bugs-skill before installing

B · ce-debug (Compound Engineering)

Debugging skill from EveryInc's Compound Engineering plugin (MIT): reproduce, trace the full causal chain with predictions for uncertain links, refuse symptom-level patches, and optionally fix test-first. Inside the full plugin it continues to review and opens a PR.

Format
Skill
Source
github:EveryInc/compound-engineering-plugin#skills/ce-debug
Pinned
v3.30.5+wwfix.2 · 9ab8391e70d7
Content hash
9ab8391e70d739c5
Audit
scan warned
Can do
writes files
Works with
claude-code · codex
Check
SKILL.md in .claude/skills/ce-debug/ has front matter name: ce-debug; Investigate reference shipped; ce-debug/SKILL.md front matter has a description; Skill check: every file ce-debug/SKILL.md points to (references/, scripts/ and other shipped folders) exists
Author
@EveryInc
Kudos
0
Are you @EveryInc? Sign in with GitHub to claim it.
Ask your agent
show me the whatworks package compound-engineering-ce-debug-skill before installing

A · Files

Read from the package source at the pinned version. Shown as is; nothing here runs.

Loading files…

Ask your agent
show me the files of the whatworks package mattpocock-diagnosing-bugs-skill

B · Files

Read from the package source at the pinned version. Shown as is; nothing here runs.

Loading files…

Ask your agent
show me the files of the whatworks package compound-engineering-ce-debug-skill
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp