barak810

Sqlserver Plan Review — Data skill for Claude Code

Data community

A skill that teaches Claude (or any agent) to review SQL Server execution plans collected from clients: read .sqlplan / showplan XML, find where the work really goes, trace misestimates to their ori.

How to install Sqlserver Plan Review

This entry records only its repository, not the path inside it, so there is no exact command to give. Open barak810/sqlserver-plan-review and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Sqlserver Plan Review does

A skill that teaches Claude (or any agent) to review SQL Server execution plans collected from clients: read `.sqlplan` / showplan XML, find where the work really goes, trace misestimates to their origin, and report findings with evidence and fixes.

Alternatives in Data

  • Portaljs Add Dcat — Make a PortalJS portal harvestable by national/EU/US open-data portals — emit standards-compliant DCAT catalog 2.3k ★
  • Explain System — You are a SQL result explainer assistant 64 ★
  • CI Optimize — Optimize CI pipeline performance 63 ★

README

SQL Server Execution Plan Review — a Claude Skill

A skill that teaches Claude (or any agent) to review SQL Server execution plans collected from clients: read `.sqlplan` / showplan XML, find where the work really goes, trace misestimates to their origin, and report findings with evidence and fixes.

Legacy preserved

Hugo Kornelis devoted years, and the last of his strength, to explaining SQL Server execution plans with rare depth and precision. In 2018 he started the free [SQL Server Execution Plan Reference](https://sqlserverfast.com/epr/). He kept working on it through his battle with leukemia, and by October 2026 every operator he knew of was documented. He passed away on November 3, 2026. His knowledge was matched only by his generosity and kindness. This project builds on his work and is published in his name.

*Created by Barak Gal.*


What it does

Capability How
Classifies the plan Tells an estimated plan from an actual one, and shows the plan-level facts: optimizer early abort, CE version, sniffed parameters, memory grant, waits, forced plans and hints
Compares estimates correctly Compares estimated rows per execution × executions with actual rows. This includes the Key Lookup exception and the check that flags operators whose executions, not rows, are wrong
Finds misestimate origins Finds operators that are off by ≥10× even though their child operators are estimated correctly. This is where diagnosis should start
Ranks real cost Ranks operators by approximate self time and logical reads, never by estimated cost %
Detects ~35 problem patterns Spills, excessive or waited memory grants, lookup storms, residual predicates, implicit conversions, eager index spools, Halloween spools, many-to-many merges, thread skew, broadcast misestimates, scalar UDFs, MSTVF / table-variable / remote fixed guesses, row goals, stale statistics, and more
Avoids known traps Covers about 25 cases where plan propertie