sql-review
Installation
SKILL.md
Reviewing SQL
A reviewer's leverage is what the toolchain cannot say — and in SQL that is
almost everything. There is no type checker for query meaning: the parser
accepts anything well-formed, and sqlfluff checks layout and naming, not
correctness. A query that returns the wrong rows and a query that returns the
right ones are equally valid to every tool in the pipeline.
So this skill is longer on checks and shorter on "already covered" than any other in the review category. Three themes carry most of it:
- NULL is not a value, and three-valued logic silently changes results.
- A query is correct only under the isolation level it actually runs at.
- The plan, not the text, decides the cost — and small edits change plans.
The snippets are fragments cut down to the defect, not runnable programs.