Who it is forA developer whose agent keeps producing code that does not work and who needs a disciplined debugging loop.
The problemWithout feedback on how code actually runs, the agent guesses, and fixes often miss the real cause.
The outcomeA written reproduction, a test that fails before the fix and passes after, and a refactored fix.
What you need first
- A coding agent that supports the plugin or skills install route, such as Claude Code or Codex
- A project repository the agent can read and edit
- Optional: an issue tracker such as GitHub or GitLab, or a local folder for tickets
Steps
- Install the plugin in Claude Code with
claude plugin install mattpocock-skills@claude-plugins-official. - Describe the failing behavior and run
/diagnosing-bugs, working through each gated phase. - Run
/tddto write a failing test for the bug first. - Make the test pass, then refactor while keeping it green.
Prompt for your agent
In the mattpocock/skills repo, use diagnosing-bugs on this failure: <bug description>, then use tdd to write a failing test before any fix. Expected output: a root-cause note and a red test that turns green after the fix. Verify that the test fails on the unfixed code before you accept the change.
Caveat. The red-green-refactor loop assumes your project already has a test setup the agent can run.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for mattpocock/skills and "Fix a bug with a failing test before the fix"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer