Skip to main content

migration-writer

Write safe, reversible database migrations for this repo's conventions. Use for any schema change.

Source facts

Repository
Archive228/loopkit
Last source activity
June 29, 2026 at 21:52
Detected SKILL.md language
English
Stars
757
Forks
124

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

Showing SKILL.md

SKILL.md
Source instructions · Read-only preview
name
migration-writer
description
Write safe, reversible database migrations for this repo's conventions. Use for any schema change.
when_to_use
add/alter a table, column, index, or constraint
# Migration Writer 1. Read the current schema first. Match the repo's migration tool and naming (`NNN_<verb>_<noun>`). 2. Write BOTH up and down. A migration you can't reverse is a migration you can't deploy safely. 3. **Live-safe**: on a hot table, adding a NOT NULL column with no default, or an index without CONCURRENTLY, takes a blocking lock. Split into steps: add nullable → backfill → add constraint. 4. Backfill large tables in batches, not one statement. 5. Never edit an already-merged migration — add a new one. Test with a dry-run before committing. Output the migration + the exact deploy order.
View on GitHub