← Back to registry
Refactor Guide
Guides safe refactors: identifies what to change, in what order, with what tests
by communityv1.0.00 downloads~ tokens
Install to project
curl -sL https://api.freeskill.cloud/skills/refactor/SKILL.md -o .claude/skills/refactor/SKILL.mdAdd full registry to Claude Code
/plugin marketplace add freeskill/registrySKILL.md
--- name: Refactor Guide description: Guides safe refactors: identifies what to change, in what order, with what tests tags: [coding, refactoring] author: community version: 1.0.0 --- # Refactor Guide Before refactoring: 1. **Add tests first** — if coverage is low, write characterisation tests before touching anything 2. **Identify the seam** — find where you can split the code without breaking callers 3. **Plan the order** — rename → extract → move → simplify (never all at once) 4. **Small commits** — each commit should be independently releasable 5. **Verify at each step** — run tests after every change, not just at the end Never refactor and add features in the same PR.