What problem does it solve?
Default AI-generated Rails migrations often cause full table locks, production downtime, and 502 errors on large tables, as they ignore production-safe patterns and strong_migrations gem guardrails.
Core Features & Use Cases
- Strong Migrations Enforcement: Teaches AI agents to follow strong_migrations rules to catch dangerous migration patterns before they run in production.
- Multi-Deploy Split Patterns: Provides backwards-compatible step-by-step sequences for high-risk schema changes including adding/removing columns, renaming columns, and changing column types.
- Postgres-Specific Safe Syntax: Covers concurrent index creation, non-blocking foreign key validation, and check constraint workflows for large PostgreSQL tables.
- Batched Backfill Guidance: Includes throttled, resumable backfill templates that avoid replica lag and memory overflows on large datasets.
Use this skill when adding a column to a 50M-row users table, adding an index to a 100M-row orders table, or removing a legacy column without crashing running app servers.
Quick Start
Use the safe-migrations skill to write a zero-downtime migration to add a non-null role column with a default "member" value to your 50M-row users table without locking the table or causing downtime.