Code Refactor (bulk rename & replace)
A skill that performs multi-file renames and pattern replacements safely using a Grep → Edit → verify workflow.
Dev & CodingIntermediate★ 660⑂ 94AI score 10/10Last updated: Jul 25, 2026
What it does
- Finds and replaces identifiers, function names, and API paths consistently across an entire codebase.
- Follows a 6-step safe process: Search → Analyze → Inform scope → Execute → Verify with Grep → Suggest tests.
- Uses native tools (Grep +
Edit(replace_all=true)) for 1–9 files and auto-switches to thecode-executionskill'srename_identifierfor 10+ files, cutting token usage dramatically. - Flags edge cases up front: matches inside strings/comments, exported APIs (breaking changes), and case sensitivity.
Who it's for
- Developers cleaning up naming in legacy code.
- Teams migrating API endpoints across dozens of call sites.
- Frontend devs sweeping out deprecated patterns like
var→let/const.
Examples
- "Rename getUserData to fetchUserData" → locates 15 occurrences in 5 files, reports scope, replaces, then re-greps to confirm zero matches.
- "Update all /api/auth/login calls to /api/v2/authentication/login" → swaps the string and recommends integration tests.
- Renaming an identifier across 50 Python files → switches to execution mode and returns only a summary like
files_modified: 50, total_replacements: 247.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/mhattingpete/claude-skills-marketplace/HEAD/code-operations-plugin/skills/code-refactor/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the code-operations-plugin/skills/code-refactor folder from the GitHub repo mhattingpete/claude-skills-marketplace into my ~/.claude/skills/code-refactor/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/mhattingpete/claude-skills-marketplace.git && mkdir -p ~/.claude/skills && cp -r claude-skills-marketplace/code-operations-plugin/skills/code-refactor ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal.
- Clone the repo:
git clone https://github.com/mhattingpete/claude-skills-marketplace.git - Create the skills directory:
mkdir -p ~/.claude/skills - Copy the skill:
cp -r claude-skills-marketplace/code-operations-plugin/skills/code-refactor ~/.claude/skills/ - (Recommended) Also copy the
code-executionskill from the same repo if you want the 10+ file execution mode to work. - Restart Claude Code, open your project, and ask something like "rename foo to bar everywhere".
- Commit or check
git statusbefore refactoring, and run your test suite afterwards to verify.
View source on GitHub ↗License: Apache-2.0