
// Agents and skills //
Scare-free migrations
runs in Claude Code
A Claude Code skill that has Claude change the database of a production system in steps that don't break anything: new column, new value, new rule, rename, remove. It works with any relational database with versioned migrations; the examples are Postgres. Claude writes the migrations, rehearses, dry-runs, and checks; applying to production is your decision, and the skill only applies when you ask. The core rule: between one step and the next, the system stays live with half the change in place, so every step has to work on its own. That's why migrations only add, the structure reaches the database before the code that uses it, and the rollout follows the order database, data, code. It starts by reading the migrations folder and figuring out what kind of change you want: a one-step change, a staged change, a redefined rule, a removal, going to production, or a deploy that broke after the migration. What it delivers: the discipline in eight rules, each with its reason; recipes by type of change (enum value, required column, rename, change type, remove, and large table); the rollout order, with two questions answered beforehand (does the new code work with the old database? does the old code work with the new database?); a dry run before writing data; a check after applying, with ready-made queries to see whether the object exists, whether the function kept its protections, and whether the history matches the files; four reference sheets; five Postgres templates that run in order from scratch; a rollout runbook to fill in, the checklist you read and authorize; and a checker, conferir.py, that only reads the migrations folder and git and flags migrations changed after being applied, destructive commands, an enum value created and used in the same file, a function that lost its protection when redefined, and duplicate or out-of-order versions. Limitations: the skill doesn't apply anything to production without your request, doesn't remove data without your authorization, and doesn't restore backups. It came out of a production system with Postgres and a small database, which only ever added things: rename, change type, remove, backfill a large table, and roll back are written as recipes and marked "to check," so rehearse first. The templates ran on Postgres 17.11; for MySQL, SQLite, SQL Server, and Oracle the skill gives the order of decisions and says what to check, and nothing was run on them. It doesn't cover designing a data model from scratch, backups, switching databases, or replicas. The checker reads text: it doesn't interpret SQL, doesn't know what's applied in any environment, and only reads .sql files; not finding something doesn't prove it isn't there. Supabase-specific material is in the sister skill app-com-supabase. Requirements: Python 3.8 or newer and git, only for the checker, which uses only the standard library, doesn't access the network, and doesn't connect to any database. To install, unzip the .zip into ~/.claude/skills/.
- Runs in Claude Code
- Intermediate
A Claude Code skill that has Claude change the database of a production system in steps that don't break anything: new column, new value, new rule, rename, remove. It works with any relational database with versioned migrations; the examples are Postgres. Claude writes the migrations, rehearses, dry-runs, and checks; applying to production is your decision, and the skill only applies when you ask. The core rule: between one step and the next, the system stays live with half the change in place, so every step has to work on its own. That's why migrations only add, the structure reaches the database before the code that uses it, and the rollout follows the order database, data, code. It starts by reading the migrations folder and figuring out what kind of change you want: a one-step change, a staged change, a redefined rule, a removal, going to production, or a deploy that broke after the migration. What it delivers: the discipline in eight rules, each with its reason; recipes by type of change (enum value, required column, rename, change type, remove, and large table); the rollout order, with two questions answered beforehand (does the new code work with the old database? does the old code work with the new database?); a dry run before writing data; a check after applying, with ready-made queries to see whether the object exists, whether the function kept its protections, and whether the history matches the files; four reference sheets; five Postgres templates that run in order from scratch; a rollout runbook to fill in, the checklist you read and authorize; and a checker, conferir.py, that only reads the migrations folder and git and flags migrations changed after being applied, destructive commands, an enum value created and used in the same file, a function that lost its protection when redefined, and duplicate or out-of-order versions. Limitations: the skill doesn't apply anything to production without your request, doesn't remove data without your authorization, and doesn't restore backups. It came out of a production system with Postgres and a small database, which only ever added things: rename, change type, remove, backfill a large table, and roll back are written as recipes and marked "to check," so rehearse first. The templates ran on Postgres 17.11; for MySQL, SQLite, SQL Server, and Oracle the skill gives the order of decisions and says what to check, and nothing was run on them. It doesn't cover designing a data model from scratch, backups, switching databases, or replicas. The checker reads text: it doesn't interpret SQL, doesn't know what's applied in any environment, and only reads .sql files; not finding something doesn't prove it isn't there. Supabase-specific material is in the sister skill app-com-supabase. Requirements: Python 3.8 or newer and git, only for the checker, which uses only the standard library, doesn't access the network, and doesn't connect to any database. To install, unzip the .zip into ~/.claude/skills/.
How to use
01
Copy the prompt
Use the Copy prompt button on this page.
02
Paste it into your AI
Open Claude Code in the project folder and paste the prompt.
03
Install the skill you downloaded
Install the downloaded file in Claude and call the skill in any chat.
In the package
- Prompt ready to copy and paste
- Skill as a .zip to install in Claude
