What problem does it solve?
Unstructured, unplanned code refactoring often introduces bugs, breaks existing functionality, and creates additional technical debt instead of reducing it. This Skill eliminates that risk by providing a proven, safety-first workflow to restructure code with confidence.
Core Features & Use Cases
- Safe Incremental Workflow: Step-by-step refactoring process with mandatory test verification and git commits at every stage to ensure changes are reversible and behavior-preserving.
- SOLID Principles & Design Patterns: Actionable guidance and code examples for applying core object-oriented design principles and common refactoring patterns to improve code architecture.
- Dead Code & Performance Optimization: Best practices for identifying and removing unused code, plus proven techniques for optimizing code performance without changing functionality.
- Use Case: Imagine your team has a 1000-line legacy UserController that handles user registration, email notifications, and analytics tracking. Use this Skill to safely split it into focused, single-responsibility services, eliminate unused legacy code, and reduce the module's cyclomatic complexity by 60% while keeping all existing tests passing.
Quick Start
Use the code-refactorer skill to split the monolithic OrderProcessing class into separate order validation, payment processing, and inventory management services while ensuring all existing unit tests continue to pass.