db-migration-architect
Architect zero-downtime SQL migrations with automatic dialect detection and phased deployment plans.
- Generate paired UP/DOWN migrations for complex schema changes.
- Convert destructive one-step migrations into safe, multi-phase rollout plans.
- Audit existing migrations for locking risks on high-traffic tables.
$12
One-time purchase
Included in download
- Generate paired UP/DOWN migrations for complex schema changes.
- Convert destructive one-step migrations into safe, multi-phase rollout plans.
- file_read, file_write automation included
- Includes example output and usage patterns
See it in action
Severity: 🟡 Locking (Phased) Phase 1: Add 'email' as nullable. Phase 2: Backfill data. Phase 3: Set NOT NULL. -- UP (Phase 3) ALTER TABLE users ALTER COLUMN email SET DEFAULT 'not-set'; ALTER TABLE users ALTER COLUMN email SET NOT NULL; -- DOWN ALTER TABLE users ALTER COLUMN email DROP NOT NULL;
db-migration-architect
Architect zero-downtime SQL migrations with automatic dialect detection and phased deployment plans.
$12
One-time purchase
⚡ Also available via Agensi MCP — your AI agent can load this skill on demand via MCP. Learn more →
Included in download
- Generate paired UP/DOWN migrations for complex schema changes.
- Convert destructive one-step migrations into safe, multi-phase rollout plans.
- file_read, file_write automation included
- Includes example output and usage patterns
- Instant install
See it in action
Severity: 🟡 Locking (Phased) Phase 1: Add 'email' as nullable. Phase 2: Backfill data. Phase 3: Set NOT NULL. -- UP (Phase 3) ALTER TABLE users ALTER COLUMN email SET DEFAULT 'not-set'; ALTER TABLE users ALTER COLUMN email SET NOT NULL; -- DOWN ALTER TABLE users ALTER COLUMN email DROP NOT NULL;
About This Skill
What it does
The DB Migration Architect is a specialized tool for developers who need to evolve their database schemas without causing outages or data loss. It analyzes your ORM model changes, schema diffs, or natural language descriptions to generate safe, rollback-ready migration scripts. It automatically detects your database dialect (PostgreSQL, MySQL, SQLite, SQL Server) and framework conventions (Alembic, Django, Prisma, Knex, etc.) to produce code that fits perfectly into your existing repository.
Why use this skill
Directly asking an LLM for a migration often results in "simple" SQL that can lock production tables for hours or break running application code. This skill enforces zero-downtime principles by default. It identifies hazardous operations—like adding a NOT NULL constraint to a large table or renaming a column—and automatically proposes a phased rollout (e.g., add nullable, backfill, then enforce constraint). It saves you from the "ALTER TABLE" trap that causes production incidents.
Supported frameworks & tools
- Python: Alembic, Django
- JavaScript/TypeScript: Prisma, Knex, TypeORM
- Others: Rails ActiveRecord, Flyway, Liquibase, and Raw SQL
- Dialects: Deep support for PostgreSQL (concurrent indexes), MySQL (online DDL), and more.
The Output
You receive a structured migration plan including a severity rating (Safe, Locking, or Destructive), paired UP and DOWN scripts, and detailed deployment notes explaining how to coordinate the schema change with your application code deployments.
📖 Learn more: Best DevOps & Deployment Skills for Claude Code →
Use Cases
- Generate paired UP/DOWN migrations for complex schema changes.
- Convert destructive one-step migrations into safe, multi-phase rollout plans.
- Audit existing migrations for locking risks on high-traffic tables.
- Detect and match migration styles for Alembic, Prisma, Django, and more.
How to Install
mkdir -p ~/.claude/skills && curl -sL https://www.agensi.io/api/install/db-migration-architect | tar xz -C ~/.claude/skills/Free skills install directly. Paid skills require purchase - use the download button above after buying.
Reviews
No reviews yet - be the first to share your experience.
Only users who have downloaded or purchased this skill can leave a review.
Early access skill
Be the first to review this skill.
Only users who have downloaded or purchased this skill can leave a review.
Security Scanned
Passed automated security review
Permissions
Reads model definitions and existing migrations, writes new migration files in the project's framework convention. Does not connect to any database, does not run migrations, and refuses single-step destructive operations by default.
Creator
Frequently Asked Questions
Learn More About AI Agent Skills
Similar Skills
git-commit-writer
Writes conventional commit messages by analyzing your staged git changes. Detects commit type, scope, and breaking changes automatically.
env-doctor
Diagnoses why your project will not start. Checks runtime versions, dependencies, environment variables, databases, ports, and build artifacts systematically.
code-reviewer
Reviews your code for bugs, security vulnerabilities, logic errors, performance issues, and style violations. Organizes findings by severity and suggests fixes with code examples.
readme-generator
Generates a complete, polished README.md by scanning your actual project structure, dependencies, and code.