What problem does it solve?
This Skill addresses code that is difficult to understand, maintain, or extend by systematically improving its structure, readability, and robustness without altering its external behavior.
Core Features & Use Cases
- Code Smell Remediation: Identifies and fixes common issues like long functions, duplicated code, and large classes.
- Improved Readability: Renames variables and extracts logic into smaller, focused units.
- Type Safety Introduction: Enhances code robustness by adding type annotations and interfaces.
- Design Pattern Application: Refactors code to incorporate patterns like Strategy and Chain of Responsibility for better design.
- Use Case: You have a complex, 200-line function that performs multiple unrelated tasks. This Skill can help break it down into smaller, manageable functions, making it easier to test and modify.
Quick Start
Use the refactor skill to improve the readability of the provided code snippet by extracting methods and renaming variables.