database-testing

database-testing is a skill for Claude Code, Codex from petrkindlmann/qa-skills. It costs 158 tokens per session (3,829 once invoked), scanned A, original, MIT.

A database-testing guide for checking data integrity, schema rules, migrations, seed data, and query performance. It covers common databases, database libraries, and isolated test databases made with Testcontainers.

In plain words
What is it for?
Use it to test migrations, constraints, seed data, rollback behavior, migration drift, and slow queries in PostgreSQL, MySQL, MongoDB, or other listed setups.
Why use it?
Database changes can break existing data, fail during rollback, drift from the expected schema, or make queries slow. Testing both forward and backward migrations helps expose these problems before release.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/petrkindlmann/qa-skills/database-testing
Any agent
npx skills add petrkindlmann/qa-skills --skill database-testing
Clone the repo
git clone --depth 1 https://github.com/petrkindlmann/qa-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for database-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/petrkindlmann/qa-skills/database-testing.svg)](https://agentmods.dev/skills/petrkindlmann/qa-skills/database-testing)
Your own site
<a href="https://agentmods.dev/skills/petrkindlmann/qa-skills/database-testing"><img src="https://agentmods.dev/badge/skills/petrkindlmann/qa-skills/database-testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 158 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,829 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00158 $0.03829
Opus 5 $0.00079 $0.01914
Sonnet 5 $0.00032 $0.00766
Haiku 4.5 $0.00016 $0.00383

Measured 4d ago against content hash 20ef5ba9aac2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

database-testing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/database-testing/SKILL.md · 221 lines

How it starts

The opening of the file, as written. The whole thing — 221 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Before starting: check .agents/qa-project-context.md for database type, ORM, migration tooling, and environment config — they shape every pattern below.


Discovery Questions

Check .agents/qa-project-context.md first — if it exists, use it and skip anything already answered there. Then:

  1. Database type: PostgreSQL, MySQL, SQLite, MongoDB, or multi-database? Each has different constraint syntax, migration tools, and performance profiling.
  2. ORM / query builder: Prisma, TypeORM, Drizzle, Sequelize, SQLAlchemy, Django ORM, or raw SQL? The ORM determines migration tooling and test patterns.
  3. Migration tool: Prisma Migrate, TypeORM migrations, Flyway, Liquibase, Alembic, knex, or custom? This determines how to test forward and backward migrations.
  4. Test database strategy: isolated DB per test, transaction rollback, Testcontainers, or shared DB with cleanup? Affects speed and reliability.
  5. Existing seed data: factories, fixtures, or seed scripts? Check prisma/seed.ts, seeds/, fixtures/, or factory patterns.
  6. Performance baselines: any existing query benchmarks or slow-query monitoring?

Core Principles

  1. Test migrations forward AND backward. Every migration should be reversible. If a rollback fails, you cannot recover from a bad deploy. Test the down path, not just the up — and test it with the actual revert mechanism (a hand-written down.sql for Prisma, a native revert command elsewhere), not a metadata flag.

  2. Constraints are the first line of defense. NOT NULL, UNIQUE, FOREIGN KEY, and CHECK constraints stop bad data at the database, regardless of application code. Test that each one exists and rejects invalid data with the right error.

Read the full file on GitHub · 221 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 221 lines · 158 tokens per session scan A 20ef5ba9aac2

Subscribe to this mod's changes

database-testing is a skill published in the GitHub repository petrkindlmann/qa-skills (107 stars, last pushed 2mo ago), licensed MIT. It adds 158 tokens to every session and 3,829 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

add-seed-skills

Use when adding or editing QA skills in seed-skills/ or getting them onto the live qaskills.sh catalog, e.g. "add N new skills", "create a seed skill for X", "seed the database", "the skill page is empty", "skill 404s on the site".

PramodDutta/qaskills · 68 tokens

backend-engineering

Design and implement backend services and APIs — REST, gRPC, GraphQL, event-driven handlers, transaction boundaries, outbox/inbox delivery, migration coexistence, database access, integration, error handling, and service-level testing. Use for application/domain/infrastructure implementation decisions. Language and…

magnus919/agent-skills · 91 tokens

data-engineering

Design and operate data infrastructure — database operations (vector, relational, graph, time-series), ETL/ELT pipeline design (dbt patterns, incremental loading), SQL analytical patterns, data quality monitoring, schema migration, and storage infrastructure management. Do not use for statistical analysis or ML model…

magnus919/agent-skills · 64 tokens

advanced-alchemy

Auto-activate for advancedalchemy imports, alembic/, SQLAlchemyAsyncRepositoryService, SQLAlchemyAsyncConfig, repositorytype, serviceclass, filters, or storage. Not for raw SQLAlchemy without Advanced Alchemy — use SQLAlchemy guidance.

litestar-org/litestar-skills · 54 tokens

sqlspec

Auto-activate for sqlspec, SQLSpec, SQLFileLoader, drivers, query builders, named SQL, filters, pagination, Arrow, framework extensions, ADK stores, data dictionary, or observers. Not for ORM repositories -- use advanced-alchemy.

litestar-org/litestar-skills · 54 tokens

notion

Read, create, and update Notion pages and databases via the Notion REST API.

taracodlabs/aiden · 20 tokens