sql-integrity-check
Skill0 starsChanged 13 days agoMITView on GitHub
Review SQL queries and data-model changes for correctness, access scope, safe parameterization, and performance. Use when writing joins, filters, migrations, reports, or analytics queries.
In this repository25 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-skill-auditSkill
- api-contract-checkSkill
- build-rescueSkill
- change-narrativeSkill
- context-handoffSkill
- data-quality-gateSkill
- dataset-workshopSkill
- dependency-careSkill
- docs-syncSkill
- experiment-ledgerSkill
- failure-forensicsSkill
- model-diff-reviewSkill
- model-eval-designSkill
- multi-agent-crosscheckSkill
- parallel-task-designSkill
- performance-proofSkill
- release-readinessSkill
- repo-scoutSkill
- research-evidence-mapSkill
- review-lensSkill
- safe-migrationSkill
- security-surfaceSkill
- spec-firstSkill
- test-driven-changeSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Check NULL semantics, timezone/date boundaries, numeric precision, collation, case sensitivity, pagination stability, and aggregate …
- Distinctive: line 16
Test edge cases: no rows, duplicate keys, missing foreign keys, boundary dates, and values that could alter the query structure.
- Distinctive: line 22
Do not execute destructive statements or real-data exports without explicit authorization.
- Distinctive: line 23
Do not expose customer rows or secrets in logs or examples.
- Distinctive: line 24
Treat a fast query as incorrect if it returns the wrong entities or hides duplicates.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
SQL Integrity Check
Procedure
- Identify the database engine, schema constraints, expected row grain, key relationships, indexes, and caller permissions.
- For every query, state the intended output grain. Verify joins cannot silently multiply rows and filters preserve intended inclusions/exclusions.
- Confirm user-controlled values are bound parameters, not concatenated into SQL. Review dynamic identifiers separately because they often need allowlists.
- Check NULL semantics, timezone/date boundaries, numeric precision, collation, case sensitivity, pagination stability, and aggregate behavior.
- Inspect query plans or EXPLAIN output on representative non-production data when performance matters. Avoid full table scans or expensive locks without understanding scale.
- For migrations, verify constraints, backfill logic, idempotency, and compatibility with old/new application versions.
- Test edge cases: no rows, duplicate keys, missing foreign keys, boundary dates, and values that could alter the query structure.
Deliverable
Explain expected row grain, correctness risks, access-control assumptions, relevant plan/index observations, and tests performed.
Boundaries
- Do not execute destructive statements or real-data exports without explicit authorization.
- Do not expose customer rows or secrets in logs or examples.
- Treat a fast query as incorrect if it returns the wrong entities or hides duplicates.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

