sql-optimizer

Installation
SKILL.md

SQL Optimizer

Systematic SQL performance analysis: parse query structure, interpret EXPLAIN plans, detect anti-patterns (N+1, full scans, cartesian joins), recommend indexes, and rewrite queries — with explanations of WHY each change improves performance, not just WHAT changed.

Reference Files

File Contents Load When
references/anti-patterns.md Common SQL anti-patterns with detection rules and fixes Always
references/index-strategies.md Index type selection, composite index ordering, covering indexes Index recommendations needed
references/explain-guide.md Reading EXPLAIN output for PostgreSQL, MySQL, SQLite EXPLAIN plan provided
references/join-optimization.md Join type selection, join order optimization, subquery-to-join conversion Query contains joins or subqueries

Prerequisites

  • The SQL query to optimize
  • Database engine (PostgreSQL, MySQL, SQLite) — optimization differs by engine
Related skills

More from mathews-tom/armory

Installs
49
GitHub Stars
230
First Seen
Mar 23, 2026