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.
Get 5 new use cases every morning. Free, one short email, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Disclaimer
Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page