refactor - Code Refactoring Skill for Behavior-Preserving Code Improvement
Refactor existing code to improve readability, maintainability, and structure while preserving external behavior
Tags
Updated: 2026-02-14Capabilities
Typical Inputs
Typical Outputs
What this skill does
- rename types and functions
- extract functions and methods
- inline trivial wrappers
- introduce parameter objects
- replace nested conditionals
- extract shared logic
- split large modules
Inputs
- existing codebase
- test suite
- public API specification
- performance requirements
- logging contracts
Outputs
- refactored code
- updated documentation
- cleaner diffs
- preserved test passing
- unchanged public APIs
Requirements
- access to code repository
- version control system
- compiler/typechecker
- test framework
