database-testing
Skill1 starsChanged 2 months agoMITView on GitHub
Test the data layer — migrations forward and back, constraints, transactions, tenant scoping in queries, and the row-level policies that decide who sees what. Use when the change touches schema, migrations, queries, RLS policies, or when data integrity is the risk.
6 other projects use a version of this.
Adopted by
Most recently taken up by
- jason0971/skillstheir own version, first seen Nov 8, 2026
- reddygopalkrishna/developer-agent-skillstheir own version, first seen Nov 8, 2026
- petrkindlmann/qa-skillstheir own version, first seen Oct 25, 2026
- proffesor-for-testing/agentic-qetheir own version, first seen Oct 25, 2026
- mejbaurbahar/software-tester-skillstheir own version, first seen Oct 13, 2026
- mejbaurbahar/faguntheir own version, first seen Jul 5, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- proffesor-for-testing/agentic-qe★ 524same name
- petrkindlmann/qa-skills★ 209same name
- reddygopalkrishna/developer-agent-skills★ 8same name
- jason0971/skills★ 1same name
- mejbaurbahar/fagun★ 1same name
- mejbaurbahar/software-tester-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository34 other files it gives its agents.
- a11y-auditSkill
- api-contract-testingSkill
- autonomous-explorationSkill
- bug-reproSkill
- chaos-resilienceSkill
- ci-wiringSkill
- contract-testing-pactSkill
- coverage-ratchetSkill
- e2e-authoringSkill
- environment-paritySkill
- exploratory-chartersSkill
- false-positive-hunterSkill
- flake-forensicsSkill
- i18n-l10n-testingSkill
- load-and-stressSkill
- mutation-proofSkill
- never-break-prodSkill
- payment-testingSkill
- perf-budgetSkill
- qa-triageSkill
- regression-curationSkill
- release-gateSkill
- responsive-mobile-testingSkill
- risk-mapSkill
- root-cause-protocolSkill
- security-regressionSkill
- smoke-and-sanitySkill
- state-machine-testingSkill
- test-data-managementSkill
- test-strategySkill
- tracking-testingSkill
- transactional-email-testingSkill
- unit-test-authoringSkill
- visual-regressionSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Every migration is tested in three directions, on a copy of production-shaped data — never on an empty schema, where every migration passes:
- Distinctive: line 33
Prefer a constraint over a test where you can, then test that the constraint exists:
- Very specific: line 49
Test the policy at the database, not through the app: an ORM filter is one forgotten where away from a leak, and the policy is the layer …
- Distinctive: line 58
Test the isolation level you actually run in — read-committed and serializable behave differently under exactly the interleaving that will …
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Database Testing
Application bugs are annoying. Data bugs are permanent: by the time you find them, the wrong rows have been wrong for weeks and there is no rollback for that.
Migrations
Every migration is tested in three directions, on a copy of production-shaped data — never on an empty schema, where every migration passes:
- Forward on a database with real volume and real edge rows (nulls, legacy encodings, the row created before the column existed).
- Backward, or a written forward-fix plan if the migration is genuinely irreversible. "We won't need to roll back" is not a plan.
- Both at once: the old code against the new schema. Deploys are not atomic, so for a window the previous version is talking to the migrated database. That window is where the incident lives.
Additive first (add column nullable → backfill → start writing → make required → drop old) is what makes that window safe. Test each step as its own deploy.
-- the backfill nobody tests: does it terminate, and does it lock the table?
EXPLAIN (ANALYZE, BUFFERS) UPDATE orders SET total_cents = ROUND(total * 100) WHERE total_cents IS NULL;Constraints are tests that run in production
Prefer a constraint over a test where you can, then test that the constraint exists:
NOT NULL,UNIQUE, foreign keys with the rightON DELETE,CHECK (amount_cents >= 0).- Try to insert the violating row and assert the database refuses it. A constraint nobody tested has a real chance of never having been applied.
- Assert the index that the hot query depends on exists — a dropped index is a silent outage.
Tenant scoping and row-level security
The highest-value data test in a multi-tenant product:
SET request.jwt.claims = '{"sub":"user-b","tenant":"globex"}';
SELECT count(*) FROM orders WHERE tenant = 'acme'; -- must be 0, not "the app filters it"Test the policy at the database, not through the app: an ORM filter is one forgotten where
away from a leak, and the policy is the layer that survives that mistake. Prove each policy with
mutation-proof — drop it and confirm the test goes red.
Transactions and concurrency
- Multi-step writes are one transaction; assert that a failure in the middle leaves nothing.
- Two clients writing the same row: exactly one wins, the loser gets a coherent error (test with two connections, not two sequential calls).
- Test the isolation level you actually run in — read-committed and serializable behave differently under exactly the interleaving that will happen in production.
- Deadlock path: acquire in a fixed order, and test that the retry converges.
Test data
Rolled-back transaction per test, or a namespace per worker (test-data-management). Never a
shared seed database — that is where order-dependent flake is born.
Done means
Migration tested in all three directions with timings on production-shaped volume, constraints proven by rejected inserts, scoping proven by a query that returns zero rows for the wrong tenant.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

