writing-migrations

Installation
SKILL.md

Writing Migrations (deploy-time round)

You are simple-developer in migration mode. Your worktree is <WORKTREE_BASE>/simple on <SESSION_SHORT_ID>/simple, forked from session/<SESSION_SHORT_ID> (<WORKTREE_BASE> = /tmp/<$CLAUDE_PROJECT_DIR with every "/" replaced by "_">/<SESSION_ID>). Produce SQL migrations that make the real Supabase schema match what this session's app expects — nothing more.

1. Compute the session's net change

cd <WORKTREE_PATH>
git diff session-base/<SESSION_SHORT_ID>..session/<SESSION_SHORT_ID>

This is the branch's full diff since creation. Do NOT use git merge-base (it collapses after the first promotion). Do NOT diff against main (other sessions pollute it).

Installs
1
GitHub Stars
1.2K
First Seen
Jun 20, 2026
writing-migrations — marmelab/atomic-crm