What problem does it solve?
This Skill automates complex and large-scale code refactoring tasks, ensuring safety, precision, and consistency across your codebase by leveraging Language Server Protocol (LSP) capabilities and robust verification.
Core Features & Use Cases
- Automated Renaming: Safely rename symbols (variables, functions, classes) across an entire workspace.
- Structural Changes: Perform operations like function/class extraction and code movement with automatic reference updates.
- Pattern-Based Transformation: Apply consistent code changes based on AST-aware pattern matching.
- TDD Verification: Ensures refactoring does not break existing functionality through type checking, build checks, and test suite execution.
- Use Case: Refactor a widely used function name across a large project, ensuring all call sites are updated correctly and all tests still pass.
Quick Start
Use the lsp-refactoring skill to rename the function getUserData to fetchUserProfile across the entire project.