refactor
Installation
SKILL.md
Skill: Refactor
What This Skill Does
Enforces safe refactoring discipline: tests green before → refactor with minimal diffs → tests green after → update docs. Prevents the common problem where refactoring introduces subtle regressions because tests weren't run at each step.
When to Use
- When the user wants to restructure, rename, or reorganize code
- When
diff-reviewrecommends refactoring - When tech debt needs to be addressed
- When extract/inline/rename operations span multiple files
Do NOT use this for new features — use implement-phase or scaffold for that.