migration

Generate reversible up and down migration scripts with rollback plans.

Updated Feb 7, 2026
One-click install
npx skills add https://github.com/maggit/claude-workspace --skill migration-maggit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migration
Source: https://github.com/maggit/claude-workspace/tree/main/skills/migration
Command: npx skills add https://github.com/maggit/claude-workspace --skill migration-maggit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generates safe, reversible migrations to manage schema changes, data transformations, and code refactors with minimal downtime and rollback guarantees.

Core Features & Use Cases

  • Detects the target migration framework (Prisma, Alembic, Rails, etc.) and the relevant migration files.
  • Produces up and down migrations with transactional safety and optional backfill steps.
  • Provides a migration plan and safeguards to ensure zero-downtime strategies where possible.
  • Use Case: When adding a new column or renaming a table across a production database, this tool creates a staged plan and corresponding scripts.

Quick Start

Generate a reversible migration to add a nullable status column to users and backfill existing records.

Frequently Asked Questions about migration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate reversible database migrations with rollback support?

Reversible database migrations require paired up and down scripts with transactional safety. Generating them involves creating staged schema changes, ensuring idempotence, and outlining clear rollback plans to guarantee safe execution.

How do I backfill existing records when adding a nullable database column?

Backfilling records when adding a nullable database column requires a staged migration plan. You generate an up migration to add the column, followed by a separate script to backfill existing records while maintaining zero-downtime.

Does this migration generation approach work with frameworks like Prisma, Alembic, and Rails?

Yes, this approach works with frameworks like Prisma, Alembic, and Rails. It automatically detects the target migration framework and relevant migration files to produce compatible, transactional up and down scripts.

What is the best way to ensure zero-downtime during a production database schema change?

The best way to ensure zero-downtime during a production database schema change is using a staged migration plan with backfill strategies. This method applies transactional safety and idempotent scripts to prevent lock-ups.

How do I make sure my data migration scripts are idempotent and safe to re-run?

To make data migration scripts idempotent and safe to re-run, you must include safety checks within the migration logic. Generating scripts with built-in transactional safety and descriptive naming ensures operations can execute repeatedly without duplicate data.