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.
migrate-safe
Safe database migration pipeline — generates migration, validates schema changes, tests rollback, checks for data loss risks, and verifies application compatibility.
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-safeManual setup by platform
Claude Code
~/.claude/skills/migrate-safe/SKILL.md
Cursor
~/.cursor/skills/migrate-safe/SKILL.md
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
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:
- Check if the column/table being dropped contains data
- Check if any application code still references it
- Verify a backup or reversible migration strategy exists
- 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):
- Can the current code run against the new schema? (backwards compatible)
- Can the new code run against the old schema? (forwards compatible)
- Are there queries that will break during the migration window?
- Check ORM model definitions match the new schema
Step 4: Rollback Plan
Verify the migration is reversible:
- Check if a down/rollback migration exists
- Verify the rollback actually undoes the changes (not just empty)
- For data migrations: verify rollback preserves data integrity
- 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
- Run the migration against a test/dev database
- Run the full test suite against the migrated schema
- Verify the application starts and serves requests
- 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>
Security
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.