tsql-review

Installation
SKILL.md

T-SQL Static Review Skill

Purpose

Analyze T-SQL source code — stored procedures, ad-hoc queries, scripts, migration files — for anti-patterns that are detectable without running the query or capturing an execution plan. Covers 50 checks (T1–T50) across five categories: structural anti-patterns, correctness and logic, security and dynamic SQL, deprecated and non-idiomatic syntax, and performance smells.

This is the "shift-left" complement to sqlplan-review. Run it during code review to catch problems before they reach production. Run sqlplan-review on the resulting execution plan to catch what only surfaces at runtime.

Input

Accept any of:

  • Raw T-SQL source code (paste inline or provide a file path)
  • A .sql file path
  • A description of the query structure ("a stored proc with a cursor that builds a dynamic WHERE clause")

If the user provides a file path, read the file and analyze its content. If the input is inline SQL, analyze it directly. If the input is a description, apply the checks based on what is described and note which checks could not be verified from the description alone.

How to Run

Related skills

More from vanterx/mssql-performance-skills

Installs
1
GitHub Stars
1
First Seen
13 days ago