Individual skill
optimizing-sql-queries
Execute use when you need to work with query optimization. This skill provides query performance analysis with comprehensive guidance and automation. Trigger with phrases like "optimize queries", "analyze performance", or "improve query speed".
plugins/database/sql-query-optimizer/skills/optimizing-sql-queries/SKILL.md
Source commit 0500b275e963c027f6b410e8c49c0446945c574e
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- No
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Not checked yet
- Last checked
- Nov 12, 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)
- 2,916
- Repository last updated
- Nov 12, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- ai Repository topic
- automation Repository topic
- claude-code Repository topic
- devops Repository topic
- mcp Repository topic
- ai-agents Repository topic
- anthropic Repository topic
- claude-code-plugins Repository topic
- developer-tools Repository topic
- llm Repository topic
- database Declared skill tag
- performance Declared skill tag
- optimizing-sql Declared skill tag
- 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 · 6,985 bytesSKILL.mdcore · 6,985 bytesassets/README.mddoc · 153 bytesreferences/README.mddoc · 62 bytesscripts/README.mddoc · 429 bytesscripts/analyze_query.pyruns · 4,715 bytesscripts/explain_query.pyruns · 2,803 bytes
Read excerpt
# SQL Query Optimizer
## Overview
Rewrite SQL queries for maximum performance by eliminating anti-patterns, restructuring JOINs, leveraging window functions, and applying database-specific optimizations for PostgreSQL and MySQL. This skill takes a slow query and its execution plan as input and produces an optimized version with measurable improvement, along with any supporting index changes needed.
## Prerequisites
- The slow SQL query text and its current execution time
- `EXPLAIN ANALYZE` output (PostgreSQL) or `EXPLAIN FORMAT=JSON` output (MySQL) for the query
- Table row counts and approximate data distribution for involved tables
- `psql` or `mysql` CLI for testing rewrites
- Knowledge of the application's acceptable result ordering and NULL handling requirements
## Instructions