PlaygroundCatalog › SQL Query Explainer
SQ

SQL Query Explainer

🔵 Stable🕐 updated 2026-07-08 ✅ 4.3/5 🔷 SkillSpec L3 pm-data

Explains, optimises, writes, and documents SQL queries. Use when asked to explain a SQL query, optimise slow SQL, translate SQL to plain English for non-technical stakeholders, write a query from a natural language description, or produce query documentation. Produces plain-English explanations, annotated optimised queries, or a data dictionary covering output shape, assumptions, and known limitations. Works across PostgreSQL, MySQL, BigQuery, Snowflake, and standard SQL.

▶ Run it free — no key needed 📝 Grade your existing draft View SKILL.md ↗

🗣 Say this to your agent

“Explain this SQL query: [paste query]”“Optimise this slow query: [paste query]”“Write a SQL query that [natural language description]”“Document this query for my non-technical stakeholders”“Why is this query returning unexpected results?”

What to give it

The SQL — (Explain/Optimise/Document modes) — the actual query, ideally with the dialect named (Postgres, BigQuery, Snowflake, MySQL…); dialect changes both semantics and the optimisation advice.
The intent in plain words — (Write mode) — what question the data should answer, plus table/column names if known. Without a schema, assumptions get stated, never silently invented.
Optional but transformative (optional) — `EXPLAIN`/`EXPLAIN ANALYZE` output and rough table sizes — turns generic advice into advice about *your* query plan.

✅ The bar it holds itself to

Every skill in this library self-verifies — these are this skill's own quality checks, straight from its definition.

Plain English explanation avoids SQL jargon
Optimisation suggestions include before/after SQL
Written queries include inline comments
Output shape is described (columns, row grain, ordering)
Dialect-specific syntax is flagged when non-standard

⚠️ What it refuses to do

Restating the SQL in pseudo-code instead of explaining what it *does* and *returns*
Optimisation advice with no before/after query, or no reason the new one is faster
Ignoring the dialect (writing Postgres-only syntax for a MySQL user)
"Looks fine" with no read on correctness, performance, or row grain
Rewriting the query from scratch instead of explaining/optimising the user's

Install

npx pm-claude-skills add --agent claude   # or codex · cursor · gemini · hermes
# or one-line MCP (every skill, any client):
claude mcp add pm-skills -- npx -y pm-claude-skills-mcp

Start with

Related skills

🔌 Embed this skill

Drop this on your blog, docs, or site — it renders a "Run this skill" card:

<div data-pm-skill="sql-query-explainer"></div>
<script src="https://mohitagw15856.github.io/pm-claude-skills/embed.js" async></script>

💬 Discussion

SQL Query Explainer is one of 1174 open-source professional AI agent skills — all SkillSpec L3. Try them all in the browser · ⭐ Star on GitHub · Browse the full catalog