Reviewed by 20X · No signed release verified
- Works with (as stated by the author)
- GitHub Copilot, VS Code
Review details
- Human review
- Review recorded for these files
- Limited checks
- Limited checks recorded (v2.1.0)
- Source
- Source not verified
A verified signature checks published file bytes against a trusted publisher’s signed manifest. It does not verify safety, authorship, rights or assistant use.
Declarations and limited checks do not guarantee safety or sharing rights. Review the files before use. Access that the author has not stated is unknown.
How to use it
- 1Save the file in your repository under .github/instructions/.
- 2Check the applyTo pattern at the top of the file and narrow it if needed.
- 3Commit the file so everyone using GitHub Copilot in the repository gets the same guidance.
Community results
0 reportsNo one has shared a result yet.
1 file. Filenames and raw files are in Technical details.
description: 'Guidelines for generating SQL statements and stored procedures' applyTo: '**/*.sql'
SQL Development
Database schema generation
- all table names should be in singular form
- all column names should be in singular form
- all tables should have a primary key column named
id - all tables should have a column named
created_atto store the creation timestamp - all tables should have a column named
updated_atto store the last update timestamp
Database schema design
- all tables should have a primary key constraint
- all foreign key constraints should have a name
- all foreign key constraints should be defined inline
- all foreign key constraints should have
ON DELETE CASCADEoption - all foreign key constraints should have
ON UPDATE CASCADEoption - all foreign key constraints should reference the primary key of the parent table
SQL Coding Style
- use uppercase for SQL keywords (SELECT, FROM, WHERE)
- use consistent indentation for nested queries and conditions
- include comments to explain complex logic
- break long queries into multiple lines for readability
- organize clauses consistently (SELECT, FROM, JOIN, WHERE, GROUP BY, HAVING, ORDER BY)
SQL Query Structure
- use explicit column names in SELECT statements instead of SELECT *
- qualify column names with table name or alias when using multiple tables
- limit the use of subqueries when joins can be used instead
- include LIMIT/TOP clauses to restrict result sets
- use appropriate indexing for frequently queried columns
- avoid using functions on indexed columns in WHERE clauses
Stored Procedure Naming Conventions
- prefix stored procedure names with 'usp_'
- use PascalCase for stored procedure names
- use descriptive names that indicate purpose (e.g., usp_GetCustomerOrders)
- include plural noun when returning multiple records (e.g., usp_GetProducts)
- include singular noun when returning single record (e.g., usp_GetProduct)
Parameter Handling
- prefix parameters with '@'
- use camelCase for parameter names
- provide default values for optional parameters
- validate parameter values before use
- document parameters with comments
- arrange parameters consistently (required first, optional later)
Stored Procedure Structure
- include header comment block with description, parameters, and return values
- return standardized error codes/messages
- return result sets with consistent column order
- use OUTPUT parameters for returning status information
- prefix temporary tables with 'tmp_'
SQL Security Best Practices
- parameterize all queries to prevent SQL injection
- use prepared statements when executing dynamic SQL
- avoid embedding credentials in SQL scripts
- implement proper error handling without exposing system details
- avoid using dynamic SQL within stored procedures
Transaction Management
- explicitly begin and commit transactions
- use appropriate isolation levels based on requirements
- avoid long-running transactions that lock tables
- use batch processing for large data operations
- include SET NOCOUNT ON for stored procedures that modify data
Latest changes
Initial reviewed release.
Version history
v1.0.0
Initial reviewed release.
File access pausedFile verification
- File integrity
No signed release verified for this version.
This checks published bytes, not safety, authorship, rights or assistant use.
Full compatibility
As stated by the author: GitHub Copilot, VS Code
Included files
1 filesql-sp-generation.instructions.md
markdownPublic file access is temporarily paused.
Use in your own tool
Save this resource and connect your assistant in the Use with flow before copying a test request.
Related resources
Vue.js Guidelines
Vue 3 guidance: Composition API, components, state, performance, and testing.
GitHub Copilot, VS Code
- Rating
- Not rated
- Recorded downloads in the past 90 days
- 0
- Updated
- Nov 11
Power BI Report Design
Report design guidance: layout, visuals, accessibility, and storytelling in Power BI.
GitHub Copilot, VS Code
- Rating
- Not rated
- Recorded downloads in the past 90 days
- 0
- Updated
- Nov 11
Neon MCP Server
Official Neon MCP for managing Postgres projects, branches, migrations, and queries in natural language.
Claude Desktop, Claude Code +6
- Rating
- Not rated
- Recorded downloads in the past 90 days
- 0
- Updated
- Nov 11