概要
The Refactoring Code skill provides a rigorous framework for cleaning up codebases without introducing regressions. It guides the user through five distinct phases: understanding current behavior, establishing behavior-driven test coverage, identifying code smells like complexity and duplication, planning incremental changes, and executing with continuous verification. By prioritizing clarity over cleverness and emphasizing that behavior must remain unchanged, this skill helps developers transform legacy or messy code into clean, modular, and type-safe systems.