What problem does it solve?
This Skill helps when code needs to be cleaner, easier to understand, or more testable without altering what it does. It is designed for refactoring tasks where preserving exact observable behavior is the top priority.
Core Features & Use Cases
- Behavior-preserving refactors: Restructure code while keeping inputs, outputs, side effects, and exceptions unchanged.
- Safe incremental changes: Break large refactors into small, reviewable steps instead of making risky broad edits.
- Refactor planning and justification: Produce a plan, refactored code, and a behavior-equivalence argument for each change.
- Use Case: A developer has a long, confusing function and wants it split into smaller pieces for readability and testability without changing runtime behavior.
Quick Start
Refactor the provided code to improve clarity and structure while preserving exact observable behavior, then explain the changes and why behavior remains equivalent.