All skills
nimrodfisher avatar

/query-validation

@2e18ac4

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.

Use this Skill: https://skilld.dev/gh/nimrodfisher/data-analytics-skills/query-validation

This session only. Nothing lands on disk.

assetsquery_review_template.md

≈447 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Query Review: [Query Name / Purpose]

Reviewer: [Name]
Date: [YYYY-MM-DD]
Engine: [Snowflake / BigQuery / Postgres / Redshift]
Query location: [path, dashboard link, or paste below]


Query (or reference)

-- paste query here or reference file path

Correctness

# Finding Severity Location Recommendation
1 HIGH / MED / LOW [line or CTE name]

Overall correctness verdict: PASS / FAIL / NEEDS INVESTIGATION

Notes:

  • [e.g. Business logic matches the spec for MRR — verified against definition doc.]
  • [e.g. NULL handling in the CASE expression on line 14 may produce incorrect totals — recommend COALESCE.]

Performance

# Finding Severity Estimated impact Recommendation
1 HIGH / MED / LOW

EXPLAIN / profile reviewed? Yes / No
Estimated scan size: [rows / GB if known]

Notes:

  • [e.g. Full table scan on events (180M rows) — add WHERE clause to filter by partition column.]

Style & Maintainability

# Finding Severity Recommendation
1 SELECT * on line 3 LOW Enumerate columns

Anti-Patterns Found

(Cross-reference references/sql_anti_patterns.md)

  • Implicit type conversion
  • NULL comparison error
  • Fan-out join
  • NOT IN with nullable subquery
  • Function on indexed column in WHERE
  • Correlated subquery in SELECT
  • DISTINCT masking a join problem
  • None found

Summary

Approved for production? Yes / No / Yes with conditions

Conditions (if any):

  1. [Fix before deploying]
  2. [Monitor after deploying]

Estimated performance after fixes: [e.g. ~5 s → ~0.3 s based on removing full table scan]

Source: SKILL.md on GitHub

No alerts16d4 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    The skill is a set of SQL analysis tools and templates for validating query performance and correctness. It uses local scripts to parse SQL and explain plans without making external network calls or executing arbitrary commands.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 2e18ac4. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 6 days ago.

Activeupdated 5 months ago

README badge

README badge for nimrodfisher/data-analytics-skills/query-validation