sql-query-explainer

Installation
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
Installs
48
GitHub Stars
1.2K
First Seen
Apr 3, 2026
sql-query-explainer — mohitagw15856/pm-claude-skills