migration-architect
它能做什么
这项技能帮助规划数据库、数据库结构、服务和数据的迁移,尽量减少停机时间。适合必须在不影响用户的前提下迁移系统的工程师。
适用场景
- ✓当你计划在正在运行的系统上迁移数据库或更改其结构的时候。
- ✓当你需要一次不会让用户停机的迁移时。
- ✓当你想为迁移失败的情况准备回滚计划的时候。
技能链接
https://github.com/alirezarezvani/claude-skills/blob/main/engineering/skills/migration-architect/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请规划将我们的用户表零停机迁移到新结构的方案,并附上回滚计划。”
每周 5 个新技能,1 分钟读完。
工作原理
它会把迁移拆分为带检查点的阶段,检查新旧版本能否同时工作,并生成用于撤销每一步的脚本。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Migration 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
常见问题
它也能帮助处理 API 变更吗?
能。它既能检查数据库变更,也能检查 API 和接口变更中是否存在破坏性差异。
什么是回滚脚本?
一个撤销迁移步骤的脚本,使你在出现故障时能恢复到之前的状态。
它会替我执行迁移吗?
它负责规划并生成脚本;你的团队仍需审查并执行它们。
详情
作者的原始描述
Use before planning any database, schema, service or data migration, especially zero-downtime ones. Generates a phased plan, a compatibility check and rollback scripts with migration_planner.py, compatibility_checker.py and rollback_generator.py.
热度
- GitHub 星标
- 29k
- 排名
- #9592
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agent-launcher-orchestrator
29k帮你的智能体从一个清晰的目标出发,逐步规划、构建、测试并定时运行你自己账户中的 Claude 托管智能体。
grade-iterate
29k让你的智能体按评分标准为托管 AI 智能体的工作打分,并在固定的轮次内改进,因此它永远不会无限循环。
interview
29k让你的智能体就一个 AI 智能体的想法对你进行访谈,并在任何上线之前,把你的回答整理成一份简单的构建计划。
run-without-you
29k帮你的智能体设置托管 AI 智能体,使其按计划或在某个事件发生时运行,并在启动前检查定时设置。