Works with the AI tools you already use
Migration Guard
by J. Shtal
Catches the database migrations that lock tables or lose data — before they hit production.
Secure checkout via Stripe
See it in action
You say
Review this migration for a high-traffic Postgres DB: ALTER TABLE orders ADD COLUMN status text DEFAULT 'pending' NOT NULL;
Your agent does
=== CRITICAL === [MG-030] migration.sql:1 Adding NOT NULL while the old app version still writes without it is a rolling-deploy hazard. fix: Expand-contract: add nullable with a default, deploy the writer, backfill, then SET NOT NULL.
Summary: 0 blocker, 1 critical, 0 warning.
What you get
About this skill
The problem
Database migrations that work fine in development often lock tables, lose data, or break production during a rolling deploy. Standard CI catches syntax errors — it rarely catches a CREATE INDEX that freezes writes for ten minutes, or a RENAME that breaks the app version still running the old code.
What it does
- Reviews SQL, Flyway, and Liquibase migrations for Postgres, MySQL, and Oracle against ~48 dialect-specific safety rules.
- Flags blocking DDL (non-concurrent indexes, table rewrites, unvalidated constraints), data loss (DROP, TRUNCATE, UPDATE without WHERE), and zero-downtime hazards (RENAME, backfills, missing lock_timeout).
- Rewrites unsafe migrations into a safe, ordered sequence — expand-contract, batched backfills, two-step constraint validation — instead of just flagging the problem.
- Outputs text for local review, or JSON/SARIF for CI gates and GitHub code scanning.
Why it's worth having
These are well-known traps, but they're easy to miss in a normal code review — nobody reads a migration file thinking about ACCESS EXCLUSIVE locks on a 100M-row table. migration-guard encodes that expertise so your agent (and your CI) catches it every time, not just when someone remembers to check.
Example
ALTER TABLE orders ADD COLUMN status text NOT NULL; looks harmless. migration-guard flags it as a BLOCKER (forces a full-table rewrite under an exclusive lock) and rewrites it into three safe migrations: add the column nullable, backfill in batches, then enforce NOT NULL via a validated check.
Free vs full
A free edition covering BLOCKER-level lock and data-loss rules is available on GitHub. This full edition adds every CRITICAL/WARNING rule, the zero-downtime rewrite engine, MySQL support, and JSON/SARIF output for CI.
How to install
Drop the file into your AI Agent. Works with Claude, Cursor, ChatGPT, and 20+ more.
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 19 days ago
- 30-day refund guarantee
- One-time purchase, yours forever
- Secure checkout via Stripe
Creator
Frequently Asked Questions
Popular in Code Review
migration-auditor
Catches dangerous database migrations before they hit production. Reviews schema changes for locking hazards, data loss, missing rollbacks, and index issues across PostgreSQL, MySQL, and SQLite.

inline-comment
Best way to steer your agents, effortlessly.
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.
java-best-practice-checker
Expert Java code auditor for SE 8–24, flagging performance leaks, threading risks, and modernization gaps.