/makeit:expand-contractfrom makeit
Use when changing a database schema that live code reads (rename, drop, retype, split a column or table), before writing the migration. Additive first, destructive last and alone, backfill in batches.
Ships in makeit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A schema change is the riskiest migration because the data is the one thing you cannot roll back by reverting a deploy. The failure mode is coupling the schema change to the code change: rename a column in the same release that starts using the new name, and during the rollout window, when old and new code run at once, one of them queries a column that does not exist. Never change a column in place. Migrate in additive phases so old and new code are both valid at every step.
EXPAND ------------> MIGRATE ------------> CONTRACT
add the new column, backfill existing once no code reads the
nullable, alongside rows, dual-write old column, drop it in a
the old one old+new from the app later, separate deploy
Worked example, renaming name to full_name:
full_name as nullable. Deploy. Old code ignores it; nothing breaks.name and full_name on every insert and update. Deploy.name to full_name for existing rows, in batches, so the table is not locked.full_name, keep writing both. Deploy and let it bake.name; then, in a separate, later deploy, drop the column.Each step is independently deployable and reversible: if step 4 misbehaves, roll the code back and full_name is still being populated.
Rules:
down before merging.UPDATE over millions of rows locks the table; chunk and throttle it.CREATE INDEX CONCURRENTLY).squawk on the new migration files and the framework's drift check (alembic check, drizzle-kit check, prisma migrate diff --exit-code); the CI checks' migrations job runs the same two.Source: this text is adapted from agent-skills (addyosmani/agent-skills 0.6.12, skills/deprecation-and-migration/SKILL.md, "Database Schema Migrations (Expand/Contract)"), MIT; the notice is in LICENSES/agent-skills-MIT.txt at the plugin root.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub youssefkadaouiabbassi/make-it --plugin makeit3 skills in this plugin
/draftUse when writing text another person will read: a message, an e-mail, a ticket or PR comment, a reply to a client or teammate./init/makeit:initSet up this project the makeit way. Runs makeit init, then does the parts that need judgment, runs check:full, and asks before the first commit.