migrate-draft

Draft reversible database migrations with rollback plans for schema changes.

Updated Apr 21, 2026
One-click install
npx skills add https://github.com/li3p/skills --skill migrate-draft
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migrate-draft
Source: https://github.com/li3p/skills/tree/main/skills/migrate-draft
Command: npx skills add https://github.com/li3p/skills --skill migrate-draft

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Draft a reversible database migration that follows existing project conventions. Use when adding, changing, renaming, indexing, or removing database schema elements.

Core Features & Use Cases

  • Draft forward and rollback migrations following local conventions.
  • Read existing migrations and surrounding code to infer data shapes and constraints.
  • Validate safety and rollback plans before deployment.

Quick Start

Draft a reversible migration for the next schema change following the project conventions.

Frequently Asked Questions about migrate-draft

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

FAQPage Schema
How do I draft a reversible database migration that follows existing project conventions?

To draft a reversible database migration, this Skill reads existing migrations and surrounding code to infer data shapes, generating forward and rollback plans that follow local naming conventions and provide safe defaults.

Can I use this to generate migrations for Alembic, Rails, Prisma, or TypeORM?

Yes, this Skill drafts reversible migrations for multiple systems including Alembic, Rails, Prisma, Drizzle, Knex, TypeORM, and raw SQL, adapting to the specific framework conventions found in your project.

What is the best way to ensure my database schema rollback is the exact inverse of the forward migration?

The best way to ensure rollback is the inverse of forward migrations is using this Skill, which validates safety and automatically generates inverse rollback plans that match the forward schema modifications.

Does drafting database migrations automatically flag potential data loss when renaming or removing schema elements?

Yes, when drafting database migrations to add, change, rename, index, or remove schema elements, this Skill provides safe defaults and explicitly flags potential data loss before deployment.

How do I infer data shapes and constraints from nearby models when writing schema migrations?

To infer data shapes and constraints when writing schema migrations, this Skill reads surrounding application code, models, schemas, and repositories to accurately map existing constraints into the new migration.