Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://code.claude.com/schemas/marketplace.json",
"name": "mssql-performance-skills",
"description": "SQL Server performance tuning skills for Claude Code — 830 checks across 26 skills covering T-SQL static analysis, execution plan review, wait statistics, deadlock diagnosis, Query Store, Always On AG health, AG configuration correctness, ERRORLOG, Kerberos/SPN, memory, disk I/O, encryption, configuration drift, SSRS report server trace log analysis, and migration readiness",
"description": "SQL Server performance tuning skills for Claude Code — 833 checks across 26 skills covering T-SQL static analysis, execution plan review, wait statistics, deadlock diagnosis, Query Store, Always On AG health, AG configuration correctness, ERRORLOG, Kerberos/SPN, memory, disk I/O, encryption, configuration drift, SSRS report server trace log analysis, and migration readiness",
"version": "1.0.0",
"owner": {
"name": "vanterx"
Expand All @@ -10,7 +10,7 @@
{
"name": "mssql-performance-skills",
"displayName": "MSSQL Performance Skills",
"description": "26 SQL Server performance tuning skills — T-SQL static analysis (85 checks), execution plan review (108 checks), encryption review (112 checks), AG configuration review (37 checks), wait statistics, deadlock diagnosis, query store, ERRORLOG, AG health, SSRS trace log review, migration readiness, and more",
"description": "26 SQL Server performance tuning skills — T-SQL static analysis (85 checks), execution plan review (111 checks), encryption review (112 checks), AG configuration review (37 checks), wait statistics, deadlock diagnosis, query store, ERRORLOG, AG health, SSRS trace log review, migration readiness, and more",
"version": "1.0.0",
"source": "./",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Provides twenty-six slash-command skills — twenty-two specialised review skill
| [skills/sqlstats-review/SKILL.md](skills/sqlstats-review/SKILL.md) | STATISTICS IO/TIME parser + analysis: `sqlstats-review`. 27 checks (I1–I18 IO, W1–W9 time), per-statement tables, grand totals |
| [skills/sqltrace-review/SKILL.md](skills/sqltrace-review/SKILL.md) | Profiler / XE trace analysis: `sqltrace-review`. 25 checks (X1–X12 event-level, X13–X25 workload aggregate), top-consumer tables |
| [skills/sqlwait-review/SKILL.md](skills/sqlwait-review/SKILL.md) | Wait statistics analysis: `sqlwait-review`. 44 checks (V1–V44) — I/O, lock, parallelism, memory, CPU, latch, log space, poison/throttle waits, backup I/O, insert hotspots, cumulative skew, trend analysis, modern feature waits, memory grants, file I/O latency, IQP/PSP/ADR waits, TempDB metadata |
| [skills/sqlplan-review/SKILL.md](skills/sqlplan-review/SKILL.md) | Runtime plan analysis: `sqlplan-review`. 108 checks (S1–S36, N1–N72), thresholds, output format |
| [skills/sqlplan-review/SKILL.md](skills/sqlplan-review/SKILL.md) | Runtime plan analysis: `sqlplan-review`. 111 checks (S1–S38, N1–N73), thresholds, output format |
| [skills/sqlplan-compare/SKILL.md](skills/sqlplan-compare/SKILL.md) | Regression detection: `sqlplan-compare`. Diff two plans (C1–C20) |
| [skills/sqlindex-advisor/SKILL.md](skills/sqlindex-advisor/SKILL.md) | Index recommendations: `sqlindex-advisor`. Derive indexes from operator patterns (D1–D10) + optimizer suggestions + missing index DMVs |
| [skills/sqldeadlock-review/SKILL.md](skills/sqldeadlock-review/SKILL.md) | Deadlock analysis: `sqldeadlock-review`. 17 patterns (P1–P17), lock cycle extraction, remediation |
Expand Down Expand Up @@ -54,7 +54,7 @@ Provides twenty-six slash-command skills — twenty-two specialised review skill
| [skills/sqlstats-review/references/check-explanations.md](skills/sqlstats-review/references/check-explanations.md) | Plain-English explanation of all 27 I/W checks with IO output examples and fix recipes |
| [skills/sqltrace-review/references/check-explanations.md](skills/sqltrace-review/references/check-explanations.md) | Plain-English explanation of all 25 X-checks with trace output examples, capture how-tos, and quick reference |
| [skills/sqlwait-review/references/check-explanations.md](skills/sqlwait-review/references/check-explanations.md) | Plain-English explanation of all 44 V-checks with wait type descriptions, capture queries, and category quick reference |
| [skills/sqlplan-review/references/check-explanations.md](skills/sqlplan-review/references/check-explanations.md) | Plain-English explanation of all 108 S/N checks with XML examples and fix recipes |
| [skills/sqlplan-review/references/check-explanations.md](skills/sqlplan-review/references/check-explanations.md) | Plain-English explanation of all 111 S/N checks with XML examples and fix recipes |
| [skills/sqlplan-compare/references/check-explanations.md](skills/sqlplan-compare/references/check-explanations.md) | C1–C20 regression checks explained — what each change means and why it causes a slowdown |
| [skills/sqlindex-advisor/references/check-explanations.md](skills/sqlindex-advisor/references/check-explanations.md) | Plain-English explanation of all 10 D-checks (D1–D10) with XML examples, fix recipes, filtered index and hash match guidance, and Quick Reference table |
| [skills/sqldeadlock-review/references/check-explanations.md](skills/sqldeadlock-review/references/check-explanations.md) | P1–P17 deadlock patterns, lock concepts, how to capture XML |
Expand Down
2 changes: 1 addition & 1 deletion MCP_SERVER_DETAILS.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ The 16 skills in alphabetical order:
| 9 | sqlplan-compare | 20 |
| 10 | sqldeadlock-review | 16 |
| 11 | sqlindex-advisor | 8 |
| 12 | sqlplan-review | 108 |
| 12 | sqlplan-review | 111 |
| 13 | sqlstats-review | 27 |
| 14 | sqltrace-review | 25 |
| 15 | sqlwait-review | 44 |
Expand Down
10 changes: 5 additions & 5 deletions PERFORMANCE_TUNING_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ A decision guide for choosing the right skill — or combination of skills — f
| [`sqlstats-review`](#sqlstats-review) | `/sqlstats-review` | SSMS Messages tab output | Parses `SET STATISTICS IO, TIME ON` output — 27 checks for I/O and wait patterns |
| [`sqltrace-review`](#sqltrace-review) | `/sqltrace-review` | Profiler `.trc` / XE `.xel` / `fn_trace_gettable()` results | Workload analysis — 25 checks for N+1, sniffing, recompiles, spills, top consumers, SQL 2019/2022 modern events |
| [`sqlwait-review`](#sqlwait-review) | `/sqlwait-review` | `sys.dm_os_wait_stats` or `sys.dm_exec_requests` output | Wait statistics — 44 checks (V1–V44): I/O, locks, parallelism, memory, CPU, latch, log I/O, network, poison/throttle waits, backup I/O, insert hotspots, cumulative skew, multi-snapshot trend analysis, In-Memory OLTP, Columnstore, Query Store, Transaction/DTC, Service Broker, Full Text Search, Parallel Redo, memory grants, file I/O latency, IQP/PSP/ADR feature waits, TempDB metadata contention |
| [`sqlplan-review`](#sqlplan-review) | `/sqlplan-review` | `.sqlplan` XML or description | Deep execution plan analysis — 108 checks across operators, memory, parallelism, row widths, elapsed timing, IQP/PSP/ADR/CE feedback |
| [`sqlplan-review`](#sqlplan-review) | `/sqlplan-review` | `.sqlplan` XML or description | Deep execution plan analysis — 111 checks across operators, memory, parallelism, row widths, elapsed timing, hidden UDF cost, in-plan waits, IQP/PSP/ADR/CE feedback |
| [`sqlindex-advisor`](#sqlindex-advisor) | `/sqlindex-advisor` | `.sqlplan` XML | Ranked `CREATE INDEX` script from plan operators + optimizer suggestions |
| [`sqlplan-compare`](#sqlplan-compare) | `/sqlplan-compare` | Two `.sqlplan` files | Diffs two plans — 20 checks (C1–C20): seek→scan, batch mode lost, implicit conversion, partition elimination, PSP detection |
| [`sqldeadlock-review`](#sqldeadlock-review) | `/sqldeadlock-review` | Deadlock XML / `.xdl` file | Root-cause analysis and fix plan — 17 patterns (P1–P17): lock order, RCSI bypass, MERGE, heap RID, DTC, TempDB, lock escalation, ledger/temporal, optimized locking/TID |
Expand Down Expand Up @@ -701,7 +701,7 @@ Wait Statistics │ sys.dm_os_wait_stats / sys.dm_exec_requests
Execution Plan │ .sqlplan XML
──────────────────────────┼─────────────────────────────────────────
/sqlplan-review │ Operators: what did the optimizer choose?
108 checks: join strategy, row estimates,
111 checks: join strategy, row estimates,
│ memory grants, parallelism, spills,
│ IQP/PSP/ADR/CE feedback (SQL 2019–2022)

Expand Down Expand Up @@ -910,8 +910,8 @@ Each check has an ID you can use when discussing findings or searching the `refe
| `V30–V36` | `sqlwait-review` | Modern feature wait types: In-Memory OLTP (XTP*), Columnstore, Query Store (QDS*), Transaction/DTC, Service Broker, Full Text Search, Parallel Redo | 7 |
| `V37–V40` | `sqlwait-review` | Memory and I/O detail: forced memory grants, grant timeouts, stolen memory, file-level I/O latency (requires optional capture queries) | 4 |
| `V41–V44` | `sqlwait-review` | SQL 2019/2022 feature waits: PSP selector wait, IQP DOP Feedback adjustment wait, ADR PVS cleanup worker wait, TempDB metadata latch contention | 4 |
| `S1–S36` | `sqlplan-review` | Statement-level: memory grants, parallelism, compile, statistics, hints, plan cache, row width, PSP dispatcher, ADR version store, CE feedback | 36 |
| `N1–N72` | `sqlplan-review` | Node-level: per-operator scans, joins, spills, row estimates, index usage, elapsed timing, thread starvation, IQP/PSP/DOP feedback nodes, low statistics sampling percent | 72 |
| `S1–S38` | `sqlplan-review` | Statement-level: memory grants, parallelism, compile, statistics, hints, plan cache, row width, PSP dispatcher, ADR version store, CE feedback, hidden UDF time, in-plan wait stats | 38 |
| `N1–N73` | `sqlplan-review` | Node-level: per-operator scans, joins, spills, row estimates, index usage, elapsed timing, thread starvation, IQP/PSP/DOP feedback nodes, low statistics sampling percent, LOB/(MAX) grant undersizing | 73 |
| `C1–C20` | `sqlplan-compare` | Regression: what changed between two plans — join type, batch mode, implicit conversion, partition elimination, PSP, Eager Index Spool | 20 |
| `D1–D10` | `sqlindex-advisor` | Derived index rules: Key Lookup, scan, sort, spool, loops, heap, filtered index, hash match probe side | 10 |
| `P1–P17` | `sqldeadlock-review` | Deadlock patterns: lock order, reader/writer, FK, SERIALIZABLE, self, RCSI bypass, MERGE, heap RID, DTC, TempDB, lock escalation, ledger/temporal, optimized locking/TID | 17 |
Expand All @@ -932,7 +932,7 @@ Each check has an ID you can use when discussing findings or searching the `refe
| `J1–J15` | `sqlmigration-security-review` | Migration security objects: orphaned users, SID mismatch, login type platform support, password policy, default database, server/database role membership, explicit grants/denies, ownership chains, credentials, proxy/credential sequencing, linked server logins, certificate/key migration, DMK backup, CMS registrations | 15 |
| `M1–M16` | `sqlmigration-objects-review` | Migration operational objects: Agent job database scope, job owner, operator notification reachability, alert message dependency, proxy/credential sequencing, schedule time zone, linked server provider/connectivity/collation, Database Mail profile/relay, backup device path, custom error messages, server triggers, XE sessions, non-AG endpoints | 16 |

**Total: 830 checks across all skills.**
**Total: 833 checks across all skills.**

---

Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Go to **claude.ai → Settings → Connectors → Add custom connector**, enter
https://mssql-mcp.tsx113.workers.dev
```

A collection of Claude Code skills covering the full SQL Server performance tuning workflow — from static T-SQL source review to execution plan analysis, I/O statistics, workload traces, wait statistics, Query Store analysis, procedure runtime stats, index recommendations, deadlock diagnosis, batch workload assessment, WSFC cluster log analysis, Always On AG health, AG configuration correctness, ERRORLOG operational review, SPN/Kerberos delegation diagnosis, full encryption infrastructure review (TDE, Always Encrypted, CLE, backup encryption, TLS, certificates, key hierarchy including sp_control_dbmasterkey_password/SSISDB, dynamic data masking, PCI-DSS/HIPAA/GDPR/FedRAMP compliance), instance/database configuration drift, SQL Server Setup Bootstrap log analysis, SQL Server Reporting Services (SSRS) report server trace log analysis, and SQL Server migration readiness (version/edition/platform compatibility, security-object portability, operational-object portability) — plus an agentic orchestrator that routes mixed artifacts to the right specialised skill. **830 checks across 26 skills.**
A collection of Claude Code skills covering the full SQL Server performance tuning workflow — from static T-SQL source review to execution plan analysis, I/O statistics, workload traces, wait statistics, Query Store analysis, procedure runtime stats, index recommendations, deadlock diagnosis, batch workload assessment, WSFC cluster log analysis, Always On AG health, AG configuration correctness, ERRORLOG operational review, SPN/Kerberos delegation diagnosis, full encryption infrastructure review (TDE, Always Encrypted, CLE, backup encryption, TLS, certificates, key hierarchy including sp_control_dbmasterkey_password/SSISDB, dynamic data masking, PCI-DSS/HIPAA/GDPR/FedRAMP compliance), instance/database configuration drift, SQL Server Setup Bootstrap log analysis, SQL Server Reporting Services (SSRS) report server trace log analysis, and SQL Server migration readiness (version/edition/platform compatibility, security-object portability, operational-object portability) — plus an agentic orchestrator that routes mixed artifacts to the right specialised skill. **833 checks across 26 skills.**

> **AI-Generated Skills** — These skills were planned and generated by Claude with open source community resource guidance. The check catalog, thresholds, and output formats are intended to be improved and validated by human DBAs against real workloads. PRs welcome for new checks, threshold adjustments, or output format refinements.

Expand All @@ -25,7 +25,7 @@ A collection of Claude Code skills covering the full SQL Server performance tuni
| [sqlstats-review](#sqlstats-review) | Parse and analyze `SET STATISTICS IO, TIME ON` output — 27 checks (I1–I18 IO, W1–W9 time) |
| [sqltrace-review](#sqltrace-review) | Analyze Profiler trace / Extended Events output — 25 checks (X1–X12 event-level, X13–X25 workload aggregate) |
| [sqlwait-review](#sqlwait-review) | Analyze `sys.dm_os_wait_stats` — 44 checks (V1–V44) across I/O, lock, parallelism, memory, CPU, latch contention, log space, poison/throttle waits, backup I/O, insert hotspots, trend analysis, modern feature waits (In-Memory OLTP, Columnstore, Query Store, Transaction/DTC, Service Broker, Full Text, Parallel Redo), forced memory grants, grant timeouts, stolen memory, file I/O latency, IQP/PSP/ADR feature waits, and TempDB metadata contention |
| [sqlplan-review](#sqlplan-review) | Analyze a single `.sqlplan` file — 108 checks, prioritized report |
| [sqlplan-review](#sqlplan-review) | Analyze a single `.sqlplan` file — 111 checks, prioritized report |
| [sqlplan-compare](#sqlplan-compare) | Diff two plans to find what caused a regression |
| [sqlindex-advisor](#sqlindex-advisor) | Derive indexes from operator patterns + consolidate optimizer suggestions into a ranked `CREATE INDEX` script |
| [sqldeadlock-review](#sqldeadlock-review) | Analyze a deadlock XML graph — identify pattern and fix |
Expand Down Expand Up @@ -260,7 +260,7 @@ Use the full pipeline for a slow query you're actively tuning, or jump to the re
║ Execution plan (.sqlplan) — capture with Ctrl+M in SSMS ║
║ │ ║
║ ├──▶ /sqlplan-review ║
║ │ 108 checks — join strategy, row estimates, ║
║ │ 111 checks — join strategy, row estimates, ║
║ │ memory grants, parallelism, operator spills ║
║ │ ║
║ └──▶ /sqlindex-advisor ║
Expand Down Expand Up @@ -731,7 +731,7 @@ T16 ✓, T29 ✗ (flagged), T33 ✓, T36 ✓, T39 ✓

## sqlplan-review

Analyze a single execution plan for performance anti-patterns. Applies **108 checks** (S1–S36 statement-level, N1–N72 node-level) and produces a prioritized Critical → Warning → Info report with actionable fixes.
Analyze a single execution plan for performance anti-patterns. Applies **111 checks** (S1–S38 statement-level, N1–N73 node-level) and produces a prioritized Critical → Warning → Info report with actionable fixes.

### Triggers

Expand Down Expand Up @@ -959,7 +959,7 @@ Or paste the `<deadlock>` XML block directly.

## sqlplan-batch

Batch-analyze a folder of `.sqlplan` files. Applies all 108 checks to each plan and produces a single aggregated `batch-analysis.md` dashboard.
Batch-analyze a folder of `.sqlplan` files. Applies all 111 checks to each plan and produces a single aggregated `batch-analysis.md` dashboard.

### Triggers

Expand Down Expand Up @@ -1823,8 +1823,8 @@ See [`skills/sqlplan-review/examples/horrible-analysis.md`](skills/sqlplan-revie
| W1–W9 | 9 | sqlstats-review | Statistics time/wait checks |
| X1–X25 | 25 | sqltrace-review | Trace event-level + workload |
| V1–V44 | 44 | sqlwait-review | Wait statistics + trend analysis + IQP/PSP/ADR waits |
| S1–S36 | 36 | sqlplan-review | Execution plan — statement-level |
| N1–N72 | 72 | sqlplan-review | Execution plan — node-level |
| S1–S38 | 38 | sqlplan-review | Execution plan — statement-level |
| N1–N73 | 73 | sqlplan-review | Execution plan — node-level |
| C1–C20 | 20 | sqlplan-compare | Plan regression checks |
| D1–D8 | 8 | sqlindex-advisor | Index derivation rules |
| P1–P17 | 17 | sqldeadlock-review | Deadlock patterns |
Expand All @@ -1845,4 +1845,4 @@ See [`skills/sqlplan-review/examples/horrible-analysis.md`](skills/sqlplan-revie
| J1–J15 | 15 | sqlmigration-security-review | Migration security objects: login portability, permission fidelity, credentials/proxies, certificates/keys, CMS registrations |
| M1–M16 | 16 | sqlmigration-objects-review | Migration operational objects: SQL Agent jobs/operators/alerts/proxies, linked servers, Database Mail, backup devices, custom errors, server triggers, XE sessions, endpoints |
| (none) | — | mssql-performance-review | Agentic orchestrator (dispatcher; no own checks) |
| **Total** | **830** | **26 skills** | |
| **Total** | **833** | **26 skills** | |
Loading
Loading