What problem does it solve?
This Skill addresses code that is difficult to understand, maintain, or extend by systematically improving its structure, readability, and type safety without altering its external behavior.
Core Features & Use Cases
- Code Smell Remediation: Identifies and fixes common issues like long methods, duplicated code, and primitive obsession.
- Design Pattern Application: Introduces patterns like Strategy and Chain of Responsibility to improve flexibility and organization.
- Type Safety Enhancement: Migrates code from untyped to strongly typed systems for increased robustness.
- Use Case: You have a complex function that has grown over time and is now hard to debug. Use this Skill to break it down into smaller, more manageable, and testable functions, improving overall code health.
Quick Start
Use the refactor skill to improve the structure of the provided code snippet.