Works with the AI tools you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseOpenClawOpenClaw+21 more

    DB Migration Safety Reviewer

    1

    Review schema migrations for lock risk, data loss, backfill cost, and rolling-deploy breakage — get a verdict, safe rewrite, and deploy sequence.

    $15

    Secure checkout via Stripe

    30-day refund guarantee

    Converts to your local currency at checkout

    Security scanned
    DB Migration Safety Reviewer

    DB Migration Safety Reviewer

    Example session with this skill installed

    Database: PostgreSQL 15
    Table size: not provided (production; estimate unknown)
    Deployment: rolling deploy (no maintenance window)
    Context: billing service; subscriptions table is hot path

    Migration SQL

    -- migration_2026_03_12_subscriptions.sql

    ALTER TABLE subscriptions
    ADD COLUMN plan_tier TEXT NOT NULL;

    CREATE INDEX idx_subscriptions_account_id

      ON subscriptions(account_id);
    
    UPDATE subscriptions
    SET trial_ends_at = created_at + INTERVAL '14 days'
    WHERE trial_ends_at IS NULL;
    

    ALTER TABLE subscriptions
    DROP COLUMN old_price_cents;

    • Read your context and instructions
    • Compiled the db migration safety

    DB Migration Safety Review

    1. Risk Summary

    | Database | PostgreSQL 15 |
    | Statements reviewed | 4 |
    | Migration Risk Verdict | BLOCK |
    | Risk Score | 0 / 100 |
    | Critical / High / Medium / Low | 1 / 3 / 0 / 0 |
    | Table size assumption | large (not provided) |

    3. Risk Findings

    MIG-01 CRITICAL lock — ADD plan_tier NOT NULL without DEFAULT
    → Add nullable/DEFAULT, backfill, then SET NOT NULL
    MIG-02 HIGH lock — CREATE INDEX blocks writes
    → CREATE INDEX CONCURRENTLY + verify valid
    MIG-03 HIGH backfill — Unbatched UPDATE on hot table
    → Batch 1k–10k with statement_timeout
    MIG-04 HIGH data-loss — DROP old_price_cents irreversible
    → Stop reading in code first; drop later

    6. Deploy Sequence

    Expand → Migrate → Contract (destructive last)

    JSON: verdict "BLOCK", risk_score 0
    Disclaimer: Review aid; not a substitute for staging tests, backups, or DBA review.

    Connects securely to your tools. The creator never sees your data.

    What you get

    Prevent production downtime by catching long-running table locks before deploy.Ensure zero-downtime schema changes during rolling application deployments.Generate step-by-step safe execution plans for complex data backfills.Verify rollback feasibility and identify destructive operations lacking a path back.Pre-prod review before running a migration in CI/CDCheck whether CREATE INDEX / ALTER TABLE will lock a hot tablePlan safe backfills instead of one giant UPDATERolling-deploy expand → migrate → contract for breaking schema changesCatch ADD COLUMN NOT NULL without default before it fails in productionSecond pair of eyes for destructive drops / type changes

    About this skill

    The problem

    Schema migrations are the quietest way to cause an outage: table locks, failed NOT NULL adds, irreversible drops, and rolling-deploy breaks when old pods still read a column you just removed. Generic “review this SQL” prompts miss database-specific lock behavior and rarely hand you a safe rewrite.

    What it does

    DB Migration Safety Reviewer is a production-safety review for DDL/DML migrations. It returns:

    • A Migration Risk Verdict: SAFE-TO-SHIP / SHIP-WITH-CAUTION / BLOCK
    • A deterministic Risk Score (0–100)
    • Severity-ranked findings across lock, data-loss, backfill, compatibility, and rollback
    • A safe-execution rewrite for every risky statement (e.g. CONCURRENTLY, batched backfill, expand-migrate-contract)
    • Rollback plan + rolling-deploy sequence
    • Pre-flight checklist + Migration Review JSON for CI/docs

    Frameworks & tools

    • PostgreSQL, MySQL, and SQLite behavior differences
    • Five-dimension risk model + hard verdict gates
    • Common patterns: indexes, type changes, NOT NULL, FK validation, drops, large UPDATEs
    • Works from pasted SQL or migration files in your agent

    Why this beats prompting it yourself

    • Database-aware rules (e.g. Postgres CONCURRENTLY vs MySQL online DDL tools)
    • Hard gates so CRITICAL issues force BLOCK — not a soft “maybe fine”
    • Safe rewrites, not only warnings
    • Rolling-deploy compatibility built into the plan
    • Assumes large tables when size is unknown (worst case) and labels assumptions
    • Read-only: never executes against your database

    Use cases

    • Backend engineers shipping migrations under rolling deploys
    • DBAs reviewing lock and data-loss risk before a release
    • Teams adding indexes without a maintenance window
    • Destructive or backfill-heavy changes that need a staged plan

    Known limitations

    • Cannot measure real lock duration or row counts without that input
    • Version-sensitive advice is sharper when you state the DB version
    • Not a substitute for staging tests, backups, or DBA review on high-risk production changes
    • Does not connect to or execute against any database

    How to install

    Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.

    ~30 seconds
    1. 1

      Download the ZIP

      Free skills download straight away. Paid skills unlock right after purchase.

    2. 2

      Unzip into your skills folder

      Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.

    3. 3

      Ask your agent to use it

      Restart the agent if it was already running. It picks the skill up automatically - no config needed.

    Skills folder by agent

    Click the path to copy it. Create the folder if it does not exist yet.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    30-day refund

    Not a fit? Get your money back

    Trust & safety

    Security scanned

    Verified clean 1 month ago

    • Passed all security checks, Safe to install

    Listed1 month ago

    What's inside

    Frequently Asked Questions