refactor:methods
Installation
SKILL.md
Extract Methods Refactor
Ask the user for the file or directory to refactor. Support multiple files if a directory is provided.
Process
Work through these steps in order, making a separate commit for each extraction:
-
Extract simple helper methods
- Calculations, formatting, simple logic
- Single responsibility, behavior-focused names
- Pass necessary parameters rather than sharing state
-
Extract complex logic blocks
- Validation, transformations, data processing
- Well-named methods that reveal intent
- Apply proper access modifiers (private for helpers)