Skill detail
safe-refactor
Restructures code while preserving behavior, defining a behavior-preservation boundary and establishing verification before structural edits.
Why we recommend it: Supports the Implementation and Verification facets for refactoring but is not Claude Code specific.
Inspect before use
Read the source instructions and check the requirements before you install this skill.
SKILL.md
The saved excerpt is a snapshot from when this skill was listed. The external source remains the complete and most current version.
--- name: safe-refactor description: Restructure code while preserving behavior. Use for extraction, consolidation, ownership moves, or cleanup where verification must bracket structural edits. --- # Safe refactor Define behavior-preservation boundary and establish verification before structural edits. - Keep feature changes outside refactor. - Move one ownership boundary at a time. - Preserve public interfaces, failure behavior, ordering, and compatibility unless explicitly scoped. - Keep intermediate states buildable and testable. - Avoid dependency or configuration growth without correctness need. Run same proof after change. Stop when behavior matches and requested structure is achieved.Read the full source on GitHub (opens external page)