Intelligent code refactoring suggestions while preserving functionality.
--- name: refactor description: Intelligent code refactoring version: 2.1.0 --- # Code Refactoring Skill Improve code quality while preserving behavior. ## Refactoring Types ### Extract - Extract function/method - Extract class - Extract variable - Extract interface ### Simplify - Simplify conditionals - Remove dead code - Flatten nested code - Consolidate duplicates ### Rename - Rename for clarity - Follow naming conventions - Improve descriptiveness ### Restructure - Reorganize code - Improve file structure - Better module boundaries ## Safety Guarantees - Preserves functionality - Suggests tests first - Step-by-step changes - Rollback guidance ## Languages Supported TypeScript, JavaScript, Python, Go, Rust, Java ## Usage ``` refactor <file_path> --type extract-function refactor <file_path> --auto ```
AI Agent Skills are reusable workflow packages that extend your AI coding assistant with multi-step capabilities. Install refactor by following these steps.
.cursor/skills/ or .codex/skills/ directory