$npx skillfedfor your agent

code-refactor

Code Refactor handles systematic refactoring operations like renaming identifiers, replacing deprecated patterns, and updating method calls across your codebase. It intelligently switches to execution mode for larger jobs (10+ files), delivering significant token savings while maintaining accuracy through a safe find-analyze-execute-verify workflow.

Code Refactor renames identifiers and replaces patterns across multiple files, auto-switching to execution mode for 10+ files to save tokens.

AI-generated summary based on this skill's SKILL.md

657 91 Apache-2.0updated by mhattingpete

Decision gist · record as of 2026-07-25

Code Refactor renames identifiers and replaces patterns across multiple files, auto-switching to execution mode for 10+ files to save tokens. Code Refactor handles systematic refactoring operations like renaming identifiers, replacing deprecated patterns, and updating method calls across your codebase. It intelligently switches to execution mode for larger jobs (10+ files), delivering significant token savings while maintaining accuracy through a safe find-analyze-execute-verify workflow.

manual: git clone https://github.com/mhattingpete/claude-skills-marketplace → cp -r claude-skills-marketplace/code-operations-plugin/skills/code-refactor ~/.claude/skills/code-refactor
code-operations-plugin/skills/code-refactor/SKILL.md · version 5f78694b

Use it when

  • Yes.
  • Code Refactor intelligently handles multi-file refactoring by detecting the scale of the operation.

Verify before relying

Read SKILL.md below before installing (1 file). Open directory: indexed for reading, not audited.

Same gist for agents: .md · .json

Install

mhattingpete/claude-skills-marketplace/code-refactor · repository language: HTML

Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How does code-refactor rename variables across all files?

Code Refactor scans your codebase to identify all occurrences of the target identifier, then applies the rename systematically across every file where it appears. For projects with 10 or more files, it switches to execution mode, which optimizes token usage while maintaining accuracy through its find-analyze-execute-verify workflow.

Can code-refactor bulk find and replace code patterns?

Yes. Code Refactor performs bulk find-and-replace operations safely by first analyzing the scope of changes needed, then executing the replacement across all matching locations. This systematic approach ensures deprecated patterns, old API endpoints, and other code elements are updated consistently throughout your project.

What makes code-refactor suitable for refactoring function names in projects?

Code Refactor intelligently handles multi-file refactoring by detecting the scale of the operation. It updates all references to renamed functions across your codebase while verifying that changes maintain code integrity. The skill's verification step catches issues before they propagate.

How does code-refactor update deprecated API calls everywhere?

Code Refactor identifies all instances of deprecated API calls in your codebase and replaces them systematically. Whether updating method calls, changing function names, or replacing old endpoints, it applies changes consistently across all files while the verify step ensures the refactoring is complete and correct.

Does code-refactor automate large-scale code refactoring with verification?

Code Refactor automates large-scale transformations through a safe find-analyze-execute-verify workflow. For jobs spanning 10+ files, it enters execution mode to deliver significant token savings. The verification phase confirms all changes are applied correctly before completion, making it reliable for mass code transformations.

What refactoring operations can code-refactor perform systematically?

Code Refactor handles identifier renaming, deprecated pattern replacement, API call updates, method reference changes, and syntax conversions (like var to let). Its systematic approach works across single and multi-file scopes, with intelligent mode switching that optimizes performance for larger codebases while maintaining accuracy.

SKILL.md

Rendered from the published skill. Quoted content, verbatim.

Code Refactor

Systematic code refactoring across files. Auto-switches to execution mode for 10+ files (90% token savings).

Mode Selection

  • 1-9 files: Use native tools (Grep + Edit with replace_all)
  • 10+ files: Automatically use code-execution skill

Execution example (50 files):

from api.code_transform import rename_identifier
result = rename_identifier('.', 'oldName', 'newName', '**/*.py')
# Returns: {'files_modified': 50, 'total_replacements': 247}
# ~500 tokens vs ~25,000 tokens traditional

When to Use

  • "rename [identifier] to [new_name]"
  • "replace all [pattern] with [replacement]"
  • "refactor to use [new_pattern]"
  • "update all calls to [function/API]"
  • "convert [old_pattern] to [new_pattern]"

Core Workflow (Native Mode)

1. Find All Occurrences

``` Grep(pattern="getUserData",

(truncated - see the full file via the links below)

File tree — 1 file
code-operations-plugin/skills/code-refactor/SKILL.md

Let your AI agent find skills like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.

wish › “Rename identifiers across multiple files efficiently”

Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →

Related skills

code-transfer
by mhattingpete · mhattingpete/claude-skills-marketplace

Code Transfer handles moving code blocks between files with exact line-number control. Choose between basic mode for small operations or execution mode for batch transfers across many files. Perfect for reorganizing functions, extracting classes, or inserting code at specific locations.

Apache-2.0updated Jul 2026
★ 657repo stars
test-fixing
by mhattingpete · mhattingpete/claude-skills-marketplace

test-fixing identifies all failing tests, groups them by error type and root cause, then fixes them in priority order. It handles infrastructure issues first (imports, dependencies), then API changes, then logic bugs. After each fix group passes, it moves to the next until the full suite succeeds.

Apache-2.0updated Jul 2026
★ 657repo stars
code-auditor
by mhattingpete · mhattingpete/claude-skills-marketplace

Code Auditor performs a systematic examination of your entire codebase, evaluating architecture decisions, code quality patterns, security posture, performance characteristics, test coverage, and maintainability factors. It delivers prioritized findings with specific file references and actionable recommendations, supporting focused audits on security, performance, or testing alone.

Apache-2.0updated Jul 2026
★ 657repo stars
file-operations
by mhattingpete · mhattingpete/claude-skills-marketplace

File Operations retrieves detailed file metadata and statistics—including size, line counts, modification times, and content analysis—using read-only operations. Ideal for understanding file structure and gathering code metrics across projects.

Apache-2.0updated Jul 2026
★ 657repo stars
conversation-analyzer
by mhattingpete · mhattingpete/claude-skills-marketplace

This skill scans your conversation history to surface usage trends, identify repetitive tasks ripe for automation, and pinpoint workflow inefficiencies. It categorizes requests by type, tracks project activity, detects time-of-day patterns, and flags vague or complex requests that slow you down. Analysis runs locally on your machine for privacy, delivering prioritized recommendations you can act on immediately.

Apache-2.0updated Jul 2026
★ 657repo stars
feature-planning
by mhattingpete · mhattingpete/claude-skills-marketplace

Feature Planning transforms vague feature requests into structured implementation roadmaps. It systematically clarifies requirements, explores your codebase for patterns, designs components, and generates discrete, sequenced tasks with file paths and dependencies. Integrates with plan-implementer to execute each task.

Apache-2.0updated Jul 2026
★ 657repo stars

More skills timeline-creator (Apache-2.0) · dashboard-creator (Apache-2.0) · flowchart-creator (Apache-2.0) · project-bootstrapper (Apache-2.0)

Tags
batch-transformationidentifier-renamingpattern-replacementmulti-file-editingapi-modernizationsyntax-migrationcodebase-cleanupbulk-operations