From hyperpowers
Refactors code safely by tracking progress in task docs and preserving behavior through small, test-verified changes. Use for deliberate, reversible refactors on painful designs.
How this skill is triggered — by the user, by Claude, or both
Slash command
/hyperpowers:refactoring-safelyThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
<skill_overview>
<skill_overview> Refactor in small truth-preserving steps. Keep the refactor tracked in task docs and stop if behavior starts drifting. </skill_overview>
<rigidity_level> MEDIUM FREEDOM - Keep the change→test→document loop strict, but adapt the exact refactor pattern to the codebase. </rigidity_level>
<quick_reference>
plan.mdcontext.md and tasks.md
</quick_reference><when_to_use>
<the_process>
Use task docs to capture:
Each step should be small enough to explain and verify on its own.
Run the smallest relevant tests after each change.
Update discoveries, remaining risks, and next slices as the refactor unfolds. </the_process>
npx claudepluginhub withzombies/hyperpowers --plugin hyperpowersRefactors code safely by making test-preserving transformations in small steps, running tests between each change to keep behavior unchanged.
Plans software refactors while preserving behavior. Maps current structure, identifies contracts, and proposes incremental steps with validation.
Restructures existing code safely without changing externally observable behavior. Uses characterization tests and context-driven workflow for structural improvements.