Skip to content
Development
Command

/explain-plan

Generate and interpret a SQL query execution plan in plain language.

From plugin
rohitg00-claude-code-toolkit
2.8k199 skills138 agents199 commands
$ npx -y skills add rohitg00/awesome-claude-code-toolkit --agent claude-code

Command definition

explain-plan.md

/explain-plan - Explain Query Execution Plan

Generate and interpret a SQL query execution plan in plain language.

Steps

1. Take the SQL query from the user input 2. Determine the database engine (PostgreSQL, MySQL, SQLite, SQL Server) 3. Run EXPLAIN or EXPLAIN ANALYZE with the appropriate syntax for the engine 4. Parse the execution plan output into structured components 5. Identify each operation: Sequential Scan, Index Scan, Nested Loop, Hash Join, Sort 6. Explain each step in plain language: what table is read, how it is filtered 7. Highlight expensive operations: full table scans, large sort operations, hash joins 8. Calculate the cost percentage of each step relative to total query cost 9. Identify the critical path (most expensive sequence of operations) 10. Suggest specific improvements for the most costly operations 11. Estimate memory usage and temporary disk usage from the plan 12. Present the explanation as a step-by-step narrative

Rules

  • Translate database-specific terminology into plain English
  • Highlight operations that scan more than 1000 rows without an index
  • Show estimated vs actual rows to identify cardinality estimation errors
  • Explain the difference between estimated cost and actual execution time
  • Identify parallel query opportunities if the database supports them
  • Note when the planner chose a suboptimal plan due to stale statistics
  • Recommend ANALYZE/VACUUM if statistics appear outdated
Read more
@rohitg00
Ships withrohitg00-claude-code-toolkit

The most comprehensive toolkit for Claude Code -- 135 agents, 35 curated skills (+400,000 via SkillKit), 42 commands, 176+ plugins, 20 hooks, 15 rules, 7 templates, 15 MCP configs, 26 companion apps, 53 ecosystem entries, and more.

2.8k40 skills138 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
2.8k
Star history of rohitg00/awesome-claude-code-toolkit on GitHub, a chart by star-history.com

Other commands on rohitg00-claude-code-toolkit.

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command