AGENT SKILL

ado-refactor-performance-gate

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.

License 许可
MIT
最近更新
2026-11-14
Stars
★ 18
Forks
6

01 前言 Front Matter

name
ado-refactor-performance-gate
metadata
{ "origin": "client projects (anonymized pattern)", "short-description": "ADO refactor perf gate" }
description
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.

02 资源文件 1

03 SKILL.md 正文

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.
  1. 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.
  1. 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.
  1. 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).
  1. 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 parsing or scalar UDF hot spots.
  1. Produce optimization decision
  • Classify each finding by severity: Critical, High, Medium, Low.
  • Mark each as: Apply now, Defer, or Reject (with reason).
  1. Blocker check (mandatory)
  • Report blockers that prevent completion (permissions, missing plans, missing runtime data, VPN/tenant access, token/auth issues).
  • Include owner and next action for each blocker.

Required Deliverable Format (per ticket)

## Performance Gate - <TicketId>
- Procedure: <ProcedureName>
- Status: Pass | Pass with risks | Blocked

### Execution Plan Findings
- <Finding 1>
- <Finding 2>

### Index Findings
- <Current index issue>
- <Recommended index change + rationale>

### Parameter Sniffing Assessment
- Risk: None | Low | Medium | High
- Evidence: <short evidence>
- Mitigation: <if required>

### Query Structure Findings
- <SARGability / subquery / join / sort finding>

### Recommended Actions
1. <Action>
2. <Action>

### Blockers
- <Blocker or "None">

### Closure Decision
- <Why this ticket can or cannot be closed>

Definition of Done

A refactor ticket is not "done" until:

  • Execution plan evidence reviewed.
  • Index usage reviewed.
  • Parameter sniffing risk assessed.
  • Query structure reviewed for optimization.
  • Blockers explicitly documented (or None).

Typical Blockers to Report

  • No SHOWPLAN/plan capture permissions
  • No runtime DMV access
  • VPN not connected to private SQL MI endpoint
  • Wrong Azure tenant/subscription context
  • Missing ADO PAT/API permissions
  • Missing representative parameter samples

04 同仓库更多 Skills

CarlosCaPe
CarlosCaPe/octorato

yeet

Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (`gh`).

★ 18
CarlosCaPe
CarlosCaPe/octorato

wrangler

Cloudflare Workers CLI for deploying, developing, and managing Workers, KV, R2, D1, Vectorize, Hyperdrive, Workers AI, Containers, Queues, Workflows, Pipelines, and Secrets Store. Load before running wrangler commands to ensure correct syntax and best practices. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.

★ 18
CarlosCaPe
CarlosCaPe/octorato

workspace-skill-discovery

Discover and include ALL skills across the workspace — not just global ones. Use at the start of every session or when the user asks about available skills. Ensures project-level skills (under .claude/skills/ or skills/ in any repo) are never missed.

★ 18
CarlosCaPe
CarlosCaPe/octorato

workers-best-practices

Reviews and authors Cloudflare Workers code against production best practices. Load when writing new Workers, reviewing Worker code, configuring wrangler.jsonc, or checking for common Workers anti-patterns (streaming, floating promises, global state, secrets, bindings, observability). Biases towards retrieval from Cloudflare docs over pre-trained knowledge.

★ 18
CarlosCaPe
CarlosCaPe/octorato

winui-app

Create, build and design WinUI 3 desktop apps with C# and the Windows App SDK following Microsoft's official guidance and CommunityToolkit. Covers XAML, navigation, theming, accessibility and deployment.

★ 18
CarlosCaPe
CarlosCaPe/octorato

windows-brain-script-portability

Scripts in ~/.claude/scripts/ that run on a Windows brain: use the python3.cmd shim and not bare python3, and reconfigure stdout to UTF-8 if you print symbols. Use it when writing a brain script or triaging a Windows-only crash.

★ 18