What problem does it solve?
Creating database migrations by hand is error-prone: numbering conflicts, missing rollback scripts, and inconsistent SQL templates slow down schema changes. This Skill automates the creation of properly numbered, reversible migration file pairs.
Core Features & Use Cases
- Sequential Numbering: Scans the migrations directory with Glob to find the highest existing number and generates the next zero-padded 3-digit identifier.
- Template Selection: Picks the right SQL template based on the migration name, covering CREATE TABLE, ALTER TABLE ADD COLUMN, DROP with safety checks, and CREATE INDEX patterns.
- Idempotent SQL: Writes up migrations with IF NOT EXISTS and down migrations with IF EXISTS so migrations can be safely re-run.
- Pattern Memory: Searches past migration patterns via AgentDB and stores migration metadata in memory for future reference.
- Use Case: When adding a new
users table to your project, invoke the skill with the name create_users to instantly get 001_create_users.up.sql and 001_create_users.down.sql with correct boilerplate.
Quick Start
Ask the assistant to create a new database migration named create_users using the migrate-create skill.