sql-review
Skill0 starsChanged 3 months agoMITView on GitHub
Use when the user writes a query, a migration, or asks why a database call is slow or wrong.
10 other projects use a version of this.
Adopted by
Most recently taken up by
- Smaui94/ClaudeSkillCollectiontheir own version, first seen Nov 8, 2026
- polardb/polardbx-skillstheir own version, first seen Nov 8, 2026
- Lanqiao-Luca/ai-java-workflowtheir own version, first seen Nov 8, 2026
- z-Zihan/Evirtheir own version, first seen Oct 13, 2026
- analyticsengineering/ae-toolkittheir own version, first seen Oct 12, 2026
- GabrielHenriqueCA/cortex-aitheir own version, first seen Oct 11, 2026
Other versions10 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 10
- Lanqiao-Luca/ai-java-workflow★ 220same name
- kyle-chalmers/streamsnow★ 17same name
- z-Zihan/Evir★ 11same name
- polardb/polardbx-skills★ 8same name
- analyticsengineering/ae-toolkit★ 3same name
- gmanch94/claude-code-aidlc-template★ 2same name
- Jiplet/transformation-os★ 2same name
- dennisrongo/claude-skills★ 1same name
- GabrielHenriqueCA/cortex-ai★ 1same name
- Smaui94/ClaudeSkillCollection★ 0same 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 repository11 other files it gives its agents.
- api-docsSkill
- code-reviewSkill
- commit-messageSkill
- debug-loopSkill
- explain-this-fileSkill
- onboarding-mapSkill
- perf-passSkill
- pr-descriptionSkill
- refactor-safelySkill
- security-passSkill
- write-testsSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 6 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Check the query for wrong results first, slow results second.
- Distinctive: line 13
Check the joins: an unintended fan out from a one to many join silently multiplies rows and totals.
- Very specific: line 14
Check NULL handling: NOT IN with a NULL member returns nothing, and <> never matches NULL.
- Distinctive: line 15
Check aggregates against GROUP BY.
- Very specific: line 16
Check filters applied in WHERE that should be in the ON clause of an outer join, which quietly makes it an inner join.
- Distinctive: line 17
Check for missing LIMIT on anything user facing, and for unbounded date ranges.
- Distinctive: line 23
Never suggest an index without naming the column order and the query it serves.
- Distinctive: line 24
Never approve a destructive migration without a stated rollback.
“Common” is measured: kept by at least 6 in 10 of the 8 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
SQL review
Check the query for wrong results first, slow results second.
Procedure
- State what the query is supposed to return in one sentence.
- Check the joins: an unintended fan out from a one to many join silently multiplies rows and totals.
- Check NULL handling:
NOT INwith a NULL member returns nothing, and<>never matches NULL. - Check aggregates against GROUP BY. Every non aggregated selected column must be grouped.
- Check filters applied in
WHEREthat should be in theONclause of an outer join, which quietly makes it an inner join. - Check for missing LIMIT on anything user facing, and for unbounded date ranges.
- Now look at performance: run
EXPLAINorEXPLAIN ANALYZEand look for sequential scans on large tables, and for functions wrapped around indexed columns. - For migrations, check whether the statement takes a blocking lock, and whether it is reversible.
Rules
- Never suggest an index without naming the column order and the query it serves.
- Never approve a destructive migration without a stated rollback.
- Assume production data volume, not the seed dataset.
Output format
Intent: ...
Correctness findings: <bullets, each with the wrong result it produces>
Performance findings: <bullets, each with the EXPLAIN evidence>
Suggested query: <fenced sql>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.

