sql-development
Skill22 starsChanged 24 days agoMITView on GitHub
T-SQL, stored procedures, and MS SQL Server DBA practices. Use when writing SQL queries, designing schemas, tuning SQL Server performance, managing backups, configuring security, or using SQL Server 2025+ features.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- jgeorgeai11/claude_code_resourcestheir own version, first seen Sep 1, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- jgeorgeai11/claude_code_resources★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository259 other files it gives its agents.
- AGENTS.mdAGENTS.md
- composition-patterns/AGENTS.mdAGENTS.md
- react-best-practices/AGENTS.mdAGENTS.md
- react-native-skills/AGENTS.mdAGENTS.md
- react-view-transitions/AGENTS.mdAGENTS.md
- vercel-optimize/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- accelerated-computing-cudfSkill
- accessibilitySkill
- agentic-evalSkill
- agent-skillguardSkill
- agent-task-mappingSkill
- ai-writing-detectorSkill
- avoid-ai-writing-routerSkill
- avoid-ai-writingSkill
- azure-integrationsSkill
- best-practicesSkill
- brainstormingSkill
- breaking-changes-managementSkill
- canvas-designSkill
- cloud-design-patternsSkill
- codebase-designSkill
- codebase-to-courseSkill
- code-examples-syncSkill
- code-qualitySkill
- codex-app-threadsSkill
- codex-computer-useSkill
- codexerSkill
- codex-in-app-browserSkill
- codex-router-mediaSkill
- codex-routerSkill
- collision-zone-thinkingSkill
- competition-submission-checkerSkill
- composition-patternsSkill
- condition-based-waitingSkill
- context-mapSkill
- core-web-vitalsSkill
- course-content-mapSkill
- csharp-xunitSkill
- custom-agent-usageSkill
- deepstream-devSkill
- deepstream-import-vision-modelSkill
- defense-in-depthSkill
- deploy-to-vercelSkill
- development-workflowSkill
- devops-toolingSkill
- dispatching-parallel-agentsSkill
- docSkill
- documentation-authoringSkill
- documentation-automationSkill
- documentation-patternsSkill
- documentation-qualitySkill
- documentation-verificationSkill
- document-metadata-reviewSkill
- docxSkill
- domain-modelingSkill
- dotnet-best-practicesSkill
- ds-notebook-strict-codeSkill
- ds-teaching-assistantSkill
- excalidraw-diagram-generatorSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
27 rules. About 0 are common, 20 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈20
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 36
Do not claim an MCP operation was used when the active host does not expose it.
- Distinctive: line 37
Treat local files, tests, rendered outputs, logs, or screenshots as the fallback evidence path.
- Distinctive: line 49
Before claiming "skill applied successfully":
- Distinctive: line 76
Use symptom -> action triggers: when one matches, apply this skill and verify with the protocol below.
- Distinctive: line 90
All table names in singular form
- Distinctive: line 91
All column names in singular form
- Very specific: line 94
All tables must have a primary key column named id
- Very specific: line 95
All tables must have created_at for creation timestamp
- Very specific: line 96
All tables must have updated_at for last update timestamp
- Distinctive: line 99
All tables must have a primary key constraint
- Distinctive: line 100
All foreign key constraints must have a name
- Distinctive: line 101
All foreign key constraints defined inline
- Very specific: line 102
All foreign keys must have ON DELETE CASCADE
- Distinctive: line 104
All foreign keys must reference the primary key of the parent table
- Very specific: line 118
Use explicit column names, never SELECT *
- Distinctive: line 120
Prefer JOINs over subqueries when possible
- Distinctive: line 122
Use appropriate indexing for frequently queried columns
- Very specific: line 123
Avoid functions on indexed columns in WHERE clauses
- Distinctive: line 140
Document parameters with comments
- Very specific: line 147
Use OUTPUT parameters for returning status information
- Distinctive: line 157
Use prepared statements for dynamic SQL
- Distinctive: line 158
Avoid embedding credentials in SQL scripts
- Distinctive: line 160
Avoid dynamic SQL in stored procedures
- Distinctive: line 164
Use appropriate isolation levels
- Distinctive: line 165
Avoid long-running transactions that lock tables
- Distinctive: line 166
Use batch processing for large data operations
- Distinctive: line 174
Use official Microsoft documentation for reference and troubleshooting
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
SQL Development
Optimized for current PostgreSQL, MySQL, and SQL Server releases plus migration-first database workflows.
Comprehensive SQL development guidelines combining SQL coding standards, stored procedure generation, and MS SQL Server DBA best practices.
- Leverage native parallel subagent dispatch and 200k+ context windows where available.
<!-- MCP:START --><!-- PORTABILITY:START -->Cross-Client Portability
This skill is written to stay usable across GitHub Copilot, Claude Code, and Codex.
- GitHub Copilot: keep the folder in a Copilot-visible skill path or wrap the workflow in project instructions when folder discovery is unavailable.
- Claude Code: keep the folder in a local skills directory or a compatible plugin source.
- Codex: install or sync the folder into
$CODEX_HOME/skills/sql-developmentand restart Codex after major changes.
<!-- PORTABILITY:END -->MCP Availability And Fallback
Preferred MCP Server: None required
- Fallback prompt: "Use the SQL Development skill without MCP. Rely on its local instructions, bundled resources, standard shell or editor tools, and direct verification. Show the evidence used before concluding."
- Do not claim an MCP operation was used when the active host does not expose it.
- Treat local files, tests, rendered outputs, logs, or screenshots as the fallback evidence path.
<!-- MCP:END -->Anti-Patterns
- Using
SELECT *in production queries: It hides contract drift and pulls more data than the caller needs. - Writing non-SARGable predicates: Functions on indexed columns turn otherwise cheap queries into table scans.
- Ignoring transaction and lock behavior: Correct SQL needs both logical correctness and concurrency safety.
Verification Protocol
Before claiming "skill applied successfully":
- Pass/fail: The SQL Development implementation names the target runtime, framework version, and affected files.
- Pass/fail: Build, lint, test, or equivalent local validation is run for the changed surface.
- Pass/fail: Edge cases for errors, dependency drift, and environment differences are addressed or explicitly out of scope.
- Pressure-test scenario: Apply the workflow to a change that passes happy-path tests but fails one boundary condition.
- Success metric: Zero untested success claims; every implementation claim maps to a command or artifact.
Before and After Example
-- Before
SELECT *
FROM Orders
WHERE YEAR(created_at) = 2026;
-- After
SELECT order_id, customer_id, created_at, total_amount
FROM Orders
WHERE created_at >= '2026-01-01'
AND created_at < '2027-01-01';Uses explicit columns and a SARGable date range so indexes can do their work.
Activation Conditions
Use symptom -> action triggers: when one matches, apply this skill and verify with the protocol below.
- Writing SQL queries and stored procedures
- Designing database schemas and table structures
- Working with MS SQL Server as a DBA
- Performance tuning and query optimization
- Database backup, restore, and security configuration
- SQL Server 2025+ feature adoption and migration
Part 1: Database Schema Design
Table Naming
- All table names in singular form
- All column names in singular form
Required Columns
- All tables must have a primary key column named
id - All tables must have
created_atfor creation timestamp - All tables must have
updated_atfor last update timestamp
Constraints
- All tables must have a primary key constraint
- All foreign key constraints must have a name
- All foreign key constraints defined inline
- All foreign keys must have
ON DELETE CASCADE - All foreign keys must have
ON UPDATE CASCADE - All foreign keys must reference the primary key of the parent table
Part 2: SQL Coding Style
Formatting
- Uppercase for SQL keywords (
SELECT,FROM,WHERE) - Consistent indentation for nested queries
- Comments to explain complex logic
- Break long queries into multiple lines
- Organize clauses:
SELECT,FROM,JOIN,WHERE,GROUP BY,HAVING,ORDER BY
Query Structure
- Use explicit column names, never
SELECT * - Qualify column names with table alias when using multiple tables
- Prefer JOINs over subqueries when possible
- Include
LIMIT/TOPclauses to restrict result sets - Use appropriate indexing for frequently queried columns
- Avoid functions on indexed columns in
WHEREclauses
Part 3: Stored Procedure Standards
Naming Conventions
- Prefix with
usp_ - Use PascalCase:
usp_GetCustomerOrders - Include plural noun for multiple records:
usp_GetProducts - Include singular noun for single record:
usp_GetProduct
Parameter Handling
- Prefix parameters with
@ - Use camelCase:
@customerId - Provide default values for optional parameters
- Validate parameter values before use
- Document parameters with comments
- Required parameters first, optional later
Structure
- Include header comment block with description, parameters, return values
- Return standardized error codes/messages
- Return result sets with consistent column order
- Use
OUTPUTparameters for returning status information - Prefix temporary tables with
tmp_ - Include
SET NOCOUNT ONfor data-modifying procedures
Part 4: Security Best Practices
Query Security
- Parameterize all queries to prevent SQL injection
- Use prepared statements for dynamic SQL
- Avoid embedding credentials in SQL scripts
- Proper error handling without exposing system details
- Avoid dynamic SQL in stored procedures
Transaction Management
- Explicitly begin and commit transactions
- Use appropriate isolation levels
- Avoid long-running transactions that lock tables
- Use batch processing for large data operations
Part 5: MS SQL Server DBA
Tooling
- Install and enable
ms-mssql.mssqlVS Code extension for full database management - Use official Microsoft documentation for reference and troubleshooting
DBA Responsibilities
- Database creation and configuration
- Backup and restore strategies
- Performance tuning and index optimization
- Security management and auditing
- Upgrades and compatibility planning (SQL Server 2025+)
Best Practices
- Focus on tool-based database inspection over codebase analysis
- Highlight deprecated/discontinued features in SQL Server 2025+
- Encourage secure, auditable, performance-oriented solutions
- Reference official docs for troubleshooting
- Warn about deprecated features and suggest alternatives
Troubleshooting
| Issue | Solution |
| Slow queries | Check execution plan, add indexes, optimize JOINs |
| Deadlocks | Reduce transaction scope, consistent lock ordering |
| Missing data | Verify CASCADE rules, check transaction isolation |
| Permission errors | Review GRANT/REVOKE statements, check role membership |
| Connection issues | Verify firewall rules, connection strings, SQL auth settings |
Common Pitfalls
- Using
SELECT *in production queries: It hides contract drift and pulls more data than the caller actually needs. - Writing non-SARGable predicates: Functions on indexed columns turn otherwise cheap queries into table scans.
- Skipping transaction and lock analysis: Correct SQL needs both logical correctness and concurrency safety.
References & Resources
Documentation
- T-SQL Patterns — MERGE, CTEs, PIVOT, JSON operations, window functions, and error handling
- Performance Tuning — Execution plans, index tuning, Query Store, and anti-patterns
Scripts
- Stored Procedure Template — Production-ready SP template with TRY/CATCH, pagination, and dynamic sorting
Examples
- Schema Design Example — Recipe Management System with 10 tables, stored procedures, and migrations
Related Skills
- php-development: Use it when the workflow also needs modern PHP backend implementation.
- powerbi-modeling: Use it when the workflow also needs Power BI semantic model design and DAX work.
- code-quality: Use it when the workflow also needs two-stage review (spec compliance first, then code quality), maintainability, and refactoring guidance.
- systematic-debugging: Use it when the workflow also needs root-cause debugging before proposing fixes.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

