code-refactor
Perform bulk code refactoring operations like renaming variables/functions across files, replacing patterns, and updating API calls. Use when users request renaming identifiers, replacing deprecated c
Install on your platform
We auto-selected OpenClaw based on this skill’s supported platforms.
About This Skill
What it does
This skill automates large-scale code modifications within a project. It can rename variables and functions consistently across multiple files, replace specific code patterns with new ones, and update API call implementations based on provided instructions. The tool is designed to handle complex refactoring tasks that would be tedious or error-prone to perform manually.
When to use it
- Renaming Identifiers: A user requests renaming a function
oldFunctionNametonewFunctionNamethroughout the codebase. - API Migration: An API endpoint has changed, and you need to update all calls to that endpoint within your project.
- Pattern Replacement: You want to replace an outdated coding pattern (e.g., using a specific library function) with a newer alternative across several files.
- Code Cleanup: A user requests removing unused imports or standardizing code formatting in a large number of files.
Key capabilities
- Rename variables and functions across multiple files
- Replace code patterns with new implementations
- Update API call implementations
- Handles complex refactoring tasks
Example prompts
- "Refactor all instances of
calculateTotaltocomputeOrderSummary." - "Replace all uses of the deprecated
oldApiCall()function withnewApiCall(parameters)." - “Rename variable ‘user_id’ to ‘userId’ in all files.”
Tips & gotchas
This skill requires a clear understanding of the codebase and potential impact of refactoring changes. Always review the proposed modifications carefully before applying them, especially when dealing with large-scale replacements or API updates.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
Details
- Version
- v1.0.0
- License
- Apache-2.0
- Author
- mhattingpete
- Installs
- 0
🔓 Unverified
Not yet reviewed. Use with caution.