Sql explain

From Goldziher/ai-rulez · View interactive version

Sql explain is an AI agent skill from the GitHub repository Goldziher/ai-rulez. Explains a PostgreSQL EXPLAIN ANALYZE plan and points at the slowest node. Use when the user pastes a query plan; not for rewriting schemas.

How to use this skill

Skill file

SQL explain

  1. Identify the node with the highest actual time and its row estimate versus actual rows.
  2. If the estimate is off by more than 10x, say that statistics are likely stale and suggest ANALYZE <table>.
  3. If a sequential scan filters most rows away, suggest one index and show the CREATE INDEX statement without running it.
  4. Finish with a three-line summary: slowest node, cause, suggested change.
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.