Claude Skill MartBrowse skillsQuick linesLearn by videoTerminal guideWhat is a Skill?
Back to list

Code Refactor (bulk rename & replace)

A skill that performs multi-file renames and pattern replacements safely using a Grep → Edit → verify workflow.

Dev & CodingIntermediate66094AI 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 the code-execution skill's rename_identifier for 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 varlet/const.

Examples

  1. "Rename getUserData to fetchUserData" → locates 15 occurrences in 5 files, reports scope, replaces, then re-greps to confirm zero matches.
  2. "Update all /api/auth/login calls to /api/v2/authentication/login" → swaps the string and recommends integration tests.
  3. 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)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Download 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.

  1. Open a terminal.
  2. Clone the repo: git clone https://github.com/mhattingpete/claude-skills-marketplace.git
  3. Create the skills directory: mkdir -p ~/.claude/skills
  4. Copy the skill: cp -r claude-skills-marketplace/code-operations-plugin/skills/code-refactor ~/.claude/skills/
  5. (Recommended) Also copy the code-execution skill from the same repo if you want the 10+ file execution mode to work.
  6. Restart Claude Code, open your project, and ask something like "rename foo to bar everywhere".
  7. Commit or check git status before refactoring, and run your test suite afterwards to verify.
View source on GitHubLicense: Apache-2.0