db-validatorlisted
Install: claude install-skill YevheniiaQA/qa-agent-toolkit
# DB Validator (PostgreSQL)
Some assertions only exist in the database. A soft delete that should set
`deleted_at`, an audit row that should be written, a foreign key that should
cascade — the API returns 204 either way, and only the table knows the truth.
This skill is also the fastest way to settle "is this a bug or is my test data
wrong", which is otherwise an hour of guessing.
## Read-only by default
Connect with a read-only role. This is not caution for its own sake: a shared test
database is shared, and one careless `UPDATE` without a `WHERE` blocks an entire
team for the afternoon.
Writes are permitted only when all three hold: the engineer explicitly approved
this specific operation, the statement is scoped to data the test itself created,
and it runs inside a transaction that the fixture rolls back. Otherwise, provision
data through the API.
Never run `DELETE` or `TRUNCATE` without a `WHERE` clause, never touch a table
outside the feature under test, and never connect to anything but a test
environment. If the host in the profile resolves to production, stop and say so.
## Where it fits in the pipeline
**Global context.** Extract the schema into `db_schema.md`: tables, columns with
types and nullability, enums, foreign keys, unique constraints, indexes. This is
a first-class source of boundary values — `varchar(50)` is where the off-by-one
cases come from, and a `NOT NULL` without a default is a 500 waiting to be found.
**Preconditions.** When a scenario nee