Product

SQL Rig for SQL Server

Also listed as AI Agent Toolkit for SQL Server. Prompts plus T-SQL and PowerShell for Cursor, Claude Code, and GitHub Copilot, covering SQL Server Agent jobs, linked servers, stored procedures, diagnostics, and permissions. Version 1.0.0, released 2026-10-14.

Who it is for

Consultants, DBAs, and senior developers who already use an AI coding assistant against SQL Server (on-premises, Azure SQL Managed Instance, or SQL Server on an Azure VM), ship automation with T-SQL and PowerShell, and want the agent to follow the same conventions they do.

How to use it

  1. Install the system prompt (01-prompts/agent-sql-dba-system.md) so the agent prefers T-SQL, SQL Server Agent, linked servers, and PowerShell, and declines SSIS.
  2. Add the Cursor rules or Claude project instructions from the same folder.
  3. For a specific task, paste the matching task-*.md prompt and point the agent at the relevant script.
  4. Run with @DryRun = 1 or -WhatIf first. Complete REVIEW-CHECKLIST.md before production.

Conventions in every script

  • Header: purpose, compatibility, permissions, rollback note.
  • T-SQL writes: SET XACT_ABORT ON, TRY/CATCH, @DryRun = 1 default, idempotent creates.
  • PowerShell: #Requires -Version 5.1, SupportsShouldProcess (-WhatIf), no hardcoded passwords.
  • No silent DROPs. Destructive actions require explicit opt-in.

Compatibility

Tested on SQL Server 2025. Baseline SQL Server 2019 and later; scripts note where 2016 or Azure SQL Managed Instance also apply. The 05-sql2025-vector folder is a preview; verify against current Microsoft documentation before production use. Optional tools: sqlcmd or go-sqlcmd, the SqlServer PowerShell module, dbatools (never required).

Complete file list

01-prompts (10)

agent-sql-dba-system.md
agent-cursor-rules.md
agent-claude-project.md
task-diagnose-blocking.md
task-write-agent-job.md
task-linked-server-safe.md
task-refactor-adhoc-to-proc.md
task-index-review.md
task-backup-restore-verify.md
task-security-audit-lite.md

02-tsql (19)

blocking-chain.sql
wait-stats-delta.sql
expensive-queries.sql
index-fragmentation-sample.sql
unused-indexes.sql
agent-job-create-template.sql
agent-job-steps-tsql-powershell.sql
agent-job-failure-alert.sql
agent-job-inventory.sql
linked-server-add.sql
linked-server-openquery.sql
linked-server-test.sql
proc-template-safe.sql
proc-idempotent-upsert.sql
proc-batch-loop-safe.sql
maintenance-stats-update.sql
permission-least-privilege.sql
orphaned-users-fix.sql
xp-cmdshell-check.sql

03-powershell (7)

Invoke-SqlSmokeTest.ps1
Export-AgentJobDefinitions.ps1
Invoke-SqlScriptFolder.ps1
Get-SqlBlockingSnapshot.ps1
Backup-SqlDatabase.ps1
Test-LinkedServer.ps1
Install-SqlAgentAlert.ps1

04-guardrails (4)

PROD-SAFETY.md
FORBIDDEN-PATTERNS.md
REVIEW-CHECKLIST.md
rollback-patterns.sql

05-sql2025-vector (3, preview)

README-vector.md
prompt-vector-rag-sql.md
vector-column-basics.sql

root (4)

README.md
QUICKSTART.md
CHANGELOG.md
LICENSE-BUYER.txt

Pricing

One-time payment. No subscription. Delivered as a ZIP through Gumroad.

Free teaser

$0

  • 14 of the 47 files
  • System prompt and quickstart
  • 8 T-SQL, 2 PowerShell, 2 guardrail docs
Get the free files

Full pack

$39

  • All 47 files, version 1.0
  • Prompts for Cursor, Claude Code, Copilot
  • All guardrails and rollback patterns
  • SQL Server 2025 vector preview
Buy full pack, $39

Full pack + updates

$79

  • Everything in the full pack
  • 12 months of updates
  • New versions delivered with a changelog
Buy with updates, $79

FAQ

What is SQL Rig for SQL Server?

A downloadable ZIP of 47 files: prompts for Cursor, Claude Code, and GitHub Copilot, plus T-SQL and PowerShell scripts with production guardrails for SQL Server Agent jobs, linked servers, stored procedures, diagnostics, and permissions.

Which SQL Server versions does it support?

Scripts were tested on SQL Server 2025. The compatibility baseline is SQL Server 2019 and later; scripts note where 2016 or Azure SQL Managed Instance also work. The vector folder targets SQL Server 2025 features and is marked preview.

Does it use SSIS?

No. The prompts instruct agents to use T-SQL, SQL Server Agent, linked servers, and PowerShell, and to avoid SSIS unless you explicitly ask for it.

How do the guardrails work?

T-SQL scripts that write default to @DryRun = 1 and use SET XACT_ABORT ON with TRY/CATCH. PowerShell scripts support -WhatIf through SupportsShouldProcess. There are no silent DROPs; destructive actions require explicit opt-in. A review checklist and rollback patterns are included.

What is in the free teaser?

14 files from the full pack: the system prompt, quickstart, 8 T-SQL scripts, 2 PowerShell scripts, and 2 guardrail documents. It costs $0.

What is the difference between the $39 and $79 tiers?

Both include the full 47-file pack. The $79 tier adds 12 months of updates, delivered as new versions with a changelog.

Do I need dbatools or other modules?

No. dbatools and the SqlServer PowerShell module are optional; every task has a path without dbatools.

Is there a Postgres version?

SQL Rig for Postgres, a SQL Server to Postgres migration kit, is planned next. It is not available yet.