Skip to content

skilldrop·docs·How-to

Use sql-review

Review a SQL query for correctness first and performance second

Review a SQL query for correctness first and performance second — join fan-out inflating sums, NULL traps in filters and NOT IN, timezone and date-boundary errors, integer division, DISTINCT hiding a bad join, window-frame defaults, implicit casts, non-sargable predicates and missing partition filters — with each finding tied to a line, the wrong number it produces, and corrected SQL for the named dialect.

Reach for it when the user pastes a query and asks "is this right", "review my SQL", "why is this number too high", "check this before it goes in the dashboard", or "make this query faster".

Install it

npx skilldrop-cli install sql-review                 # Claude Code, your user folder
npx skilldrop-cli install sql-review --project       # Claude Code, this repo
npx skilldrop-cli install sql-review --ide cursor    # or kiro, codex, antigravity, copilot

It is part of the Data and analytics pack: --pack data-analytics installs it with its neighbours.

It ships scripts, so it needs Python 3 (standard library only, nothing to install). What they may touch is declared in its manifest.

Ask for it

Say it the way you would to a colleague. Requests like these route to it:

Requests like these belong to a different skill, so it shouldn't answer them:

If another skill answers instead, ask for this one by name: "use sql-review".

Check what you get

A good result:

See a worked example

Use something else when

Where a loop runs it

Next

Edit this page on GitHub · View source