migration-auditor
by Samuel Rose
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.
- Identify table-locking hazards in heavy PostgreSQL or MySQL traffic
- Flag destructive schema changes that could cause permanent data loss
- Verify that all migration files include valid, reversible rollback scripts
$5
One-time purchase · Own forever
Included in download
- Identify table-locking hazards in heavy PostgreSQL or MySQL traffic
- Flag destructive schema changes that could cause permanent data loss
- Ready for Claude Code
- Includes example output and usage patterns
See it in action
### Migration Audit: FAIL - [FAIL] CREATE INDEX: Missing CONCURRENTLY on "orders" (50M rows). - [WARN] DROP COLUMN "legacy_id": Confirm code isn't reading. - [FIX] Rewritten migration provided with CONCURRENTLY and two-phase drop strategy for PostgreSQL 15.
migration-auditor
by Samuel Rose
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.
$5
One-time purchase · Own forever
⚡ Also available via Agensi MCP — your AI agent can load this skill on demand via MCP. Learn more →
Included in download
- Identify table-locking hazards in heavy PostgreSQL or MySQL traffic
- Flag destructive schema changes that could cause permanent data loss
- Ready for Claude Code
- Includes example output and usage patterns
- Instant install
See it in action
### Migration Audit: FAIL - [FAIL] CREATE INDEX: Missing CONCURRENTLY on "orders" (50M rows). - [WARN] DROP COLUMN "legacy_id": Confirm code isn't reading. - [FIX] Rewritten migration provided with CONCURRENTLY and two-phase drop strategy for PostgreSQL 15.
About This Skill
Every team has a story about a migration that took down production. A column drop that wasn't actually unused. An index creation that locked a 50M-row table for 20 minutes during peak traffic. A NOT NULL constraint added to a populated table that blew up on deploy.
Migration Auditor catches these before they happen.
Point it at your migration files and it runs a 30+ point checklist covering destructive operations, locking hazards (engine-specific), missing or broken rollbacks, data integrity risks, index issues, migration ordering problems, environment-specific gotchas, and transaction safety.
It doesn't just flag problems. It writes the corrected migration code for you.
Works with Rails, Django, Laravel, Prisma, Drizzle, Knex, TypeORM, Sequelize, Flyway, Liquibase, and raw SQL. Covers PostgreSQL, MySQL/MariaDB, and SQLite with engine-specific rules (because locking behavior between them is completely different).
What it catches that generic code review doesn't:
ADD COLUMN NOT NULL DEFAULT is dangerous on PostgreSQL < 11 but safe on 11+ (fast default). The skill checks your PG version.
CREATE INDEX without CONCURRENTLY blocks writes on large tables. The skill flags this and rewrites it.
MySQL ALTER TABLE copies the entire table for most DDL. On large tables, the skill recommends pt-online-schema-change or gh-ost instead.
Rollbacks that exist but don't actually reverse the forward migration. An empty down method on a destructive migration is a failure, not a pass.
Foreign key constraints added without NOT VALID on PostgreSQL, which locks the table for a full validation scan.
Migrations that are safe on your 50-row dev database but will lock a 50M-row production table for minutes.
Output is a structured audit report with pass/warn/fail for each check, concrete fixes for every issue, and a recommended deploy order if you're running multiple migrations.
📖 Learn more: Best DevOps & Deployment Skills for Claude Code →
Use Cases
- Identify table-locking hazards in heavy PostgreSQL or MySQL traffic
- Flag destructive schema changes that could cause permanent data loss
- Verify that all migration files include valid, reversible rollback scripts
- Detect missing concurrent index operations to prevent downtime during deploy
- Audit engine-specific syntax errors across multiple database dialects
Known Limitations
- Cannot accurately predict lock duration without table size metadata. - Limited detection of dynamic SQL builders in complex app code. - Cannot verify if external backups actually exist.
How to Install
unzip migration-auditor.zip -d ~/.claude/skills/Reviews
No reviews yet — be the first to share your experience.
Only users who have downloaded or purchased this skill can leave a review.
Early access skill
Be the first to review this skill.
Only users who have downloaded or purchased this skill can leave a review.
Security Scanned
Passed automated security review
Permissions
No special permissions declared or detected
Claude Code, Cursor, Windsurf, GitHub Copilot, and SKILL.md-compatible agents
Frequently Asked Questions
Learn More About AI Agent Skills
Similar Skills
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.
git-commit-writer
Writes conventional commit messages by analyzing your staged git changes. Detects commit type, scope, and breaking changes automatically.
env-doctor
Diagnoses why your project will not start. Checks runtime versions, dependencies, environment variables, databases, ports, and build artifacts systematically.

prompt-engineer
Professional prompt engineering patterns for building robust, secure, and production-ready LLM applications.