What problem does it solve?
This Skill helps you improve existing code structure without changing what the software does. It is designed for situations where code has become hard to read, overly repetitive, poorly organized, or risky to maintain, but must keep the same observable behavior.
Core Features & Use Cases
- Behavior-preserving refactoring: Handles renaming, extraction, inlining, moving code, and other structural improvements while explicitly guarding against feature changes.
- Risk-aware execution: Classifies refactor type, evaluates impact factors such as public APIs, missing tests, and overlapping local changes, and asks for confirmation when risk is elevated.
- Incremental verification: Encourages test baselines, characterization tests, compilation checks, and step-by-step execution to reduce regression risk.
- Use case: When a service method has grown too large and contains repeated logic, this Skill can identify the target files, assess callers, recommend a preservation strategy, and guide a safe extract-method refactor.
Quick Start
Ask the mvt-refactor skill to refactor a specific file, function, class, or symbol while preserving behavior and to show the target scope and risk before making changes.