| name | migrate-framework |
| description | Assists with migrating between frameworks or major versions — Express to Fastify, CRA to Vite, Vue 2 to Vue 3, class components to hooks, etc. Creates a migration plan, identifies breaking changes, and provides file-by-file migration order. |
| argument-hint | [source framework] to [target framework] |
| allowed-tools | Read, Grep, Glob, Bash, Write, Edit |
Framework Migration Assistant
Detect Current Setup
!ls package.json requirements.txt go.mod Cargo.toml *.csproj Gemfile composer.json 2>/dev/null
!cat package.json 2>/dev/null | head -30
!find . -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" -o -name "*.py" -o -name "*.go" -o -name "*.rs" \) -not -path "*/node_modules/*" -not -path "*/.git/*" 2>/dev/null | head -30
Migration Process
Step 1: Audit Current Usage
- Identify all imports/requires of the source framework
- Map which features and APIs are used
- Catalog plugins, middleware, and extensions in use
- Count affected files and estimate scope
Step 2: Map Source to Target
For each source feature in use, determine:
| Source API | Target Equivalent | Breaking Change? | Notes |
|---|
| ... | ... | Yes/No | ... |
Flag features with NO direct equivalent — these need custom solutions.
Step 3: Migration Plan
Create an ordered migration plan:
- Setup: Install target framework alongside source (coexistence period)
- Configuration: Migrate config files (build config, env, plugins)
- Core: Migrate entry points and routing
- Components/Modules: Migrate individual files (ordered by dependency — leaves first)
- Tests: Update test setup and migrate test files
- Cleanup: Remove source framework dependencies
Step 4: File-by-File Migration Order
List every file that needs changes, ordered by:
- No dependencies on other migrated files (migrate first)
- Shared utilities and types
- Core modules
- Feature modules
- Entry points (migrate last)
Step 5: Execute Migration
For each file:
- Show the current code
- Show the migrated code
- Explain what changed and why
- Run tests after each file to catch regressions
Rules
- Migrate incrementally — one file or module at a time
- Keep both frameworks running during migration if possible
- Run tests after every change
- Don't change functionality during migration — only change the framework layer
- Flag any features that cannot be migrated 1:1