code-refactor

Automate multi-file code refactoring by renaming identifiers and updating API calls.

Updated Dec 4, 2025
One-click install
npx skills add https://github.com/jr2804/prompts --skill code-refactor-jr2804
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-refactor
Source: https://github.com/jr2804/prompts/tree/main/skills/development/code-refactor
Command: npx skills add https://github.com/jr2804/prompts --skill code-refactor-jr2804

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates bulk code refactoring across multiple files, reducing manual search-and-replace work and helping maintain consistency when renaming identifiers, updating deprecated patterns, or realigning API calls.

Core Features & Use Cases

  • Bulk global renaming: Rename identifiers across a codebase with previews and safe verification.
  • Pattern updates: Replace deprecated patterns or update APIs across modules.
  • Consistency across files: Ensure uniform changes in naming and calls across projects of any size.

Quick Start

Use this skill to rename an identifier across a repository. For example: rename getUserData to fetchUserData across all relevant files, then review changes and confirm.

Frequently Asked Questions about code-refactor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I rename a function across multiple files in a large codebase?

Multi-file code refactoring automates renaming identifiers across a large codebase by applying bulk updates with previews and safe verification. The skill auto-switches to code-execution mode for 10+ files to ensure deterministic changes.

What is the best way to update deprecated API calls across an entire project?

Updating deprecated API calls across a project is handled by automated pattern replacement, which realigns function calls and ensures consistency across all relevant modules without manual search-and-replace work.

Can I safely refactor code across more than 10 files at once?

Yes, refactoring code across 10+ files is supported through an auto-switch to code-execution mode. This mode enables deterministic changes and safe verification, applying bulk updates like identifier renaming and API updates reliably.

Does multi-file refactoring work for both small changes and large codebases?

Multi-file refactoring works for both small changes and large codebases. It uses a native workflow for small modifications and automatically switches to code-execution mode for medium to large scale operations involving 10 or more files.

What limitations should I expect when automating bulk code refactoring?

Automating bulk code refactoring requires reviewing provided previews before confirming changes. While it handles pattern updates and identifier renaming across many files, users must verify safe application and confirm the modifications to ensure consistency.