SkillValidated
Migration-check — verify the least reversible change first
A backend skill invoked on any schema or migration change: confirms reversibility or an explicit one-way call, checks defaults and nullability against live-row reality, and verifies a test exercises the new shape before it ships.
$cosq add migration-checkFree, works signed out. No CLI? Copy the file below into your repo — same result.
Why this one
Developers over-trust unverified AI output (METR RCT) — and a migration is the change you can least afford to verify in production.
How to use it
- 1Invoke on every migration before it merges
- 2Decide reversibility explicitly — 'probably fine' is not a rollback plan
What gets installed
Pick your tool to preview the exact file cosq add writes — byte-for-byte. Prefer copy-paste? Use the copy button on the file.
.claude/skills/migration-check/SKILL.md(created)--- name: migration-check description: Use on any database schema or migration change: check reversibility, defaults, nullability against existing rows, and that a test exercises the new shape. --- For any schema or migration change, verify before it merges: 1. **Reversibility** — is there a down path, or is this explicitly one-way? State which, and what the rollback plan is if it ships broken. 2. **Existing rows** — do new NOT NULL columns have defaults or backfills? Would the migration lock a large table? Check against the real row shape, not the ORM model. 3. **Consumers** — which queries and endpoints read the changed shape? Flag any that would break mid-deploy (old code, new schema). 4. **Coverage** — point at the test that exercises the new shape. If none exists, draft it now; a migration without a test is unverified by definition. Report each of the four with a pass / fail / not-applicable and one line of evidence.