migration-safety
Installation
SKILL.md
Migration Safety
CRITICAL: Migrations can destroy production data. This skill prevents catastrophic data loss.
The Problem This Solves
Real disaster scenarios:
- Migration fails halfway, rollback deletes all records
- Re-running migration truncates existing data
- Column drop removes 50,000 user records
- Foreign key constraint fails, cascade deletes everything
- "Fresh migration" on wrong database wipes production
Golden Rules
- NEVER run migrations without checking for existing data first
- ALWAYS create a backup before ANY migration
- NEVER re-run a migration that previously partially completed without investigation
- ALWAYS verify you're on the correct database/environment
Related skills