From coding-skills
Fix a bug using TDD. Diagnose root cause, write a failing test, then fix. This skill should be used when the user asks to "fix a bug", "debug and fix", "find and fix", or encounters a failing test, crash, or regression that needs a code fix. For diagnosis only without fixing, use /diagnose instead.
How this skill is triggered — by the user, by Claude, or both
Slash command
/coding-skills:fixThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
| Skill | When to load |
| Skill | When to load |
|---|---|
| diagnose | Always — systematic root cause investigation before fixing |
| testing | Always — core skill for reproducing and verifying fixes |
| principles | Root cause involves a design problem (SRP violation, missing DI, coupling) |
| done | Always — verify tests pass and no regressions before claiming fixed |
Bug report: $ARGUMENTS
Read the relevant files and trace the execution path.
git log --oneline -20 to identify when the bug was introducedgit diff <commit>^ <commit> to inspect the change that likely caused itDocument your findings in one sentence: "The bug was introduced in [commit/file] because [root cause]."
Apply the Skills Rubric above. Always load testing. Load principles if the root cause is structural.
If the bug involves a third-party library or framework:
Skip this step if the bug is purely in application logic with no external dependencies.
Enter plan mode. Design the smallest test case that reproduces the bug.
Wait for user confirmation before writing any code.
Write the reproduction test. Run it and confirm it fails.
Write the minimum change that makes the failing test pass.
Clean up the fix and any immediately affected code.
Run the test suite for the affected module.
Next: run /review to check style consistency and test quality of the fix.
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub bouob/claude-plugins --plugin coding-skills