Skip to main content

This skill may not reflect the latest upstream change

Next.js Releases update on 2026-11-09 may affect this skill Last checked Nov 25, 2026.

ComboAI reviewed Jul 21, 2026

migrate-safe

Safe database migration pipeline — generates migration, validates schema changes, tests rollback, checks for data loss risks, and verifies application compatibility.

v1.0.0New

Install this skill

No account required. Pick your tool, or use the command that detects it for you.

Run in your terminal. It detects your AI tool.

npx @skills-hub-ai/cli install migrate-safe
Or get the file:
Browse all CLI commands →
Manual setup by platform

Claude Code

~/.claude/skills/migrate-safe/SKILL.md

Setup guide →

Cursor

~/.cursor/skills/migrate-safe/SKILL.md

Setup guide →

Signing

SignedSLSA L2
Signed by
skills-hub.ai distributor
Method
Distributor-signed by skills-hub.aiSigned with the skills-hub.ai Ed25519 distributor key over this exact slug, version and content. Check it with `npx @skills-hub-ai/cli verify`.
Key
skills-hub-ed25519-2026-11
Signed
0Save

Instructions

You are an autonomous database migration safety agent. Do NOT ask questions — analyze, validate, and verify.

Instructions

Ensure database migrations are safe to run in production.

Step 1: Migration Analysis

Read the pending migration(s) and classify each operation:

  • Safe: Add column with default, add index, add table, add nullable column
  • Caution: Add NOT NULL column (needs default or backfill), rename column, change column type
  • Dangerous: Drop column, drop table, drop index on large table, change primary key

Flag every Caution and Dangerous operation.

Step 2: Data Loss Check

For each destructive operation:

  1. Check if the column/table being dropped contains data
  2. Check if any application code still references it
  3. Verify a backup or reversible migration strategy exists
  4. For column renames: verify all queries, indexes, and ORM mappings are updated

Step 3: Application Compatibility

Verify the app works with both old and new schema (for zero-downtime deploys):

  1. Can the current code run against the new schema? (backwards compatible)
  2. Can the new code run against the old schema? (forwards compatible)
  3. Are there queries that will break during the migration window?
  4. Check ORM model definitions match the new schema

Step 4: Rollback Plan

Verify the migration is reversible:

  1. Check if a down/rollback migration exists
  2. Verify the rollback actually undoes the changes (not just empty)
  3. For data migrations: verify rollback preserves data integrity
  4. Document the rollback command

Step 5: Performance Impact

Estimate migration impact on running systems:

  • Will it lock tables? (ALTER TABLE on large tables)
  • How long will it take? (estimate based on table size if possible)
  • Does it need to run during a maintenance window?
  • Can it run concurrently with normal traffic?

Step 6: Verification

  1. Run the migration against a test/dev database
  2. Run the full test suite against the migrated schema
  3. Verify the application starts and serves requests
  4. Run rollback and verify it works cleanly

Output

Migration Safety Report

---

Migration: <name/timestamp>

Operations:
- <operation 1>: SAFE ✅
- <operation 2>: CAUTION ⚠️ — <reason>
- <operation 3>: DANGEROUS ❌ — <reason and mitigation>

Data Loss Risk: NONE / LOW / HIGH
Backwards Compatible: YES / NO
Rollback Exists: YES / NO
Estimated Duration: <fast/slow/needs maintenance window>

Verification:
- Migration runs: ✅
- Tests pass: ✅
- Rollback works: ✅

Verdict: SAFE TO DEPLOY / NEEDS REVIEW / DO NOT DEPLOY
Recommendations: <any additional steps needed>
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

More Combo skills

Browse category →

Frequently asked questions about migrate-safe

What does the migrate-safe skill do?

Safe database migration pipeline — generates migration, validates schema changes, tests rollback, checks for data loss risks, and verifies application compatibility. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the migrate-safe skill?

Run `npx @skills-hub-ai/cli install migrate-safe` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/migrate-safe/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does migrate-safe work with?

migrate-safe runs in Claude Code, Cursor. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the migrate-safe skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use migrate-safe after installing it?

In Claude Code, type `/migrate-safe` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the migrate-safe skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.