Skip to content
Back to skills

Sql Explain

ASecurity

Explains a SQL query in plain language and suggests optimizations

  • 10 stars
  • 0 votes
  • 0 copies
  • 9 views
  • Added May 27, 2026
data-aibashsql

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add berkcangumusisik/claude-code-practices --skill sql-explain --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Sql Explain?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Sql Explain
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/berkcangumusisik-sql-explain/badge)](https://www.skillsdirectory.com/skills/berkcangumusisik-sql-explain)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: sql-explain
description: Explains a SQL query in plain language and suggests optimizations
argument-hint: <sql-query-or-file>
user-invocable: true
allowed-tools: Read Bash
effort: low
---

## SQL Query Explanation

Query: **$ARGUMENTS**

1. If a file path was given, read the file. If a query was pasted, use it directly.

2. **Plain English explanation:**
   - What tables are involved?
   - What data is being filtered/joined?
   - What is the final result set?
   - Walk through execution order (FROM → WHERE → GROUP BY → HAVING → SELECT → ORDER → LIMIT)

3. **Potential issues:**
   - Missing indexes on WHERE/JOIN columns
   - Cartesian products (missing JOIN condition)
   - `SELECT *` when specific columns would do
   - Subqueries that could be CTEs or JOINs
   - Functions on indexed columns preventing index use (`WHERE LOWER(email) = ...`)

4. **Optimization suggestions** (with rewritten query):
   - Indexes to add (with `CREATE INDEX` statement)
   - Query rewrite if applicable
   - For Postgres/MySQL: suggest running `EXPLAIN ANALYZE`

5. Estimate complexity: O(n), O(n log n), O(n²) roughly.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.