sqlwait-review

sqlwait-review is a skill for Claude Code, Codex from vanterx/mssql-performance-skills. It costs 174 tokens per session (21,915 once invoked), scanned A, original, MIT.

A review tool for SQL Server wait statistics, which record what database sessions are waiting for while they run. It examines waits to identify likely causes such as slow storage, locks, CPU pressure, memory limits, or TempDB contention.

In plain words
What is it for?
Use it to review one or more wait-statistics snapshots, compare changes over time, and produce prioritized database performance findings.
Why use it?
It helps distinguish the main source of slowness from symptoms that appear in database monitoring data.

Skill for Claude CodeCodex

Part of the mssql-performance-skills plugin — 26 skills, 3 hooks, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/vanterx/mssql-performance-skills/sqlwait-review
Any agent
npx skills add vanterx/mssql-performance-skills --skill sqlwait-review
Clone the repo
git clone --depth 1 https://github.com/vanterx/mssql-performance-skills

Made for: Claude Code, Codex.

Or install mssql-performance-skills, the plugin that ships this one along with the rest of its 26 skills, 3 hooks, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sqlwait-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/vanterx/mssql-performance-skills/sqlwait-review.svg)](https://agentmods.dev/skills/vanterx/mssql-performance-skills/sqlwait-review)
Your own site
<a href="https://agentmods.dev/skills/vanterx/mssql-performance-skills/sqlwait-review"><img src="https://agentmods.dev/badge/skills/vanterx/mssql-performance-skills/sqlwait-review.svg" alt="Measured on agentmods" height="20"></a>
Per session 174 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 21,915 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00174 $0.21915
Opus 5 $0.00087 $0.10958
Sonnet 5 $0.00035 $0.04383
Haiku 4.5 $0.00017 $0.02192

Measured 5d ago against content hash 48e631567354, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

sqlwait-review scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/sqlwait-review/SKILL.md · 818 lines

How it starts

The opening of the file, as written. The whole thing — 818 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SQL Server Wait Statistics Review Skill

Purpose

Analyze SQL Server wait statistics and identify the dominant bottleneck using the Waits and Queues methodology. Applies 44 checks (V1–V44): V1–V18 classify each significant wait type into its root cause and produce a prioritized remediation plan; V19–V26 perform multi-snapshot trend analysis when 3+ time windows are provided — detecting worsening trends, spikes, peak periods, and emerging bottlenecks; V27–V29 cover specialized scenarios (PAGELATCH on user databases, backup I/O, cumulative skew from outlier events); V30–V36 cover modern feature wait types (In-Memory OLTP, Columnstore, Query Store, Transaction/DTC, Service Broker, Full Text Search, Parallel Redo); V37–V40 add DMV-level memory and I/O detail — forced memory grants, grant timeouts, stolen memory, and file-level I/O latency (requires optional capture queries); V41–V44 cover SQL 2019/2022 IQP/PSP/ADR feature-specific wait types and TempDB memory-optimized metadata contention (SQL 2019+).

The Waits and Queues methodology is based on how SQL Server's thread scheduler works: threads are always in one of three states — RUNNING (on CPU), RUNNABLE (queued for CPU), or SUSPENDED (waiting for a resource). Every time a thread suspends, SQL Server records the wait type and duration. Analyzing the top accumulated waits reveals the dominant bottleneck — not by guessing, but by measuring exactly what the server spent its time waiting for.

Wait analysis answers the question execution plans cannot: why is the server slow when no individual query has a bad plan? The answer is almost always in the wait types — I/O, locks, CPU, memory, or network.

Input

Accept any of:

  • Output from the sys.dm_os_wait_stats capture query below (paste the result grid)
  • Output from sys.dm_exec_requests for current active session waits
  • A .txt or .csv file containing either of the above
  • A natural language description of the top wait types ("PAGEIOLATCH_SH is 78% of waits, CXPACKET is 12%")

Read the full file on GitHub · 818 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 818 lines · 174 tokens per session scan A 48e631567354

Subscribe to this mod's changes

sqlwait-review is a skill published in the GitHub repository vanterx/mssql-performance-skills (5 stars, last pushed 1mo ago), licensed MIT. It adds 174 tokens to every session and 21,915 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

oracle-expert

Expert in Oracle Database, PL/SQL programming, Oracle RAC, Data Guard, performance tuning, backup/recovery, and enterprise database administration. Use when the user mentions database, enterprise, ERP, PL/SQL, Oracle RAC, or Data Guard, or when the task involves Oracle Architecture, PL/SQL Programming, Performance &…

personamanagmentlayer/pcl · 81 tokens

golang-performance

Use when profiling Go applications (pprof), running benchmarks, optimizing memory/CPU usage, or debugging performance bottlenecks in production Go code.

MadAppGang/claude-code · 33 tokens

PostgreSQL Database Administration

Comprehensive PostgreSQL database administration skill for customer support tech enablement, covering database design, optimization, performance tuning, backup/recovery, and advanced query techniques.

manutej/luxor-claude-marketplace · 37 tokens

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens