Works with the AI Agents you already use

    Migration Guard

    by J. Shtal

    1

    Catches the database migrations that lock tables or lose data — before they hit production.

    $10

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    migration-guard

    migration-guard

    Example session with this skill installed

    Review this migration for a high-traffic Postgres DB: ALTER TABLE orders ADD COLUMN status text DEFAULT 'pending' NOT NULL;

    • Read your context and instructions
    • Compiled the migration-guard

    === 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.

    migration.sql

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

    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.

    Static analyzer only — it reads SQL, not your database. It doesn't know actual table sizes, so when an operation would rewrite a table and the size is unknown, it errs toward warning rather than guessing.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 5 months ago

    Permissions

    Terminal / Shell
    Read Files

    File Scopes

    **/*.sql
    **/*.xml
    **/*.yml
    **/*.yaml

    Reads .sql/.xml/.yaml files under the target path given as a CLI argument (migration files the user points it at). No network access, no writes — output goes to stdout only.

    Listed5 months ago

    What's inside

    Creator

    J. Shtal

    J. Shtal

    Frequently Asked Questions

    migration-guard analyzes your SQL, Flyway, or Liquibase scripts to identify dangerous operations like table-locking DDL or accidental data loss that standard CI tools often miss. It doesn't just flag errors; it actually provides a rewritten, safe sequence of migrations to ensure zero-downtime deployments.

    This skill supports PostgreSQL, MySQL, and Oracle databases, using over 48 dialect-specific safety rules to ensure the suggested rewrites are compatible with your specific environment.

    This full version includes the complete library of CRITICAL and WARNING rules, the automated rewrite engine for zero-downtime sequences, MySQL support, and professional output formats like JSON/SARIF for CI/CD integration.

    Yes, the skill can output findings in SARIF or JSON formats, making it easy to integrate into GitHub Code Scanning, GitLab CI, or custom automation pipelines to block unsafe PRs.

    migration-guard is designed to work as a standalone CLI tool or as a specialized skill for AI coding agents and DevOp assistants that handle pull requests and database schema changes.

    The skill handles complex scenarios like adding 'NOT NULL' columns or renaming tables by breaking them into multi-step 'expand-contract' patterns, such as adding nullable columns first and validating constraints later.

    New in Data & Databases

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Data & Databases.