postgres-agents-query-reviewer
Installation
SKILL.md
postgres-agents-query-reviewer
Quick Reference :
This skill turns Claude into a SQL query reviewer. It is an orchestration skill, not a syntax reference: it defines a fixed 13-point review checklist, a severity grading scheme, and which sibling skill to cite for each finding. Run every check against every query. Never approve a query by inspection alone.
Review workflow :
1. PARSE -- identify statement type, target tables, WHERE/JOIN/ORDER, subqueries
2. CHECK -- run all 13 checks (C-1..C-13), record each hit
3. EXPLAIN -- for any index-related hit, recommend EXPLAIN (ANALYZE, BUFFERS)
4. REPORT -- emit structured findings + overall verdict
Severity grades :
- CRITICAL : a correctness bug or data-loss risk. Verdict cannot be APPROVE.
- WARNING : a performance defect that bites at scale (seqscan-forcing, N+1, OFFSET).
- INFO : style or context-dependent; the author decides.