From refactor
Safely refactors code with test coverage: writes tests first if absent, plans changes, applies small testable steps, verifies tests/lint/typecheck pass without behavior changes.
How this skill is triggered — by the user, by Claude, or both
Slash command
/refactor:refactor [target to refactor. File, function, or pattern][target to refactor. File, function, or pattern]The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Refactor `$ARGUMENTS` safely.
Refactor $ARGUMENTS safely.
npx claudepluginhub poshan0126/dotclaude --plugin refactorSafely refactors code test-first: verifies/writes tests, one structural change at a time, preserves behavior. Use for 'refactor this', 'clean this up', reorganization.
Safely refactors code using tests as safety net. Identifies code smells like long functions, duplication, poor names; applies small verifiable changes without altering observable behavior.
Executes safe, test-gated refactoring with behavior-preserving transformations (extract, inline, rename, move, simplify). Runs tests before and after each change, requires JiT tests for untargeted code, and measures complexity reduction.