data-migrations-reviewer

Detect critical bugs and safety risks in database migration scripts.

1|Updated Apr 4, 2026
One-click install
npx skills add https://github.com/ybbms777/compound-engineering --skill data-migrations-reviewer-ybbms777
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: data-migrations-reviewer
Source: https://github.com/ybbms777/compound-engineering/tree/main/skills/agent-data-migrations-reviewer
Command: npx skills add https://github.com/ybbms777/compound-engineering --skill data-migrations-reviewer-ybbms777

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Database migration scripts are a common source of critical production incidents, including silent data loss, deployment-time crashes, and inconsistent data states that are expensive and time-consuming to fix. This Skill eliminates the risk of undetected migration bugs by providing a specialized code review persona focused exclusively on data migration safety and integrity.

Core Features & Use Cases

  • Specialized Migration Review Persona: Automatically activates when code diffs include migration files, schema changes, data transformations, or backfill scripts, focusing review efforts on high-risk migration-related changes.
  • Comprehensive Risk Detection: Checks for 9 categories of critical migration issues including swapped ID/enum mappings, irreversible destructive migrations, missing backfills for non-nullable columns, schema changes that break running code during deploy, orphaned references to removed columns/tables, broken dual-write patterns, missing transaction boundaries for multi-step transforms, risky index changes on hot tables, and silent data loss from column drops or type changes.
  • Confidence-Calibrated Findings: Assigns confidence levels to each finding based on the visibility of migration logic, ensuring reviewers prioritize concrete, high-risk issues over speculative concerns.
  • Use Case: For example, if a developer adds a new non-nullable status column to the orders table without a backfill step for existing rows, this Skill will flag the issue before it causes a deploy-time failure that blocks the entire release.

Quick Start

Use the data-migrations-reviewer skill to review the latest migration diff for potential data integrity and deployment safety issues.

Frequently Asked Questions about data-migrations-reviewer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review database migration scripts for data loss and deployment risks?

To review database migration scripts for data loss and deployment risks, use a specialized code review process that validates mapping correctness, rollback availability, and safe index creation practices. This catches destructive migration bugs before production rollout.

What causes deployment failures when adding non-nullable columns to relational databases?

Deployment failures when adding non-nullable columns to relational databases are caused by missing backfill steps for existing rows. Reviewing schema changes to ensure backfill coverage prevents these deploy-time crashes and blocks.

Can I check if schema changes will break running code during deployment?

Yes, you can check if schema changes will break running code during deployment by validating deploy-time compatibility. Reviewing migration files ensures orphaned references to removed columns and broken dual-write patterns are caught before release.

What is the best way to validate transaction boundaries for multi-step data transformations?

The best way to validate transaction boundaries for multi-step data transformations is through a focused migration code review. This verifies that multi-step transforms maintain data integrity and prevents inconsistent data states during production rollout.

Does this migration review process work for high-traffic database tables?

Yes, migration review processes work for high-traffic database tables by checking for risky index changes. It detects unsafe index creation practices on hot tables to prevent production incidents and performance degradation during schema changes.