From craft
Makes schema, migration, and data-shape changes safe to ship. Use when writing a database migration, altering a table, adding/renaming/dropping a column, changing the shape of an API payload / event / serialized object, backfilling data, or reviewing any diff that touches persistent state. Catches one-shot breaking changes, NOT NULL without backfill, missing/untested rollbacks, nullability drift, and backfills that lock production tables. Enforces expand→migrate→ contract, one-deploy-window backward compatibility, and dry-run-on-a-copy evidence. Triggers: "write a migration", "alter table", "add a column", "rename this field", "change the schema", "is this migration safe", "change this response/event shape", "backfill".
How this skill is triggered — by the user, by Claude, or both
Slash command
/craft:data-and-state-evolutionThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Purpose**: code review optimizes for what a senior catches *on sight*, but the
Purpose: code review optimizes for what a senior catches on sight, but the highest-cost slop in this category is invisible in a diff: a migration that is fine on the empty dev DB and locks a 10M-row table in prod, a renamed column that 500s the old code still running mid-deploy, a backfill with no rollback. A wrong code deploy reverts in minutes; a wrong data migration can be unrecoverable. That asymmetry demands its own discipline — this skill is it.
Scope: anything with a persisted or shared shape — DB schemas, API request/response payloads, event/queue messages, serialized caches, file formats. For the error-handling and validation around that data, pair with
craft:robustness-at-boundaries; for proving the migration ran,craft:trustworthy-tests.
down that raises
NotImplementedError is a one-way door pretending to be a migration. If rollback
is truly impossible (data destroyed), say so explicitly and get sign-off — don't
hide it behind an empty stub.NOT NULL without a default and a
backfill breaks every existing row. Loosening to nullable quietly moves the crash
downstream — every consumer now needs a null path it doesn't have. Changing a
default changes behavior for every caller that relied on the old one.UPDATE on a large table in one statement/transaction
locks it for the duration. Backfill in bounded batches, separately from the schema
change, resumable if interrupted.DROP/RENAME of a column/table in the same deploy as the code change that
stops (or starts) reading it.ADD COLUMN ... NOT NULL with no default and no backfill step.down, or a down that is pass / raises NotImplemented.UPDATE/ALTER touching a table whose production size you don't know.For any change to a persisted/shared shape, in order:
Steps 3–4 scale with blast radius: a column on a 100-row internal config table does not need the full ceremony — but you must be able to say the blast radius is small, not assume it.
examples/)-- ❌ One deploy: breaks every running instance that still writes `username`
ALTER TABLE users RENAME COLUMN username TO handle;
-- ✅ Expand → migrate → contract (three deploys)
ALTER TABLE users ADD COLUMN handle TEXT; -- 1. expand (additive)
-- 2. code writes both, reads handle ?? username; batched backfill
UPDATE users SET handle = username WHERE handle IS NULL AND id BETWEEN :lo AND :hi;
ALTER TABLE users DROP COLUMN username; -- 3. contract (own deploy, later)
SET NOT NULL).For each schema/data/shape change in the diff: name the readers; check it survives a
deploy window (old + new code concurrently); check the rollback exists and was run;
check NOT NULL/defaults/backfill; check backfill batching against the table's real
size; check no field changed meaning under a stable name. No dry-run evidence → the
change is unverified, say so. Tag findings [data-and-state-evolution · breaking-shape-change|no-rollback|nullability-drift|unbatched-backfill|semantic-drift · SEV].
examples/breaking-vs-expand-contract.md../../references/PRINCIPLES.md §D../../RULES.mdnpx claudepluginhub manutej/craftProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.