Skip to content

Add comprehensive SQL and PostgreSQL prompt ecosystem for code review and optimization#115

Merged
codemillmatt merged 13 commits into
github:mainfrom
shubham070:feature/sql-postgresql-prompts
Jul 25, 2025
Merged

Add comprehensive SQL and PostgreSQL prompt ecosystem for code review and optimization#115
codemillmatt merged 13 commits into
github:mainfrom
shubham070:feature/sql-postgresql-prompts

Conversation

@shubham070
Copy link
Copy Markdown
Contributor

Pull Request Checklist

  • I have read and followed the CONTRIBUTING.md guidelines.
  • My contribution adds a new instruction, prompt, or chat mode file in the correct directory.
  • The file follows the required naming convention.
  • The content is clearly structured and follows the example format.
  • I have tested my instructions, prompt, or chat mode with GitHub Copilot.
  • I have run node update-readme.js and verified that README.md is up to date.

Description

This PR adds a comprehensive 4-prompt ecosystem for SQL and PostgreSQL development:

  • sql-code-review.prompt.md - Universal SQL code review focusing on security, maintainability, and quality standards
  • sql-optimization.prompt.md - Universal SQL performance optimization for query tuning and indexing
  • postgresql-code-review.prompt.md - PostgreSQL-specific code review focusing on PG best practices
  • postgresql-optimization.prompt.md - PostgreSQL-specific development assistant for unique PG features

The prompts provide:

  • Zero functional overlap with clear separation between Universal SQL and PostgreSQL-specific guidance
  • Comprehensive coverage spanning Code Quality × Performance matrix for both domains
  • Security-first approach with SQL injection prevention and access control validation
  • Performance optimization with execution plan analysis and indexing strategies
  • PostgreSQL specialization covering JSONB, arrays, extensions, and advanced data types

Suitable for use with GitHub Copilot Chat.

Intended for developers, DBAs, and teams working with SQL databases seeking efficient workflows, security validation, and performance optimization guidance.

Follows all naming and formatting conventions outlined in the repository's CONTRIBUTING.md.

Model tested: Tested with GitHub Copilot Chat (GPT-4o) - Validated July 20, 2025

Type of Contribution

  • [X ] New prompt file.

Additional Notes

Files are clearly named to indicate SQL and PostgreSQL support
Zero overlap between Universal SQL and PostgreSQL-specific prompts
Comprehensive testing validation included
Covers complete development lifecycle from code review to performance optimization

shubham070 and others added 12 commits July 12, 2025 18:32
- Add sql-code-review.prompt.md: Universal SQL code review for security, maintainability, and quality standards
- Add sql-optimization.prompt.md: Universal SQL performance optimization for query tuning and indexing
- Add postgresql-code-review.prompt.md: PostgreSQL-specific code review focusing on PG best practices and anti-patterns
- Add postgresql-optimization.prompt.md: PostgreSQL-specific development assistant for unique PG features (JSONB, arrays, custom types)

This creates a complete 4-prompt ecosystem with zero overlap:
- Universal SQL (code quality + performance) for cross-database compatibility
- PostgreSQL-specific (code quality + performance) for PG-exclusive features

Each prompt serves distinct, isolated purposes while complementing each other for comprehensive SQL development support.
- Enhanced all 4 prompt descriptions with detailed capability coverage
- Added tested_with: 'GitHub Copilot Chat (GPT-4o)' to all prompts
- Specified database coverage (MySQL, PostgreSQL, SQL Server, Oracle)
- Detailed feature coverage for each prompt's unique capabilities
- Updated README.md with enhanced descriptions

Addresses PR review feedback for comprehensive descriptions and model testing specification.
…d testing validation

- Added detailed descriptions for all four prompts explaining their specific purposes
- Enhanced technical depth with comprehensive coverage areas
- Added testing validation with GitHub Copilot Chat (GPT-4o) - Validated July 20, 2025
- Improved frontmatter documentation for better discoverability
- Ensured zero functional overlap between Universal SQL and PostgreSQL-specific prompts
- Completed 4-prompt ecosystem: Code Quality  Performance for both Universal SQL and PostgreSQL
Copilot AI review requested due to automatic review settings July 20, 2025 09:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a comprehensive 4-prompt ecosystem for SQL and PostgreSQL development, providing specialized tools for code review and optimization across both universal SQL standards and PostgreSQL-specific features. The prompts offer complete coverage spanning security analysis, performance optimization, maintainability assessment, and PostgreSQL's advanced capabilities like JSONB operations, array types, and extensions.

Key changes include:

  • Universal SQL prompts covering security, performance, and code quality standards applicable across all major SQL databases
  • PostgreSQL-specific prompts focusing on unique features like JSONB, arrays, custom types, and advanced PostgreSQL capabilities
  • Clear separation between universal and PostgreSQL-specific guidance to avoid functional overlap
  • Comprehensive examples, anti-patterns, and optimization strategies for both domains

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
prompts/sql-code-review.prompt.md Universal SQL code review assistant for security, maintainability, and quality analysis across all SQL databases
prompts/sql-optimization.prompt.md Universal SQL performance optimization assistant for query tuning and indexing strategies
prompts/postgresql-code-review.prompt.md PostgreSQL-specific code review focusing on PostgreSQL best practices and unique features
prompts/postgresql-optimization.prompt.md PostgreSQL-specific development assistant covering advanced PostgreSQL capabilities
README.md Updated with entries for all four new SQL/PostgreSQL prompt files

Comment thread prompts/sql-optimization.prompt.md
Comment thread prompts/sql-code-review.prompt.md
Comment thread prompts/postgresql-optimization.prompt.md
Comment thread prompts/postgresql-code-review.prompt.md
@shubham070
Copy link
Copy Markdown
Contributor Author

Files already follow the requirement ensure that the values in the front matter are wrapped in single quotes
marking conversations close

@codemillmatt codemillmatt self-requested a review July 25, 2025 00:29
@codemillmatt codemillmatt merged commit bb64aa6 into github:main Jul 25, 2025
1 of 2 checks passed
@shubham070 shubham070 deleted the feature/sql-postgresql-prompts branch March 21, 2026 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants