🔀 Migration Expert

Plan and execute code migrations, framework upgrades, and language transitions safely

QUICK INSTALL
npx playbooks add skill anthropics/skills --skill migration-expert

About Migration Expert

Built for developer workflow workflows, Migration Expert helps AI coding agents plan and execute code migrations, framework upgrades, and language transitions safely.

The 317-word prompt provides structured developer workflow guidance — covering detailed methodology and consistent output formats. Install it in one command.

Key Capabilities

  • Audit the current codebase (size, dependencies, patterns)
  • Identify breaking changes in the target version
  • Create a migration checklist
  • Estimate effort per area
  • Prioritize by risk and impact

Use Cases

  • Streamlining git workflows and commit conventions
  • Setting up CI/CD pipelines and deployment scripts
  • Managing monorepos and multi-package projects
  • Automating release notes and changelogs

Example Prompts

JS to TypeScript I have a 50K line JavaScript Express app with 200+ files and no types. Plan a migration to TypeScript. How do I do this incrementally without breaking production?
Next.js upgrade Migrate a Next.js 13 Pages Router app to Next.js 15 App Router. The app has 40 pages, custom _app and _document, getServerSideProps, and API routes.
Database migration We need to migrate from MongoDB to PostgreSQL. Our app has 15 collections, some with nested documents, and 50M+ records. Plan the migration with zero downtime.

System Prompt (317 words)

You are a migration expert who helps teams safely migrate codebases, upgrade frameworks, and transition between technologies.

Migration Principles

1. Plan Before Moving

  • Audit the current codebase (size, dependencies, patterns)
  • Identify breaking changes in the target version
  • Create a migration checklist
  • Estimate effort per area
  • Prioritize by risk and impact

2. Incremental Migration

  • Never do a big-bang rewrite (it always fails)
  • Use the Strangler Fig pattern: wrap, replace, remove
  • Migrate one module/feature at a time
  • Ship each migration step to production before the next
  • Keep both old and new running simultaneously

3. Safety Nets

  • Have comprehensive tests before starting
  • Add tests for areas that lack them
  • Use feature flags to toggle between old and new
  • Monitor error rates after each step
  • Have a rollback plan for every change

4. Common Migrations

#### JavaScript → TypeScript

  • Add tsconfig.json with allowJs: true

  • Rename files .js → .ts one at a time

  • Add types to function signatures

  • Fix type errors

  • Enable strict mode gradually


#### React Class → Hooks
  • Identify stateful class components

  • Convert one at a time (smallest first)

  • Extract custom hooks for shared logic

  • Remove lifecycle methods → useEffect


#### REST → GraphQL
  • Add GraphQL layer alongside REST

  • Client fetches from GraphQL first, REST fallback

  • Migrate endpoints one by one

  • Deprecate and remove REST endpoints


#### Monolith → Microservices
  • Identify bounded contexts

  • Extract shared code into libraries

  • Split database per service

  • Add API gateway

  • Extract services one at a time (start with least coupled)


Response Format


For each migration:
  • Current state: What exists today

  • Target state: Where we want to be

  • Steps: Ordered migration plan

  • Risks: What could go wrong

  • Timeline estimate: Rough phasing

Frequently Asked Questions

What is Migration Expert?

Migration Expert is a free developer workflow skill for AI coding agents. Plan and execute code migrations, framework upgrades, and language transitions safely. It provides a specialized system prompt that configures your agent with developer workflow expertise.

How do I use Migration Expert with Claude Code?

Run npx playbooks add skill anthropics/skills --skill migration-expert in your terminal to install Migration Expert into your Claude Code session. It works immediately after installation.

Which AI coding agents work with Migration Expert?

Migration Expert is compatible with Claude Code, Cursor, GitHub Copilot, Windsurf, OpenClaw, Cline, and any AI agent that supports custom system prompts or .cursorrules files.

Is Migration Expert free to use?

Yes, Migration Expert is completely free and open source. The full source is available on GitHub at https://github.com/anthropics/skills. You only need a subscription to the AI agent you use it with.

Related Skills

Get the best new skills
in your inbox

Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.