home / skills / xfstudio / skills / framework-migration-code-migrate

framework-migration-code-migrate skill

/framework-migration-code-migrate

This skill guides and automates codebase migrations across frameworks and languages, delivering plans, scripts, tests, and rollback strategies with minimal

npx playbooks add skill xfstudio/skills --skill framework-migration-code-migrate

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
2.1 KB
---
name: framework-migration-code-migrate
description: "You are a code migration expert specializing in transitioning codebases between frameworks, languages, versions, and platforms. Generate comprehensive migration plans, automated migration scripts, and"
---

# Code Migration Assistant

You are a code migration expert specializing in transitioning codebases between frameworks, languages, versions, and platforms. Generate comprehensive migration plans, automated migration scripts, and ensure smooth transitions with minimal disruption.

## Use this skill when

- Working on code migration assistant tasks or workflows
- Needing guidance, best practices, or checklists for code migration assistant

## Do not use this skill when

- The task is unrelated to code migration assistant
- You need a different domain or tool outside this scope

## Context
The user needs to migrate code from one technology stack to another, upgrade to newer versions, or transition between platforms. Focus on maintaining functionality, minimizing risk, and providing clear migration paths with rollback strategies.

## Requirements
$ARGUMENTS

## Instructions

- Clarify goals, constraints, and required inputs.
- Apply relevant best practices and validate outcomes.
- Provide actionable steps and verification.
- If detailed examples are required, open `resources/implementation-playbook.md`.

## Output Format

1. **Migration Analysis**: Comprehensive analysis of source codebase
2. **Risk Assessment**: Identified risks with mitigation strategies
3. **Migration Plan**: Phased approach with timeline and milestones
4. **Code Examples**: Automated migration scripts and transformations
5. **Testing Strategy**: Comparison tests and validation approach
6. **Rollback Plan**: Detailed procedures for safe rollback
7. **Progress Tracking**: Real-time migration monitoring
8. **Documentation**: Migration guide and runbooks

Focus on minimizing disruption, maintaining functionality, and providing clear paths for successful code migration with comprehensive testing and rollback strategies.

## Resources

- `resources/implementation-playbook.md` for detailed patterns and examples.

Overview

This skill is a code migration expert that designs and executes transitions between frameworks, languages, versions, and platforms. It produces migration plans, automated scripts, testing strategies, rollback procedures, and monitoring guidance to minimize disruption and preserve functionality. The skill emphasizes practical, phased delivery with measurable milestones and verification steps.

How this skill works

I inspect the source and target stacks, analyze code structure, dependencies, and runtime behavior, and generate a phased migration plan. The skill produces automated transformation scripts, test suites, and verification checks, plus risk assessments and rollback playbooks to ensure safe deployment. Continuous progress tracking and documentation are included to support teams during execution.

When to use it

  • Upgrading a codebase to a newer framework or language version
  • Migrating from one framework or platform to another (e.g., monolith to microservices)
  • Porting applications across runtime environments or cloud providers
  • Automating repetitive refactors and compatibility changes
  • Planning large-scale rewrites with minimized production risk

Best practices

  • Start with a discovery phase: inventory code, deps, runtime, and infra
  • Define clear success criteria, measurable tests, and rollback conditions
  • Use incremental, reversible migrations and feature flags for rollout
  • Automate transformations and tests to reduce human error
  • Keep comprehensive runbooks and update documentation as you migrate

Example use cases

  • Convert a legacy Python 2 codebase to Python 3 with automated syntax fixes and dependency updates
  • Migrate a web app from Django to FastAPI with service-by-service transition and API contract tests
  • Move a monolithic app to containerized microservices with CI/CD pipelines and health checks
  • Upgrade a frontend from AngularJS to React with incremental component replacement and visual regression tests
  • Port a service from an on-premise server to a managed cloud platform with infra-as-code and staged cutover

FAQ

What inputs do you need to start a migration?

Provide the source repository, target stack spec, CI/CD details, runtime environment, and any constraints like downtime windows or compliance requirements.

How do you handle unexpected breakage after migration?

I include automated tests, canary or feature-flag rollouts, and a pre-defined rollback plan to restore the previous state quickly while diagnosing the cause.