SQL Query Reviewer: Free Lint for Slow and Risky SQL

    1

    Free. Lint a SQL file for performance and safety problems such as SELECT *, NOT IN subqueries, functions on columns, leading wildcards and UPDATE or DELETE without WHERE.

    Free

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    SQL Query Reviewer: Free Lint for Slow and Risky SQL

    Example session with this skill installed

    Review query.sql (SQL Server) for performance problems and anything risky.

    • Read your context and instructions
    • Compiled the sql query reviewer

    Summary

    Reviewed query.sql as T-SQL and found 7 issues: 2 high and 5 medium.

    Findings

    SeverityRuleLine
    Highnot-in-subquery5
    Highno-where-update-delete7
    Mediumselect-star1
    Mediumcomma-join1
    Mediumfunction-on-column3
    Mediumleading-wildcard4
    Mediumnolock10

    Next steps

    1. Add a WHERE clause to the UPDATE or DELETE on line 7 before running it.
    2. Replace the NOT IN subquery on line 5 with NOT EXISTS.
    3. Select only the columns you need and use explicit JOINs.
    4. Rewrite the function and leading wildcard so indexes can be used.
    Reviewed query.sql

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Catch slow and dangerous SQL before it reaches production

    SQL Query Reviewer is a free skill that lints a .sql file and reports problems by severity, with the line number and a suggested fix. It works on the text of your query, so it needs no database connection.

    What it flags

    • High: UPDATE or DELETE with no WHERE, and NOT IN with a subquery (breaks on NULLs)
    • Medium: SELECT *, comma joins, functions wrapped around columns in WHERE (stops index use), leading wildcard LIKE patterns, and NOLOCK hints
    • Dialect-aware checks for T-SQL, PostgreSQL, MySQL and SQLite

    What you get

    A findings table with severity, rule name, line number and a plain-English fix, plus a short checklist in references/checklist.md for manual review.

    Honest by design

    It is a static linter, not an execution planner. It cannot see your data volumes or indexes, so treat findings as prompts to check, not proof of a slow query.

    Requirements

    Python 3.9+. No packages needed beyond the standard library.

    Works great with

    Star Schema Designer and Power BI Model and DAX Helper, to review the SQL you load your warehouse with.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Data & Databases.

    Cannot execute queries or view live execution plans. Performance claims are hypotheses based on static analysis and require manual verification via EXPLAIN ANALYZE or STATISTICS IO.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 4 days ago

    • Free with an Agensi account

    Permissions

    Terminal / Shell
    Read Files
    Listed4 days ago

    What's inside

    Frequently Asked Questions

    The skill supports T-SQL (SQL Server), PostgreSQL, MySQL, and SQLite, providing engine-specific optimizations for each dialect, such as T-SQL statistics handling or Postgres-specific join logic.

    No live database connection is required; the skill performs static analysis and logic reviews based on the code provided, making it ideal for auditing queries in air-gapped or sensitive environments.

    Unlike generic prompts, this skill uses a two-pass process—a specialized Python-based linter followed by a contextual logic review—to catch dialect-specific traps that general AI often misses.

    The agent detects high-risk operations, such as UPDATE or DELETE statements without WHERE clauses, and automatically suggests transactional wrappers to prevent accidental data loss.

    You will receive the fully configured agent skill ready for use, including the custom static linting logic and the comprehensive correctness checklist used for the two-pass review process.

    While the skill provides highly accurate optimization theories, it cannot measure actual execution time; we recommend using its output as a guide before verifying with EXPLAIN ANALYZE on your specific hardware.

    New in Data & Databases

    Free