
Migration Architect
FreePlan and execute zero-downtime migrations with confidence.
Free · Opens the source repo
What Migration Architect does
Migration Architect is a skill designed for engineers and developers who need to manage complex system migrations with minimal disruption to business operations. It provides a set of tools for planning, executing, and validating migrations across systems, databases, and infrastructures. The skill emphasizes zero-downtime strategies, ensuring that transitions are smooth and that rollback plans are in place to mitigate risks associated with migration failures.
At the core of Migration Architect is its ability to break down migrations into manageable phases. This phased approach allows teams to assess risks, estimate timelines, and communicate effectively with stakeholders throughout the migration process. The skill includes automated tools for compatibility validation, ensuring that database schema changes and API updates do not introduce breaking changes that could disrupt services.
In addition to planning and compatibility checks, Migration Architect generates detailed rollback strategies tailored to each migration phase. This includes automated rollback plans, data recovery scripts, and validation checkpoints that define success criteria. By preparing for potential issues in advance, teams can confidently proceed with migrations, knowing they have a clear path to revert changes if necessary.
Whether you are migrating databases, replacing systems, or transitioning infrastructure, Migration Architect provides the methodologies and tools needed to ensure a successful migration with minimal business impact. It is particularly valuable in high-stakes environments where downtime can lead to significant losses, making it an essential resource for any engineering team involved in system transitions.
When to use it
Use Migration Architect when planning a migration of databases, infrastructure, or services, especially in scenarios where business continuity is critical.
When not to use it
This skill may not be suitable for simple migrations or projects with minimal risk, where traditional methods may suffice.
What you can build with it
Database Schema Migration
Utilize the skill to plan and execute a migration of your database schema, ensuring compatibility and rollback strategies are in place.
Infrastructure Transition
Apply Migration Architect when transitioning infrastructure to a new cloud provider, minimizing downtime and risk.
Service Replacement
Use the skill to manage the migration of services, implementing strategies like the Strangler Fig Pattern to ensure a smooth transition.
How to install Migration Architect
View source1. Install with the skills CLI
npx skills add alirezarezvani/claude-skills/migration-architect --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by alirezarezvaniMigration Architect
Tier: POWERFUL
Category: Engineering - Migration Strategy
Purpose: Zero-downtime migration planning, compatibility validation, and rollback strategy generation
Overview
The Migration Architect skill provides comprehensive tools and methodologies for planning, executing, and validating complex system migrations with minimal business impact. This skill combines proven migration patterns with automated planning tools to ensure successful transitions between systems, databases, and infrastructure.
Core Capabilities
1. Migration Strategy Planning
- Phased Migration Planning: Break complex migrations into manageable phases with clear validation gates
- Risk Assessment: Identify potential failure points and mitigation strategies before execution
- Timeline Estimation: Generate realistic timelines based on migration complexity and resource constraints
- Stakeholder Communication: Create communication templates and progress dashboards
2. Compatibility Analysis
- Schema Evolution: Analyze database schema changes for backward compatibility issues
- API Versioning: Detect breaking changes in REST/GraphQL APIs and microservice interfaces
- Data Type Validation: Identify data format mismatches and conversion requirements
- Constraint Analysis: Validate referential integrity and business rule changes
3. Rollback Strategy Generation
- Automated Rollback Plans: Generate comprehensive rollback procedures for each migration phase
- Data Recovery Scripts: Create point-in-time data restoration procedures
- Service Rollback: Plan service version rollbacks with traffic management
- Validation Checkpoints: Define success criteria and rollback triggers
Quick Start — plan → check compatibility → generate rollback
All paths relative to this skill folder; sample inputs in assets/, expected shapes in expected_outputs/.
# 1. Generate the migration plan from a spec (copy assets/sample_database_migration.json)
python3 scripts/migration_planner.py --input migration_spec.json --format json -o migration_plan.json
# 2. Check schema/API compatibility — exits non-zero unless fully compatible (CI gate)
python3 scripts/compatibility_checker.py --before assets/database_schema_before.json --after assets/database_schema_after.json --type database --format json -o compatibility.json
# 3. Generate the rollback runbook from the plan
python3 scripts/rollback_generator.py --input migration_plan.json --format both -o rollback_runbook
Outputs chain: migration_plan.json (phases, risks, estimated_duration_hours) feeds step 3; compatibility.json reports overall_compatibility plus breaking_changes_count / potentially_breaking_count.
Gate: the migration is not approved until (a) compatibility_checker exits 0 (overall_compatibility: compatible) or every breaking/potentially-breaking item is explicitly accepted by the owner in writing, and (b) a rollback runbook exists for every phase in the plan. Re-run both checks after any schema revision.
Migration Patterns
Database Migrations
Schema Evolution Patterns
-
Expand-Contract Pattern
- Expand: Add new columns/tables alongside existing schema
- Dual Write: Application writes to both old and new schema
- Migration: Backfill historical data to new schema
- Contract: Remove old columns/tables after validation
-
Parallel Schema Pattern
- Run new schema in parallel with existing schema
- Use feature flags to route traffic between schemas
- Validate data consistency between parallel systems
- Cutover when confidence is high
-
Event Sourcing Migration
- Capture all changes as events during migration window
- Apply events to new schema for consistency
- Enable replay capability for rollback scenarios
Data Migration Strategies
-
Bulk Data Migration
- Snapshot Approach: Full data copy during maintenance window
- Incremental Sync: Continuous data synchronization with change tracking
- Stream Processing: Real-time data transformation pipelines
-
Dual-Write Pattern
- Write to both source and target systems during migration
- Implement compensation patterns for write failures
- Use distributed transactions where consistency is critical
-
Change Data Capture (CDC)
- Stream database changes to target system
- Maintain eventual consistency during migration
- Enable zero-downtime migrations for large datasets
Service Migrations
Strangler Fig Pattern
- Intercept Requests: Route traffic through proxy/gateway
- Gradually Replace: Implement new service functionality incrementally
- Legacy Retirement: Remove old service components as new ones prove stable
- Monitoring: Track performance and error rates throughout transition
graph TD
A[Client Requests] --> B[API Gateway]
B --> C{Route Decision}
C -->|Legacy Path| D[Legacy Service]
C -->|New Path| E[New Service]
D --> F[Legacy Database]
E --> G[New Database]
Parallel Run Pattern
- Dual Execution: Run both old and new services simultaneously
- Shadow Traffic: Route production traffic to both systems
- Result Comparison: Compare outputs to validate correctness
- Gradual Cutover: Shift traffic percentage based on confidence
Canary Deployment Pattern
- Limited Rollout: Deploy new service to small percentage of users
- Monitoring: Track key metrics (latency, errors, business KPIs)
- Gradual Increase: Increase traffic percentage as confidence grows
- Full Rollout: Complete migration once validation passes
Infrastructure Migrations
Cloud-to-Cloud Migration
-
Assessment Phase
- Inventory existing resources and dependencies
- Map services to target cloud equivalents
- Identify vendor-specific features requiring refactoring
-
Pilot Migration
- Migrate non-critical workloads first
- Validate performance and cost models
- Refine migration procedures
-
Production Migration
- Use infrastructure as code for consistency
- Implement cross-cloud networking during transition
- Maintain disaster recovery capabilities
On-Premises to Cloud Migration
-
Lift and Shift
- Minimal changes to existing applications
- Quick migration with optimization later
- Use cloud migration tools and services
-
Re-architecture
- Redesign applications for cloud-native patterns
- Adopt microservices, containers, and serverless
- Implement cloud security and scaling practices
-
Hybrid Approach
- Keep sensitive data on-premises
- Migrate compute workloads to cloud
- Implement secure connectivity between environments
Feature Flags for Migrations
Progressive Feature Rollout
# Example feature flag implementation
class MigrationFeatureFlag:
def __init__(self, flag_name, rollout_percentage=0):
self.flag_name = flag_name
self.rollout_percentage = rollout_percentage
def is_enabled_for_user(self, user_id):
hash_value = hash(f"{self.flag_name}:{user_id}")
return (hash_value % 100) < self.rollout_percentage
def gradual_rollout(self, target_percentage, step_size=10):
while self.rollout_percentage < target_percentage:
self.rollout_percentage = min(
self.rollout_percentage + step_size,
target_percentage
)
yield self.rollout_percentage
Circuit Breaker Pattern
Implement automatic fallback to legacy systems when new systems show degraded performance:
class MigrationCircuitBreaker:
def __init__(self, failure_threshold=5, timeout=60):
self.failure_count = 0
self.failure_threshold = failure_threshold
self.timeout = timeout
self.last_failure_time = None
self.state = 'CLOSED' # CLOSED, OPEN, HALF_OPEN
def call_new_service(self, request):
if self.state == 'OPEN':
if self.should_attempt_reset():
self.state = 'HALF_OPEN'
else:
return self.fallback_to_legacy(request)
try:
response = self.new_service.process(request)
self.on_success()
return response
except Exception as e:
self.on_failure()
return self.fallback_to_legacy(request)
Data Validation and Reconciliation
Validation Strategies
-
Row Count Validation
- Compare record counts between source and target
- Account for soft deletes and filtered records
- Implement threshold-based alerting
-
Checksums and Hashing
- Generate checksums for critical data subsets
- Compare hash values to detect data drift
- Use sampling for large datasets
-
Business Logic Validation
- Run critical business queries on both systems
- Compare aggregate results (sums, counts, averages)
- Validate derived data and calculations
Reconciliation Patterns
-
Delta Detection
-- Example delta query for reconciliation SELECT 'missing_in_target' as issue_type, source_id FROM source_table s WHERE NOT EXISTS ( SELECT 1 FROM target_table t WHERE t.id = s.id ) UNION ALL SELECT 'extra_in_target' as issue_type, target_id FROM target_table t WHERE NOT EXISTS ( SELECT 1 FROM source_table s WHERE s.id = t.id ); -
Automated Correction
- Implement data repair scripts for common issues
- Use idempotent operations for safe re-execution
- Log all correction actions for audit trails
Rollback Strategies
Database Rollback
-
Schema Rollback
- Maintain schema version control
- Use backward-compatible migrations when possible
- Keep rollback scripts for each migration step
-
Data Rollback
- Point-in-time recovery using database backups
- Transaction log replay for precise rollback points
- Maintain data snapshots at migration checkpoints
Service Rollback
-
Blue-Green Deployment
- Keep previous service version running during migration
- Switch traffic back to blue environment if issues arise
- Maintain parallel infrastructure during migration window
-
Rolling Rollback
- Gradually shift traffic back to previous version
- Monitor system health during rollback process
- Implement automated rollback triggers
Infrastructure Rollback
-
Infrastructure as Code
- Version control all infrastructure definitions
- Maintain rollback terraform/CloudFormation templates
- Test rollback procedures in staging environments
-
Data Persistence
- Preserve data in original location during migration
- Implement data sync back to original systems
- Maintain backup strategies across both environments
Risk Assessment Framework
Risk Categories
-
Technical Risks
- Data loss or corruption
- Service downtime or degraded performance
- Integration failures with dependent systems
- Scalability issues under production load
-
Business Risks
- Revenue impact from service disruption
- Customer experience degradation
- Compliance and regulatory concerns
- Brand reputation impact
-
Operational Risks
- Team knowledge gaps
- Insufficient testing coverage
- Inadequate monitoring and alerting
- Communication breakdowns
Risk Mitigation Strategies
-
Technical Mitigations
- Comprehensive testing (unit, integration, load, chaos)
- Gradual rollout with automated rollback triggers
- Data validation and reconciliation processes
- Performance monitoring and alerting
-
Business Mitigations
- Stakeholder communication plans
- Business continuity procedures
- Customer notification strategies
- Revenue protection measures
-
Operational Mitigations
- Team training and documentation
- Runbook creation and testing
- On-call rotation planning
- Post-migration review processes
Migration Runbooks
Pre-Migration Checklist
- Migration plan reviewed and approved
- Rollback procedures tested and validated
- Monitoring and alerting configured
- Team roles and responsibilities defined
- Stakeholder communication plan activated
- Backup and recovery procedures verified
- Test environment validation complete
- Performance benchmarks established
- Security review completed
- Compliance requirements verified
During Migration
- Execute migration phases in planned order
- Monitor key performance indicators continuously
- Validate data consistency at each checkpoint
- Communicate progress to stakeholders
- Document any deviations from plan
- Execute rollback if success criteria not met
- Coordinate with dependent teams
- Maintain detailed execution logs
Post-Migration
- Validate all success criteria met
- Perform comprehensive system health checks
- Execute data reconciliation procedures
- Monitor system performance over 72 hours
- Update documentation and runbooks
- Decommission legacy systems (if applicable)
- Conduct post-migration retrospective
- Archive migration artifacts
- Update disaster recovery procedures
Tools and Technologies
Migration Planning Tools
- migration_planner.py: Automated migration plan generation
- compatibility_checker.py: Schema and API compatibility analysis
- rollback_generator.py: Comprehensive rollback procedure generation
Validation Tools
- Database comparison utilities (schema and data)
- API contract testing frameworks
- Performance benchmarking tools
- Data quality validation pipelines
Monitoring and Alerting
- Real-time migration progress dashboards
- Automated rollback trigger systems
- Business metric monitoring
- Stakeholder notification systems
Best Practices
Planning Phase
- Start with Risk Assessment: Identify all potential failure modes before planning
- Design for Rollback: Every migration step should have a tested rollback procedure
- Validate in Staging: Execute full migration process in production-like environment
- Plan for Gradual Rollout: Use feature flags and traffic routing for controlled migration
Execution Phase
- Monitor Continuously: Track both technical and business metrics throughout
- Communicate Proactively: Keep all stakeholders informed of progress and issues
- Document Everything: Maintain detailed logs for post-migration analysis
- Stay Flexible: Be prepared to adjust timeline based on real-world performance
Validation Phase
- Automate Validation: Use automated tools for data consistency and performance checks
- Business Logic Testing: Validate critical business processes end-to-end
- Load Testing: Verify system performance under expected production load
- Security Validation: Ensure security controls function properly in new environment
Integration with Development Lifecycle
CI/CD Integration
# Example migration pipeline stage
migration_validation:
stage: test
script:
- python scripts/compatibility_checker.py --before=old_schema.json --after=new_schema.json
- python scripts/migration_planner.py --config=migration_config.json --validate
artifacts:
reports:
- compatibility_report.json
- migration_plan.json
Infrastructure as Code
# Example Terraform for blue-green infrastructure
resource "aws_instance" "blue_environment" {
count = var.migration_phase == "preparation" ? var.instance_count : 0
# Blue environment configuration
}
resource "aws_instance" "green_environment" {
count = var.migration_phase == "execution" ? var.instance_count : 0
# Green environment configuration
}
This Migration Architect skill provides a comprehensive framework for planning, executing, and validating complex system migrations while minimizing business impact and technical risk. The combination of automated tools, proven patterns, and detailed procedures enables organizations to confidently undertake even the most complex migration projects.
Frequently asked questions about Migration Architect
Similar skills
Turborepo
Optimized build system for JavaScript/TypeScript monorepos.
Azure Pipelines Validation
Streamline your Azure DevOps pipeline changes locally.
Azure Developer CLI
Streamline your Azure project workflows with best practices.
Azure Container Registry CLI
Manage Azure Container Registry resources with ease.
Aspire
Build and orchestrate polyglot distributed applications seamlessly.
Vercel CLI
Manage and deploy Vercel projects from the command line.
