/powerups:best-practicesfrom powerups
Enforces disciplined code changes with TDD, codebase investigation, DRY, proper branching, and doc updates. Use for any bug fix, refactor, or feature.
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.
The baseline discipline for every code change, no matter how small — a bug fix, a refactor, a small feature. plan-driven-development invokes this automatically for large multi-milestone features; use it directly for smaller work.
Before any of this: if the change is a new user-facing feature, run powerups:user-research first — it produces the discovery brief (problem statement, jobs-to-be-done, core flow, decision matrix) that confirms you're building the right thing. That skill owns the skip conditions. plan-driven-development and give-me-five already invoke it at the right moment; this pointer is for standalone feature work.
Create a branch before writing any code: git checkout -b feature/name. Never commit directly to main.
Before writing code, spawn an Explore subagent to find what already exists:
"Investigate the codebase for [feature/problem]. Check: (1) does similar code already exist, (2) do existing services or third-party deps already handle this, (3) what patterns are used for similar features. Return a concise summary under 30 lines."
All investigation happens in subagents to protect main context — they return summaries, not raw file contents.
Third-party APIs and libraries: WebSearch the latest official docs before writing integration code — verify parameter names, required fields, response shapes, and recent breaking changes. Do not rely on training knowledge alone; APIs deprecate endpoints and rename parameters.
Before modifying an existing function, API, database schema, or shared utility, scan everything that depends on it. Scale to the blast radius: one scan for a small local change, all 3 in parallel for signature, schema, shared-utility, or API-shape changes.
Run scans as general-purpose subagents with this prompt shape:
"I'm modifying [function/module/table]. Find EVERY [scan target] across the entire codebase. For each: file path, line number, exact usage, whether it needs updating."
Merge findings into a single impact picture. If using PDD, add a "Callers Impacted" section to the plan; otherwise verify each caller is handled before marking the work done. Update any caller that passes explicit values matching old defaults you're changing.
This differs from practice #2: #2 asks "does similar code exist?" to avoid reinventing. This asks "what breaks when I change this?" to avoid incomplete changes.
Use AskUserQuestion to clarify before building. Don't guess at requirements, scope, or approach:
If the request is ambiguous, ask — don't pick an interpretation. If you're about to make a product decision, surface it. Batch related questions into one message.
Invoke powerups:test-driven-development. Failing test first, minimal code to pass, refactor. No mocks — tests hit real infrastructure. That skill owns the details.
Do NOT implement backward compatibility or legacy methods unless explicitly asked.
# removed comments, no _unused variables.If the change touches anything the user sees, invoke both:
simple-design-principles — copy and labels, toasts, empty states, error messages, component selectionfrontend-design — visual design for new or modified components, pages, loading/error statesAnd if the change needs a picture of the UI anywhere a customer will see it — docs page, blog or changelog post, landing section, launch or social post, deck — invoke powerups:mockups. It owns how those images are made; never hand-crop a desktop screenshot.
If the change adds or modifies API endpoints, invoke self-documenting-apis — endpoint docstrings, typed request/response models with field descriptions, status codes, router tags. Auto-generated docs (/docs, /redoc) are the only API reference; never maintain a separate api-reference.md.
The canonical completion sequence for any code change — plan-driven-development and bug-fix reference this instead of restating it. Each step is one skill with its own scope; invoke it and record its output, don't paraphrase its checklist. Run after the code works, in this order:
/simplify — review changed code for reuse, quality, and efficiency (duplicate code, N+1 queries, anti-patterns). Fix what it finds.powerups:change-log — the CHANGELOG.md entry. User-facing changes only; stays in this PR.update-docs — maintainer docs: CLAUDE.md, README, guides, sibling repos. Small changes cause drift too.powerups:marketing-surfaces — customer-facing surfaces, triaged on every change including bug fixes. Usually N/A, said in one line per surface. Anything it does update lands as its own PR, never in this one.ruff check, npm run lint, …). Fix issues in files you changed; leave pre-existing issues in untouched files.0. User-research (new user-facing features)
1. Branch (never main)
2. Investigate + DRY (Explore subagent; WebSearch 3rd-party docs)
3. Impact scan (what breaks?)
4. Ask (clarify requirements with user)
5. TDD (invoke the skill)
6. No backward compat (unless explicitly asked)
7. UI → simple-design-principles + frontend-design
8. API → self-documenting-apis
9. Finish: simplify → change-log → update-docs → marketing triage → lint → full suite
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
14 skills in this plugin
/bug-fixUse 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./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.npx claudepluginhub jackyliang/powerups --plugin powerupsOther plugins' skills for the same job