/microsoft-sql-admin:deadlock-analysisfrom Microsoft SQL administration
Retrieves and explains SQL Server deadlock reports from system_health XE sessions. Analyzes supplied deadlock XML/graphs showing victim, processes, statements, and contested locks.
Ships in Microsoft SQL administration. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use this skill when the user asks about deadlocks, deadlock reports, or deadlock history on SQL Server or Managed Instance.
Platform Guard: This skill targets Engine Edition 1–4 or 8. The
system_healthXE session withfn_xe_file_target_read_fileis not available on Azure SQL DB.
system_health deadlock reports and works on SQL Server and Managed Instance only.deadlock-analysis-azuresql skill.microsoft-sql-admin plugin (mssql_list_database_connections,
mssql_connect_database, then mssql_execute_query); any other SQL tool the agent host provides for
running T-SQL and reading result sets;
sqlcmd from a terminal. If the SQL
Tools MCP server is not connected or lists no connections, follow the sql-tools-mcp-setup skill,
which asks before installing or configuring anything. If no SQL tool can be made available, give the
user the T-SQL to run and ask for the results.VIEW SERVER PERFORMANCE STATE (VIEW SERVER STATE before SQL Server 2022) or, on Azure
SQL Database, VIEW DATABASE PERFORMANCE STATE or ##MS_ServerStateReader##, plus any other read
permission these queries need. A tool is only as read-only as the login it connects with.SELECT
event_data.value('(event/@timestamp)[1]', 'datetime2') AS [Date],
event_data.query('.') AS [Event_Data]
FROM (
SELECT CAST(event_data AS XML) AS event_data
FROM sys.fn_xe_file_target_read_file('system_health*.xel', NULL, NULL, NULL)
WHERE object_name = 'xml_deadlock_report'
) AS events
ORDER BY [Date] DESC;
DECLARE @dbid INT = DB_ID();
SELECT
event_data.value('(event/@timestamp)[1]', 'datetime2') AS [Date],
event_data.query('.') AS [Event_Data]
FROM (
SELECT CAST(event_data AS XML) AS event_data
FROM sys.fn_xe_file_target_read_file('system_health*.xel', NULL, NULL, NULL)
WHERE object_name = 'xml_deadlock_report'
) AS events
WHERE event_data.exist('/event/data/value/deadlock/process-list/process[@currentdb = sql:variable("@dbid")]') = 1
ORDER BY [Date] DESC;
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub microsoft/microsoft-sql --plugin microsoft-sql-admin47 skills in this plugin
/active-connectionsUse when the user asks who is connected, which sessions are idle or hold the oldest open transaction, or how connections split by login or app. If a client can't connect, use `connectivity-troubleshoot`./always-encrypted-columnsUse when the user asks which plaintext columns can or should use Always Encrypted, or why a column is disqualified. Eligibility only: not for listing already-encrypted columns or their keys./authentication-diagnosticsUse when a login fails (18456, 'Login failed for user'), a user can't open a database, a permission is denied, or an Entra or managed identity login fails. For network errors, use `connectivity-troubleshoot`.Other plugins' skills for the same job