← ClaudeAtlas

migguard-lintlisted

Reviews a database migration for changes that lock tables, rewrite them, lose data or break the running app, explains each finding in plain language and rewrites the migration into its safe form. Runs sql_lint.py (PostgreSQL and MySQL, 24 rules, severity raised for big tables). Use when the user says "review this migration", "is this migration safe", "lint my SQL migrations", "will this lock the table", "check my migration before I deploy", or "why is my ALTER TABLE slow".
vivekbhange-hub/migration-guard-skill · ★ 0 · API & Backend · score 75
Install: claude install-skill vivekbhange-hub/migration-guard-skill
# migguard-lint: review the migration before it reviews you A migration that is fine on a laptop database can take production down: a plain `CREATE INDEX` blocks writes for ten minutes, `ADD COLUMN ... NOT NULL` fails the deploy, a rename breaks the version of the app that is still running. This skill runs `sql_lint.py`, then does the part a script cannot: explain each finding to this user and write the safe version. ## Inputs - A migration file, several files, or a folder (Flyway, Prisma, Rails `structure.sql`, plain `.sql`). The database engine: PostgreSQL (default) or MySQL. Ask if it is not obvious. - Row counts for the tables the migration touches. These decide severity, so ask for them; the user can get them with `SELECT reltuples::bigint FROM pg_class WHERE relname = 'orders'` (PostgreSQL) or `SELECT table_rows FROM information_schema.tables` (MySQL). An estimate is fine. - Whether the migration runner wraps each file in a transaction (Flyway, Rails, Alembic and Django do by default). Commands below say `python3`; on Windows use `python` (or `py -3`). ## Outputs - A report with every finding: rule id, severity, file and line, why it matters, safe alternative. - A corrected migration (new file or edited copy) that keeps the same intent, plus a short list of deploy steps for anything that needs more than one release. - A list of what the linter could not analyze (Python migrations, `DO` blocks). ## Steps 1. **Confirm authorization.** The migration should