db-pr-battery
Installation
SKILL.md
name: db-pr-battery description: Run the captain's verification battery on a database-touching change (Supabase/Postgres migration PRs) — serialized local reset, migration replay-safety in a rolled-back transaction, targeted pgTAP suites with plan-mismatch detection, authenticated-role probes of new surfaces, generated-types delta, and mirror/registry parity — before any push or merge. metadata: short-description: Verification battery for migration/DB PRs: reset, replay, pgTAP, probes, types, mirrors
DB PR Battery
Goal
Prove a database change is safe to merge into a repo where merging auto-deploys migrations to production. The battery's stance: a migration is guilty until replay-proven — it must apply cleanly on a fresh database, re-apply as a no-op on a database that already has it (idempotent + convergent), keep every declared contract (pgTAP), and leave the repo's declarative mirrors, docs registries, and generated types telling the same story as the database.
When to use
- Any PR touching migrations or database schema/functions/views/policies/seeds, before pushing and again before merging (if the branch moved).
- When an epic-captain pipeline flags a PR as captain-owned via protected globs — this battery IS the captain's gate for the DB variant.
- After hand-editing seed files (seeds are contracts too: catalog tests may assert their shape).