Autonomous SQL Server development agent for Claude Code. Write T-SQL queries, create stored procedures, optimize performance, and review code with live Microsoft documentation verification.
- Query Development: CTEs, window functions, PIVOT, MERGE, APPLY operators
- Stored Procedures: Proper error handling, transaction management, parameterization
- Performance Tuning: Execution plan analysis, index recommendations, anti-pattern detection
- Code Review: SQL injection detection, NOLOCK audit, non-SARGable pattern warnings
- Live Verification: Syntax verification against Microsoft's official GitHub documentation
- Deployment & Configuration: DSC-based automation using SqlServerDsc
claude plugin marketplace add hmohamed01/claude-code-plugins
claude plugin install sql-developerclaude --plugin-dir ./sql-developer/sql-developer write a query to find duplicate records
/sql-developer create a stored procedure for order processing
/sql-developer review my-query.sql for performance issues
/sql-developer what's the syntax for STRING_AGG?
The sql-developer agent triggers when you ask for help with:
- T-SQL query writing or optimization
- Stored procedure development
- Execution plan analysis
- SQL code review
- T-SQL syntax verification
| Component | Purpose |
|---|---|
sql-knowledge skill |
T-SQL patterns, performance, security, data types, transactions |
sql-developer agent |
Autonomous development with syntax verification |
/sql-developer command |
Direct invocation |
| Pattern hooks | Warn about unsafe SQL patterns in .sql files |
The plugin warns about these patterns when writing .sql files:
| Pattern | Risk |
|---|---|
String concatenation in EXEC() |
SQL Injection |
NOLOCK without comment |
Dirty reads |
Missing TRY...CATCH in procedures |
Unhandled errors |
| Cursor usage | Performance (set-based alternative may exist) |
SELECT * in views/procedures |
Maintenance, performance |
| Functions on columns in WHERE | Non-SARGable (no index usage) |
| Hardcoded credentials | Security |
| Multiple DML without transaction | Data integrity |
DATETIME instead of DATETIME2 |
Precision, range |
Warnings are advisory and don't block writes.
The agent verifies T-SQL syntax against Microsoft's official documentation:
Source: https://github.com/MicrosoftDocs/sql-docs
Format: Raw markdown via WebFetch
This ensures syntax recommendations are accurate and include version requirements.
For SQL Server deployment and configuration automation, the agent references the SqlServerDsc DSC module:
Source: https://github.com/dsccommunity/SqlServerDsc
Format: Wiki pages and raw source via WebFetch
Covers SQL Server installation, Availability Groups, memory/MaxDOP settings, logins, roles, permissions, and more via PowerShell Desired State Configuration.
The skill includes detailed reference documentation:
- patterns.md - CTEs, pagination, PIVOT, MERGE, window functions
- performance.md - Execution plans, parameter sniffing, Query Store
- security.md - SQL injection prevention, dynamic SQL, permissions
- data-types.md - Type selection, collation, precision/scale
- transactions.md - Isolation levels, deadlocks, distributed transactions
DECLARE @sql NVARCHAR(MAX) = N'SELECT * FROM Users WHERE Name = @Name';
EXEC sp_executesql @sql, N'@Name NVARCHAR(100)', @Name = @UserInput;BEGIN TRY
BEGIN TRANSACTION;
-- operations
COMMIT TRANSACTION;
END TRY
BEGIN CATCH
IF @@TRANCOUNT > 0 ROLLBACK TRANSACTION;
THROW;
END CATCH;SELECT OrderId, CustomerId, Amount,
SUM(Amount) OVER (PARTITION BY CustomerId ORDER BY OrderDate) AS RunningTotal
FROM Orders;Contributions welcome! Please follow the patterns established in this plugin.
MIT