verify-db-changelisted
Install: claude install-skill decebal/curated-claude-skills
# Verify DB Change
Prove a database change works end-to-end against real Postgres — not by asserting against mocks. The output is a markdown proof block, suitable for pasting into a PR description, that quotes actual captured output from each step. If a step did not run or did not pass, the proof block says so explicitly. No paraphrasing, no inferred outcomes.
This skill is designed for the case where the change is a typical projection-plane drop: one or more migration files, a writer / projector class, an entity or schema update, and (optionally) DI wiring in an app module. It generalizes cleanly to any `INSERT … ON CONFLICT` / `UPDATE` pattern and to migrations that touch existing tables.
## Core principles (why this skill exists)
1. **Real DB beats mocks for SQL contracts.** Unit tests that stub `manager.query()` validate that the projector *calls* a query — they validate nothing about whether the query *does what you think* in Postgres. `ON CONFLICT DO NOTHING`, `GREATEST(...)`, returning-row semantics, FK cascade, generated columns, partial indexes — these are SQL contracts. They must be tested against a real Postgres at least once before merge.
2. **`BEGIN…ROLLBACK` is your friend for non-destructive happy / edge tests.** A wrapped transaction lets you exercise the writer's actual SQL against the live dev DB, observe the results, and roll them back so the DB is byte-identical afterwards. Cheaper than spinning up a fresh DB, more honest than mocks. The only thing it