← ClaudeAtlas

sql-server-best-practiceslisted

SQL Server and Azure SQL best practices for developers and DBAs. Use this skill whenever the user asks about T-SQL, stored procedures, query performance, indexes, schema design, database security, or SQL Server / Azure SQL maintenance — even if they don't say "best practices." Triggers on requests like "write a stored proc," "this query is slow," "clustered vs nonclustered index," "parameter sniffing," "WITH NOLOCK," "prevent SQL injection in MSSQL," "set up db permissions," "index rebuilds or backups," or "review this migration script." Use for any T-SQL code review, DDL review, or schema design question where the database is SQL Server or Azure SQL. Skip for MySQL, PostgreSQL, SQLite, Oracle, or any non-MSSQL database — the guidance here (RCSI, sp_Blitz, T-SQL syntax, SQL Agent, NEWSEQUENTIALID, etc.) does not apply to other platforms and could actively mislead. Also skip for ORM-only questions (Entity Framework errors, LINQ, Django migrations) where no T-SQL or SQL Server configuration is involved.
MaskedControl/skills · ★ 0 · API & Backend · score 71
Install: claude install-skill MaskedControl/skills
# SQL Server Best Practices This skill covers both on-premises SQL Server (2016+) and Azure SQL Database / Managed Instance. When differences exist between the two, they are called out in the relevant section. ## How to Use This Skill Identify which domain(s) the user's request falls into, then read the corresponding reference file(s) before responding. For requests that touch multiple domains (e.g., "review this stored proc and its indexes"), read all relevant files. | Domain | When to use | Reference file | |--------|-------------|----------------| | T-SQL & query patterns | Writing queries, stored procs, functions, CTEs, cursors, error handling | `references/query-patterns.md` | | Indexing strategy | Index design, fragmentation, missing/duplicate indexes, query plan issues | `references/indexing.md` | | Schema & data modeling | Table design, data types, naming conventions, constraints, relationships | `references/schema-design.md` | | Security | Permissions, least privilege, dynamic SQL injection, encryption, auditing | `references/security.md` | | Maintenance & monitoring | Health checks, index rebuild, statistics, backups, CHECKDB | `references/maintenance.md` | ## Quick Principles (always apply) These apply regardless of domain — internalize them before reading any reference file: 1. **Correctness first.** A fast query that returns wrong results is worse than a slow correct one. 2. **Set-based over row-by-row.** SQL Server is optimized for set operations; cursors