refactor-code

Installation
SKILL.md

Refactor Code

Apply the execution contract before this procedure.

Use this skill when the task is to change structure without changing intended behavior.

Core principle: Small, reversible steps over large rewrites. Separate design improvement from behavior change.

Quick Reference

Step Action Verification
1 Define stable behavior Written statement of what must not change
2 Add characterization tests Tests pass on current code
3 Choose smallest safe slice One boundary at a time
4 Rename, move, or extract Tests still pass
5 Remove compatibility shims Tests still pass, new path proven

HARD-GATE

Installs
26
GitHub Stars
26
First Seen
Aug 14, 2026
refactor-code — igmarin/rails-agent-skills