code-refactor

Rename identifiers, replace patterns, and update API calls across multiple files.

27|10|Updated Dec 27, 2025
One-click install
npx skills add https://github.com/nilecui/SkillsBase --skill code-refactor-nilecui
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-refactor
Source: https://github.com/nilecui/SkillsBase/tree/main/.cursor/skills/code-refactor
Command: npx skills add https://github.com/nilecui/SkillsBase --skill code-refactor-nilecui

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates repetitive and error-prone code modifications across multiple files, ensuring consistency and saving significant development time.

Core Features & Use Cases

  • Bulk Renaming: Renames variables, functions, or classes across an entire codebase.
  • Pattern Replacement: Updates deprecated code patterns or applies consistent changes to specific code structures.
  • API Call Updates: Modifies function or API call signatures uniformly throughout the project.
  • Use Case: Refactor all instances of a deprecated function old_api_call to new_api_call across 50 Python files, ensuring the codebase remains up-to-date and functional.

Quick Start

Use the code refactor skill to rename the variable 'temp_value' to 'processed_value' in all Python files within the current directory.

Frequently Asked Questions about code-refactor

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

FAQPage Schema
How do I perform bulk code refactoring across multiple files?

Bulk code refactoring across multiple files is automated by switching to automated execution for scopes involving 10+ files, ensuring consistent modifications throughout the codebase. It utilizes native Grep and Edit tools for smaller refactoring operations.

What is the best way to update deprecated API calls consistently throughout a project?

Updating deprecated API calls consistently throughout a project is achieved by uniformly modifying function or API call signatures across the codebase. This ensures the project remains modernized and functional without manual, error-prone edits.

Can I rename variables and functions across an entire codebase without manual find and replace?

Renaming variables, functions, or classes across an entire codebase is fully supported by this bulk refactoring approach. It replaces repetitive manual find and replace operations, ensuring identifier consistency and saving development time.

Does this automated code transformation work for replacing specific code patterns?

Automated code transformation works for replacing specific code patterns by applying consistent changes to targeted code structures. This addresses scenarios requiring uniform modifications to maintain codebase maintainability.

When should I use automated execution instead of native tools for code refactoring?

Automated execution for code refactoring should be used for larger scopes involving 10 or more files. For smaller refactoring operations, native tools like Grep and Edit are utilized to perform the modifications directly.