What problem does it solve?
This Skill addresses the need for safe and efficient code refactoring, enabling developers to restructure, modernize, and improve the quality of their codebases without introducing bugs or breaking functionality.
Core Features & Use Cases
- Safe Renaming: Rename identifiers across the codebase with a step-by-step process ensuring no unintended side effects.
- Method Extraction: Extract long or duplicated code blocks into separate functions, improving readability and maintainability.
- Class Splitting: Break down large classes into smaller, more focused components, enhancing testability and organization.
- Complexity Reduction: Reduce cyclomatic complexity through various refactoring techniques.
- Code Migration: Migrate code between different patterns, versions, or languages.
- Use Case: If you have a large Python codebase with a complex structure and you want to rename a function across all modules, this skill can automate the process and ensure the rename doesn't break any dependencies.
Quick Start
Run the 'refactor' command with the 'rename' argument and specify the old and new function names, like: refactor rename 'old_function_name' 'new_function_name'.