What problem does it solve?
This Skill eliminates the error-prone, manual work of writing Supabase SQL migrations when application code changes require schema updates, ensuring migrations are minimal, correct, and aligned with the actual code diff.
Core Features & Use Cases
- Automated Schema Diffing: Computes the net schema change from a session branch diff, automatically ignoring non-schema modifications like CSS, layout, and test changes.
- Idempotent Migration Generation: Produces guarded SQL statements that only include incremental deltas not already deployed, preventing schema drift.
- Postgres Correctness Enforcement: Automatically applies critical rules like enabling RLS for new tables with valid policies and maintaining correct column order in database views to avoid deployment errors.
- Use Case: When a developer adds a new
priority field to the tasks entity in a CRM session, this Skill generates the correct ALTER TABLE migration and updates any dependent views to prevent Postgres ordinal shift errors.
Quick Start
Use the writing-migrations skill to generate the deploy-time SQL migration for the current session's schema changes and commit it to the simple worktree.