What problem does it solve? Slow SQL queries and subtle correctness bugs (like NULL-trap NOT IN or unordered LIMIT pagination) are hard to catch in code review, and generic advice often ignores which database engine and version a project actually runs. This Skill grounds every recommendation in the official PostgreSQL, MySQL, and SQLite manuals, gated to the resolved engine version. ## Core Features & Use Cases - Engine baseline resolution: Detects the database engine and version from build manifests, migration tooling, connection strings, and SQL dialect markers before making any recommendation. - Cost-ordered finding catalog: Flags N+1 queries, non-SARGable predicates, over-fetching, sort and pagination costs, write batching issues, and index problems, tagged as [wrong-result], [cost], [measure], or [engine-gated]. - Safe measurement guidance: Distinguishes plain EXPLAIN from EXPLAIN ANALYZE and identifies statements that write data, so measurement never runs against production. - Use Case: While reviewing a Rust service using sqlx with PostgreSQL 17, the Skill spots a per-request correlated subquery and a deep OFFSET pagination endpoint, then recommends a LATERAL join and keyset pagination with manual citations. ## Quick Start Ask the AI to review the SQL queries and migrations in this repository for performance problems and report findings by engine and version.