Agent skill · Databases

sql-query-explainer

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.

mohitagw15856github.com/mohitagw15856GitHub ↗
claude-codecursorMIT
Install
npx skills add mohitagw15856/pm-claude-skills --skill sql-query-explainer --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 6 KB
Bundled scripts: none
Path: skills/sql-query-explainer/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 1,255
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# SQL Query Explainer Skill This skill explains SQL queries in plain language, identifies optimisation opportunities, and helps communicate data logic to non-technical stakeholders. It also writes and documents new queries from natural language descriptions. ## Required Inputs - **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: `EXPLAIN`/`EXPLAIN ANALYZE` output and rough table sizes — turns generic advice into advice about *your* query plan. ## Modes Detect which mode the user needs based on their request: 1. **Explain** — Translate existing SQL into plain English 2. **Optimise** — Review SQL for performance issues and suggest improvements 3. **Write** — Generate SQL from a natural language description 4. **Document** — Produce a data dictionary or query documentation --- ## Mode 1: Explain When given a SQL query, produce:

What's inside
Steps it walks through
  1. Required Inputs
  2. Modes
  3. Mode 1: Explain
  4. Plain English Summary
  5. Step-by-Step Walkthrough
  6. What the Result Looks Like
  7. Potential Issues to Flag
  8. Mode 2: Optimise
  9. Performance Assessment
  10. Issues Found
  11. Optimisation Checklist
  12. Mode 3: Write
  13. Mode 4: Document
  14. Query Documentation
More from pm-claude-skills
All skills →
About this skill
What does the sql-query-explainer skill do?

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.

How do I install it?

Run `npx skills add mohitagw15856/pm-claude-skills --skill sql-query-explainer --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From mohitagw15856/pm-claude-skills, a repository with 1,255 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going