/powerups:bug-fixfrom powerups
Enforces a reproduce-first-then-fix discipline with a strict step-by-step protocol for fixing bugs. Prevents wrong-approach loops by gating each step on success criteria.
Ships in powerups. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole 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.
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 (maintainer docs), powerups:marketing-surfaces (customer-facing surfaces — it owns the triage; report its output), and lint. The full test suite already ran in Step 7.
Success criteria: Simplify findings fixed, CHANGELOG.md updated (if user-facing), docs synced, marketing triage reported (one line per surface or N/A), 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) |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
bug-fixing, debugging, reproduction-test, root-cause-analysis
npx claudepluginhub jackyliang/powerups --plugin powerups14 skills in this plugin
/best-practicesUse for any code change — bug fix, small feature, refactor, or improvement. Ensures TDD, clarifying questions, codebase investigation, DRY, proper branching/worktrees, UI skills, and doc updates. PDD invokes this automatically for large features./change-logUse after completing a feature or bug fix to log the change in CHANGELOG.md using plain, business-user-friendly language/drift-auditReconcile shipped code with the plan in both directions — additive drift (unplanned work that landed) and subtractive drift (dead files, stale TODOs, completed deferred items). Run as part of PDD's post-completion audit, before /simplify./give-me-fiveGenerate 5 meaningfully distinct UI/UX variants of the same screen in parallel (one subagent each), reachable via ?style=1...5, so the user can compare and pick. Calling again on a chosen style refines within that direction./marketing-surfacesShip the public-facing side of a user-visible feature — docs/help page, blog or changelog post, screenshots, pricing tier line, landing copy, email, and social. Run the triage on EVERY feature, bug fix, or change (best-practices finishing sequence, bug-fix Step 9, plan-driven-development's post-completion audit), and directly whenever asked to announce, document, or promote something that shipped./mockupsTurn a product screenshot into a marketing mockup — capture the UI raw over CDP, then composite in Shots.so with the house recipe (Mystic gradient background, Glass Light rim, 4:3). Use for ANY customer-facing image (blog hero, landing page section, changelog, docs, launch or social post, deck) and whenever asked to take, retake, or restyle a marketing screenshot.Other plugins' skills for the same job