sql-query-explainer

Solid

Explain, optimise, or translate SQL queries into plain language. Use when asked to explain a SQL query, optimise slow SQL, write a data dictionary, translate SQL to plain English for non-technical stakeholders, or review a query for correctness and performance. Works across PostgreSQL, MySQL, BigQuery, Snowflake, and standard SQL.

API & Backend 915 stars 165 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
99
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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. ## 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: ### Plain English Summary [1–3 sentences. What does this query do? What data does it return? Write as if explaining to a business analyst, not a developer.] ### Step-by-Step Walkthrough Break the query into logical sections. For each section: - Quote the SQL clause - Explain what it does in plain English - Flag any complexity (e.g. window functions, subqueries, CTEs) ### What the Result Looks Like [Describe the shape of the output: "Returns one row per user, with columns for X, Y, Z. Ordered by [field] descending."] ### Potential Issues to Flag - [Gotchas, edge cases, or implicit assumptions in this query] - [e.g. "This will include NULLs in the user_id column if the LEFT JOIN finds no match"] --- ## Mode 2: Optimise When asked to optimise a query, produce: ### Performance Assessment Rate overall: 🟢 Well-optimised / 🟡 S...

Details

Author
mohitagw15856
Repository
mohitagw15856/pm-claude-skills
Created
4 months ago
Last Updated
3 days ago
Language
Shell
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category