# SQL Rig Free: SQL Server Starter Kit for AI Agents

> Safe SQL Server defaults for your AI agent: DBA rules, read-only diagnostics, and dry-run templates for Agent jobs and stored procedures.

SQL Rig Free: SQL Server Starter Kit for AI Agents is a free AI agent skill on Agensi by Scott Coffey, in Data & Databases. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Scott Coffey](https://www.agensi.io/creators/scott-coffey)
- Category: [Data & Databases](https://www.agensi.io/skills/data-databases)
- Uses: 2
- Version: 1.3
- Last updated: 2026-11-02
- Security: scan passed (2026-11-02); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/sql-rig-free-sql-server-starter-kit-for-ai-agents
- Tags: database, sql-server, dba, powershell, t-sql, mssql, sql-agent, query-performance

## About this skill

AI agents write T-SQL fast and break production just as fast. SQL Rig Free gives your agent a set of rules and tested scripts to work from, so the first thing it reaches for is a read-only diagnostic or a dry-run template, not an unfiltered DELETE.

**What it does**

- Loads DBA rules into the agent: preferred toolchain, required shape for every write (NOCOUNT, XACT_ABORT, TRY/CATCH, idempotent guards), and a list of actions that need your explicit confirmation.
- Routes common requests to tested scripts instead of improvised SQL.
- Keeps every write behind `@DryRun = 1` or `-WhatIf` until you read the plan and flip the flag.

**What's included (13 working files)**

- Agent rules: SQL Server DBA system prompt.
- Read-only T-SQL: blocking chains and head blockers, top queries by CPU, duration, and reads, wait stats delta, linked-server connectivity test, surface-area audit.
- Templates: Agent job with category and schedule (idempotent, dry-run default), production-safe stored procedure, orphaned-user detection with optional remap.
- PowerShell: connection smoke test, blocking snapshot to CSV.
- Guardrails: production safety rules and a pre-change review checklist.

**Requirements**

- SQL Server 2016 or later, or Azure SQL Managed Instance. Each script states its minimum version and required permissions in its header.
- PowerShell 5.1 or later for the .ps1 files.
- You run the scripts yourself (SSMS, sqlcmd, Azure Data Studio, PowerShell). The skill never connects to a server.

Built by Scott Coffey, sqlrig.com. Source and MIT license: https://github.com/scottkcoffey-a11y/sqlrig-free

## Requires

- SSMS or sqlcmd or Azure Data Studio
- PowerShell 5.1+

SSMS is SQL Server Management Studio. PowerShell runs the .ps1 files.

## Known limitations

Does not connect directly to servers. Only supports SQL Server/T-SQL. Requires user execution via SSMS, sqlcmd, or PowerShell.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the SQL Rig Free: SQL Server Starter Kit for AI Agents skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### Does the skill connect to my server?

No. It gives the agent rules and scripts; you run them.

### Will it change anything?

Diagnostics are read-only. Every write script defaults to dry run.

### License?

MIT.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
