query-validation
Skill1 starsChanged 31 days agoMITView on GitHub
SQL query review for correctness, performance, and best practices. Activate when a query needs review before production use, shows unexpected results, or runs too slowly.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- berriosb/data-analytics-agentstheir own version, first seen Oct 20, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- berriosb/data-analytics-agents★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository121 other files it gives its agents.
- analysis-documentationSkill
- browser-automationSkill
- business-metrics-calculatorSkill
- chat-attachment-is-not-a-fileSkill
- claude-code-masterySkill
- codebase-designSkill
- codex-cli-specialistSkill
- cohort-analysisSkill
- cut-the-curveSkill
- data-narrative-builderSkill
- data-quality-auditSkill
- domain-modelingSkill
- focused-fixSkill
- funnel-analysisSkill
- gate-must-derive-its-criterionSkill
- grill-with-docsSkill
- gsd-add-testsSkill
- gsd-ai-integration-phaseSkill
- gsd-audit-fixSkill
- gsd-audit-milestoneSkill
- gsd-audit-uatSkill
- gsd-autonomousSkill
- gsd-captureSkill
- gsd-cleanupSkill
- gsd-code-reviewSkill
- gsd-complete-milestoneSkill
- gsd-configSkill
- gsd-debugSkill
- gsd-discuss-phaseSkill
- gsd-docs-updateSkill
- gsd-eval-reviewSkill
- gsd-execute-phaseSkill
- gsd-exploreSkill
- gsd-extract-learningsSkill
- gsd-fastSkill
- gsd-forensicsSkill
- gsd-graphifySkill
- gsd-healthSkill
- gsd-helpSkill
- gsd-importSkill
- gsd-inboxSkill
- gsd-ingest-docsSkill
- gsd-managerSkill
- gsd-map-codebaseSkill
- gsd-milestone-summarySkill
- gsd-mvp-phaseSkill
- gsd-new-milestoneSkill
- gsd-new-projectSkill
- gsd-ns-contextSkill
- gsd-ns-ideateSkill
- gsd-ns-manageSkill
- gsd-ns-projectSkill
- gsd-ns-reviewSkill
- gsd-ns-workflowSkill
- gsd-pause-workSkill
- gsd-phaseSkill
- gsd-plan-phaseSkill
- gsd-plan-review-convergenceSkill
- gsd-pr-branchSkill
- gsd-profile-userSkill
- The first 60 shown.
The file
Files
When to use
- A SQL query is about to be promoted to a production dashboard or report
- A query is returning surprising or incorrect results
- A query is running slowly and needs performance review
- You want to catch anti-patterns (implicit conversions, SELECT *, unbounded CTEs) before they cause incidents
Process
- Lint the query — run
scripts/sql_lint.py(sqlglot-based) to catch syntax errors, unsupported functions for the target engine, and style violations. Fix hard errors before continuing. - Review anti-patterns — compare the query structure against
references/sql_anti_patterns.md. Flag any present anti-patterns with a severity rating. - Parse the explain plan — if an EXPLAIN or query profile output is available, run
scripts/explain_plan_parser.pyto extract slow steps (full table scans, missing indexes, high row estimates). - Estimate cardinality — run
scripts/cardinality_estimator.pyif schema stats are available to flag joins that might fan-out unexpectedly. - Check engine-specific behaviour — consult
references/engine_specific_guide.mdfor the target engine (Snowflake / BigQuery / Postgres / Redshift) to verify date functions, window behaviour, and clustering assumptions. - Produce review output — fill in
assets/query_review_template.mdwith findings; for any performance issues found, completeassets/optimization_recommendations.md.
Inputs the skill needs
- Required: the SQL query text
- Required: target database engine (Snowflake / BigQuery / Postgres / Redshift / other)
- Optional: relevant table schemas (column names, types, approximate row counts)
- Optional: EXPLAIN / query profile output
- Optional: expected business logic — what should the query calculate?
Output
assets/query_review_template.md(filled) — categorised findings: correctness, performance, styleassets/optimization_recommendations.md(filled, if issues found) — ranked rewrite suggestions with expected impact
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

