SQL Query Validation
Reviews a SQL query for correctness, anti-patterns, and slow execution plans before it reaches a production dashboard.
Overview
SQL Query Validation reviews a query before it's promoted to production, when a query returns surprising results, or when it's running slowly and needs a performance pass.
What it covers
- Lints the query for syntax errors and style violations, and checks it against a library of known SQL anti-patterns with a severity rating.
- Parses the EXPLAIN plan (when available) to surface slow steps like full table scans or missing indexes.
- Estimates cardinality on joins that could fan out unexpectedly.
- Checks engine-specific behavior for Snowflake, BigQuery, Postgres, or Redshift, since date functions and window behavior differ.
- Fills a review template with correctness, performance, and style findings, plus ranked rewrite suggestions when issues are found.
Part of Data Analytics Skills
This is one of 31 skills in the Data Analytics Skills library, in the Data Quality & Validation group.
Installation
- Clone the repo once:
git clone https://github.com/nimrodfisher/data-analytics-skills.git - Copy just this skill:
cp -r data-analytics-skills/01-data-quality-validation/query-validation ~/.claude/skills/(or~/.agents/skills/for Codex) - Ask your agent something like "review this query before I put it in the dashboard" and it activates on its own.
See the Data Analytics Skills entry for the full library.
Related assets
Frontend Design
Generates distinctive, production-grade UI that avoids generic "AI slop," with bold typography, cohesive color, and precise motion, implemented as real code.
Graphify
Turns a codebase, plus its docs, PDFs, images, and video, into a queryable knowledge graph that a coding agent can traverse instead of grepping raw files, and never guesses silently: every edge is tagged EXTRACTED, INFERRED, or AMBIGUOUS so you know what was found versus inferred.
Caveman
Makes your coding agent answer in a stripped down, high signal style that keeps every technical fact and cuts filler, saving output tokens on chat style questions.