code-migrator

Automate TypeScript/JavaScript code migration by updating imports, API calls, and configuration files.

Updated Nov 30, 2025
One-click install
npx skills add https://github.com/snhrm/claude-plugin --skill code-migrator-snhrm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-migrator
Source: https://github.com/snhrm/claude-plugin/tree/main/plugin/skills/code-migrator
Command: npx skills add https://github.com/snhrm/claude-plugin --skill code-migrator-snhrm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates code migrations required by breaking changes, updating import paths, API calls, and configuration files to reduce manual refactoring effort.

Core Features & Use Cases

  • Import Updates: Migrates imports from old-package to new-package automatically.
  • API Calls: Rewrites outdated API references to new equivalents.
  • Config Adjustments: Updates configuration files to align with breaking changes.
  • Use Case: Migrating a codebase from Next.js 12 to 13, updating router imports and page routing patterns.

Quick Start

In the attached codebase, apply the migration patterns for a breaking-change update from old-package to new-package.

Frequently Asked Questions about code-migrator

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

FAQPage Schema
How do I automate code migrations for breaking changes in my TypeScript project?

Code migration automation updates imports, API calls, and configuration files to align with breaking changes. It applies search-and-replace patterns across your codebase—such as renaming packages or updating API signatures—and produces structured change records, reducing manual refactoring effort.

Can I use this to migrate from Next.js 12 to Next.js 13?

Yes. This handles major framework updates by rewriting router imports, page routing patterns, and configuration files. Define your migration patterns for the specific breaking changes, and the tool applies them across your project directories.

What input do I need to run a code migration?

Provide a migration change list defining the old and new API signatures, import paths, or config values. Specify the target directories to scan. The Skill then executes search-and-replace strategies and outputs structured records of all changes made.

Does code migration work with configuration files or only source code?

It handles both. The Skill updates imports and API calls in TypeScript/JavaScript source files and also adjusts configuration files to match breaking changes, such as Next.js config shifts or package renames.

What happens if a migration pattern doesn't match any code in my project?

Patterns that find no matches simply produce no changes for that rule. The Skill outputs structured change records showing which patterns were applied and which code locations were updated, giving you full visibility into what changed.

Can I migrate code across multiple packages at once?

Yes. Define migration patterns for multiple package renames or API changes in your change list, and the Skill applies all of them in a single run across the specified directories, updating imports and usages consistently.