refactoring
Installation
SKILL.md
Refactoring Skill
- Use language-specific skills when ever possible.
- Unless explicitly asked to refactor code directly, generate a refactoring plan first and only apply it if the user approves.
Workflow
- Understand: Read existing code, identify purpose and behavior, review existing tests
- Identify code smells: Long methods/classes, duplicated code, complex conditionals, poor naming, tight coupling, low cohesion
- Plan: Select appropriate refactoring patterns:
- Extract Method / Extract Class
- Rename for clarity
- Introduce Parameter Object
- Replace Conditional with Polymorphism
- Simplify Complex Expressions
- Apply SOLID principles, reduce dependencies, improve abstraction levels
- Execute safely: Make small, incremental changes. Run tests after each change.
- Verify: Ensure all tests pass and functionality is preserved