SQL Query Explainer Skill icon

SQL Query Explainer Skill

Takes any SQL query and produces a plain-English explanation of what it does, plus flags for likely performance or correctness issues.

Supported frameworks Claude AI OpenClaw
Free

What this skill does

Inheriting someone else's SQL — a gnarly multi-join report query, a migration script, a query pasted from a bug report — usually means reading it line by line to reconstruct intent. This skill reads any SQL query and produces a plain-English walkthrough of what it does, plus a short list of anything that looks like a performance or correctness risk.

How it works

  1. Structural walkthrough — breaks the query into its logical steps (what's being selected, joined, filtered, grouped, ordered) and explains each in plain language, in execution order rather than just reading top to bottom.
  2. Risk flagging — checks for common issues: missing indexes implied by filter columns, an unbounded result set, an N+1-shaped pattern if multiple queries are supplied together, or a join condition that looks like it could unintentionally fan out rows.
  3. Plain summary — ends with a one-paragraph summary of what the query is for, suitable for pasting into a PR description or a teammate's Slack thread.

Requirements

  • Works on Claude AI (any surface — claude.ai, Claude Code, or the API) — this is a pure reasoning skill with no external tool dependency.
  • No database connection required; it explains the query text itself, not live execution behavior (though you can paste an EXPLAIN output alongside the query for a sharper performance read).

Setup

  1. Unzip the package into your Skills directory, keeping the folder structure intact.
  2. Paste any SQL query as input — see SKILL.md for the exact invocation pattern and optional EXPLAIN-output input.

What's included

  • SKILL.md — the skill definition and explanation/risk-flagging logic
  • examples/sample-run.md — a worked example on a multi-join reporting query
Free
  • Version 1.0.0
  • File size 3 KB
  • Format .zip package
  • License Personal use
Link copied!