sql-optimizer
Installation
SKILL.md
SQL Optimizer Skill
A slow query almost always has a specific, findable cause — a missing index, a non-sargable predicate, a join that explodes rows, a scan that should be a seek. This skill diagnoses it: read what the query (and plan, if given) is actually doing, name the bottleneck, and produce a concrete rewrite plus the index / partition / structural changes — with the expected impact, not vague "add indexes" advice.
Required Inputs
Ask for these only if they aren't already provided:
- The query (and the engine — Postgres, BigQuery, Snowflake, MySQL… optimizations differ).
- The symptom — slow, expensive (bytes scanned), timing out, or just under review.
- Context if available —
EXPLAIN/query plan, table sizes/row counts, existing indexes, partitioning/clustering.