What problem does it solve?
This Skill provides a comprehensive framework and set of techniques for safely refactoring code, improving its structure and maintainability without altering its external behavior. It addresses challenges in dealing with legacy code, identifying code smells, and planning large-scale structural changes.
Core Features & Use Cases
- Code Smell Detection: Identify and address common code smells using a catalog of indicators.
- Safe Refactoring Techniques: Apply proven methods for small and large-scale refactoring, including Tidy First? and Branch by Abstraction.
- Legacy Code Improvement: Utilize specific algorithms and patterns to safely modify code lacking tests.
- Use Case: You need to refactor a complex, legacy module that lacks tests. This Skill guides you through identifying test points, breaking dependencies, writing characterization tests, and applying safe refactoring patterns to improve the code incrementally.
Quick Start
Use the safe-refactoring skill to propose a plan for refactoring legacy code that lacks tests.