refactor
Installation
SKILL.md
Refactor
Improve code structure without changing external behavior.
Process
- Understand — Read all related code, run existing tests
- Plan — Identify what to change and why
- Execute — Make changes incrementally
- Verify — Run tests after each change
Common Refactoring Patterns
Extract
- Long function → smaller focused functions
- Repeated code → shared helper
- Magic numbers → named constants