Back to catalog
Data
SQL Tune
skill
Explain any SQL query in plain English, then suggest dialect-aware fixes: indexes, sargability, N+1, and a rewrite.
Install
/plugin install sql-tune@agora
Reload, then invoke:
/sql-tune:explain-sql
Overview
What it does
sql-tune reads a SQL query — raw SQL, a .sql file, or even ORM/application code — and explains exactly what it does: the result grain, the join graph, filters, and subtle behavior like a LEFT JOIN quietly acting as an INNER JOIN. It detects the dialect (PostgreSQL, MySQL, SQL Server, Oracle, Snowflake, BigQuery, SQLite) and surfaces impact-ordered optimizations: missing or covering indexes, sargability problems, N+1 patterns, SELECT * waste, and deep-OFFSET pagination. Finally it produces a rewritten query that returns identical results plus the exact EXPLAIN command to confirm the win. It never executes the SQL you hand it.
Version
1.0.0
License
MIT
Author
Gagan Singh
Type
Skill
sql
database
query-optimization
indexing
performance
postgres
probablybadmove/agora/plugins/sql-tune
Agora
The public square for Claude Code plugins.
© 2026 Agora · Built by Gagan Singh · MIT