← ClaudeAtlas

ado-refactor-performance-gatelisted

Mandatory performance gate for Azure DevOps SQL refactor tickets. Use when a ticket includes stored procedure refactor/review and you must validate execution plans, index usage, parameter sniffing risk, and query structure optimization opportunities.
CarlosCaPe/octorato · ★ 5 · Code & Development · score 73
Install: claude install-skill CarlosCaPe/octorato
# ADO Refactor Performance Gate ## Purpose Apply the same performance review standard to every ADO refactor ticket before closure. ## Mandatory Trigger Run this skill for each refactor ticket in scope, even if the ticket started as "code cleanup" only. ## Required Inputs - Ticket ID (ADO work item) - Environment (stg/prod) - Stored procedure name - Baseline query/runtime evidence (if available) ## Workflow (Do Not Skip) 1. Confirm ticket metadata - Capture: status, assignee, links, attachments. - Check for attached execution plans (`.sqlplan`) or screenshots. 2. Collect execution evidence - Get estimated and actual execution plans for the procedure's critical statements. - Capture top expensive operators, key lookups, scans, spills, memory grants, and parallelism decisions. 3. Validate index usage - Identify missing/unused/inefficient indexes for predicates, joins, and order by clauses. - Validate whether existing indexes are covering the selected columns. - Propose concrete index changes only with impact rationale. 4. Check parameter sniffing risk - Review parameter selectivity variance. - Compare behavior across representative parameter sets. - Recommend mitigation only when justified (e.g. `OPTIMIZE FOR`, `RECOMPILE`, split-path logic, or query rewrite). 5. Review query structure - Remove non-SARGable predicates where possible. - Detect correlated subqueries/N+1 patterns and redundant `DISTINCT`/sorts. - Validate join order, filtering order, and unnecessary JSON pa