From powerups
Use when fixing a bug — enforces reproduce-first-then-fix discipline with a strict step-by-step protocol. Prevents wrong-approach loops by gating each step on success criteria.
How this skill is triggered — by the user, by Claude, or both
Slash command
/powerups:bug-fixThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
A strict, sequential protocol for fixing bugs. Each step has a success criteria that MUST be met before proceeding to the next step. This prevents the common failure mode of guessing at fixes without understanding the bug, or breaking other things while fixing one thing.
A strict, sequential protocol for fixing bugs. Each step has a success criteria that MUST be met before proceeding to the next step. This prevents the common failure mode of guessing at fixes without understanding the bug, or breaking other things while fixing one thing.
This skill invokes powerups:best-practices — branching, investigation, TDD, and all other practices apply. This skill adds bug-specific discipline on top.
git checkout -b fix/{short-description}
Never fix bugs on main.
Read the relevant source files and understand the current behavior. Don't guess — read the actual code paths involved.
git log --oneline -10 -- path/to/file.pySuccess criteria: You can explain what the code currently does and why it produces the wrong result.
Write a minimal test that reproduces the exact bug. Run it and confirm it fails for the right reason.
test_returns_error_when_input_is_empty, not test_bug_fix# Run just the reproduction test
pytest tests/test_file.py::TestClass::test_name -v
Success criteria: The test fails, and the failure message clearly demonstrates the bug.
Now that you have a reproduction, investigate why it happens.
logger.debug or print) to narrow down the issuemcp__claude-in-chrome__*) to debug. If available, use them to:
Success criteria: You can point to the exact line(s) of code causing the bug and explain the root cause.
Fix the root cause identified in Step 4. Keep the fix minimal — don't refactor, don't "improve" adjacent code, don't add features.
Success criteria: The fix addresses the root cause and nothing else.
Run the test from Step 3. If it still fails, go back to Step 5.
pytest tests/test_file.py::TestClass::test_name -v
Success criteria: The reproduction test passes.
Run all tests to check for regressions.
# Python
pytest tests/
# JavaScript/TypeScript
npm test
If any other test broke, fix the regression without breaking the original fix. If fixing the regression requires changing the approach, go back to Step 5 with the new understanding.
Success criteria: All tests pass — both the new reproduction test and all existing tests.
print statementsgit diff should show only the fix and the testSuccess criteria: No debug artifacts remain in the diff.
Run the finishing sequence from powerups:best-practices practice #9: /simplify, powerups:change-log (skip if the fix isn't user-facing), update-docs, and lint. The full test suite already ran in Step 7.
Success criteria: Simplify findings fixed, CHANGELOG.md updated (if user-facing), docs synced, linter clean on changed files.
git add <specific files>
git commit -m "fix: <description of what was fixed and why>"
Create a PR. The PR description should include:
Success criteria: Commit is clean, PR is created.
| Don't | Do |
|---|---|
| Guess at the fix without reading the code | Read and trace the code path first (Step 2) |
| Fix without a reproduction test | Write a failing test first (Step 3) |
| Make a large fix that changes multiple behaviors | Make the smallest possible fix (Step 5) |
Leave print or debug logging in the commit | Clean up before committing (Step 8) |
| Refactor adjacent code while fixing the bug | Only fix the bug — refactors are separate PRs |
| Skip the full test suite ("I only changed one file") | Always run all tests (Step 7) |
| Retry the same fix when the test still fails | Investigate deeper — re-read the root cause (Step 4) |
npx claudepluginhub jackyliang/powerups --plugin powerupsFixes bugs using test-first loop: add minimal failing reproduction test, apply smallest fix to affected module, verify full test suite and linters. Use for reported bugs needing verified low-impact fixes.
Fast bug fixes with root cause investigation + TDD. Enforces 'no fix without root cause' discipline and verification protocol. Without this skill, fixes are applied at symptoms instead of sources, and bugs return.
Guides systematic bug fixing: create issue, debug, write failing test, fix, verify, and close. Includes fix status classification.