Individual skill
sql-optimizer
Diagnose a slow SQL query and produce a concrete optimization plan. Use when asked to optimize SQL, speed up a slow query, reduce a query's cost/scan, fix a timeout, or review a query plan. Produces an analysis — the likely bottleneck, what the plan is doing wrong (full scans, bad joins, spills), the specific rewrite and index/partition changes, and the expected impact, with the optimized query.
plugins/pm-dataeng/skills/sql-optimizer/SKILL.md
Source commit f7c90bc09ee05dc25cf257bdb1826f2c2552c2cb
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- Yes
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Network or broad shell
- Last checked
- Nov 9, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 1,539
- Repository last updated
- Nov 10, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- product-management Repository topic
- productivity Repository topic
- skills Repository topic
- claude-skills Repository topic
- agent-skills Repository topic
- chatgpt Repository topic
- claude-code Repository topic
- cursor Repository topic
- gemini Repository topic
- prompt-engineering Repository topic
- data Derived category
- data-databases Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 3,676 bytes
Read excerpt
# 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.