Claude Agents Marketplace
← Back to Skills
skillClaude Code ≥ 1.0/db-migrate

db-migrate

Safe database migration — review SQL, apply, verify

  • database

Install

~/.claude/skills/db-migrate/SKILL.md
Run a safe database migration:

1. Launch `prisma-expert` agent to review current schema
2. Generate migration: `npx prisma migrate dev --name $ARGUMENTS --create-only`
3. Show generated SQL for review
4. Ask user to approve before applying
5. Apply migration: `npx prisma migrate dev`
6. Verify: `npx prisma validate` + `npx prisma db pull` to check sync
7. Update seed data if needed

For Supabase projects, use Supabase CLI instead of Prisma.

Paste into ~/.claude/skills/db-migrate/SKILL.md and Claude Code will pick it up on next session.

Definition

Run a safe database migration:

  1. Launch prisma-expert agent to review current schema
  2. Generate migration: npx prisma migrate dev --name $ARGUMENTS --create-only
  3. Show generated SQL for review
  4. Ask user to approve before applying
  5. Apply migration: npx prisma migrate dev
  6. Verify: npx prisma validate + npx prisma db pull to check sync
  7. Update seed data if needed

For Supabase projects, use Supabase CLI instead of Prisma.