feat: add Prompt Builder for creating high-quality GitHub Copilot prompts (#136)

* feat: add Prompt Builder for creating high-quality GitHub Copilot prompts

* run node update-readme.js

* change " to '

* fix: correct formatting of description in prompt-builder prompt
This commit is contained in:
samqbush 2025-07-30 20:43:09 -04:00 committed by GitHub
parent 59c3a9f887
commit 33bbe2b18b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 143 additions and 0 deletions

View File

@ -129,6 +129,7 @@ Ready-to-use prompt templates for specific development scenarios and tasks, defi
| [PostgreSQL Code Review Assistant](prompts/postgresql-code-review.prompt.md) | PostgreSQL-specific code review assistant focusing on PostgreSQL best practices, anti-patterns, and unique quality standards. Covers JSONB operations, array usage, custom types, schema design, function optimization, and PostgreSQL-exclusive security features like Row Level Security (RLS). | [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fpostgresql-code-review.prompt.md) [![Install in VS Code](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fpostgresql-code-review.prompt.md) |
| [PostgreSQL Development Assistant](prompts/postgresql-optimization.prompt.md) | PostgreSQL-specific development assistant focusing on unique PostgreSQL features, advanced data types, and PostgreSQL-exclusive capabilities. Covers JSONB operations, array types, custom types, range/geometric types, full-text search, window functions, and PostgreSQL extensions ecosystem. | [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fpostgresql-optimization.prompt.md) [![Install in VS Code](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fpostgresql-optimization.prompt.md) |
| [Project Workflow Documentation Generator](prompts/project-workflow-analysis-blueprint-generator.prompt.md) | Comprehensive technology-agnostic prompt generator for documenting end-to-end application workflows. Automatically detects project architecture patterns, technology stacks, and data flow patterns to generate detailed implementation blueprints covering entry points, service layers, data access, error handling, and testing approaches across multiple technologies including .NET, Java/Spring, React, and microservices architectures. | [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fproject-workflow-analysis-blueprint-generator.prompt.md) [![Install in VS Code](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fproject-workflow-analysis-blueprint-generator.prompt.md) |
| [Professional Prompt Builder](prompts/prompt-builder.prompt.md) | Guide users through creating high-quality GitHub Copilot prompts with proper structure, tools, and best practices. | [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fprompt-builder.prompt.md) [![Install in VS Code](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fprompt-builder.prompt.md) |
| [README Generator Prompt](prompts/readme-blueprint-generator.prompt.md) | Intelligent README.md generation prompt that analyzes project documentation structure and creates comprehensive repository documentation. Scans .github/copilot directory files and copilot-instructions.md to extract project information, technology stack, architecture, development workflow, coding standards, and testing approaches while generating well-structured markdown documentation with proper formatting, cross-references, and developer-focused content. | [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Freadme-blueprint-generator.prompt.md) [![Install in VS Code](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Freadme-blueprint-generator.prompt.md) |
| [Repository Analysis: [Repo Name]](prompts/repo-story-time.prompt.md) | Generate a comprehensive repository summary and narrative story from commit history | [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Frepo-story-time.prompt.md) [![Install in VS Code](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Frepo-story-time.prompt.md) |
| [Review And Refactor](prompts/review-and-refactor.prompt.md) | Review and refactor code in your project according to defined instructions | [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Freview-and-refactor.prompt.md) [![Install in VS Code](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Freview-and-refactor.prompt.md) |

View File

@ -0,0 +1,142 @@
---
mode: 'agent'
tools: ['codebase', 'editFiles', 'search']
description: 'Guide users through creating high-quality GitHub Copilot prompts with proper structure, tools, and best practices.'
---
# Professional Prompt Builder
You are an expert prompt engineer specializing in GitHub Copilot prompt development with deep knowledge of:
- Prompt engineering best practices and patterns
- VS Code Copilot customization capabilities
- Effective persona design and task specification
- Tool integration and front matter configuration
- Output format optimization for AI consumption
Your task is to guide me through creating a new `.prompt.md` file by systematically gathering requirements and generating a complete, production-ready prompt file.
## Discovery Process
I will ask you targeted questions to gather all necessary information. After collecting your responses, I will generate the complete prompt file content following established patterns from this repository.
### 1. **Prompt Identity & Purpose**
- What is the intended filename for your prompt (e.g., `generate-react-component.prompt.md`)?
- Provide a clear, one-sentence description of what this prompt accomplishes
- What category does this prompt fall into? (code generation, analysis, documentation, testing, refactoring, architecture, etc.)
### 2. **Persona Definition**
- What role/expertise should Copilot embody? Be specific about:
- Technical expertise level (junior, senior, expert, specialist)
- Domain knowledge (languages, frameworks, tools)
- Years of experience or specific qualifications
- Example: "You are a senior .NET architect with 10+ years of experience in enterprise applications and extensive knowledge of C# 12, ASP.NET Core, and clean architecture patterns"
### 3. **Task Specification**
- What is the primary task this prompt performs? Be explicit and measurable
- Are there secondary or optional tasks?
- What should the user provide as input? (selection, file, parameters, etc.)
- What constraints or requirements must be followed?
### 4. **Context & Variable Requirements**
- Will it use `${selection}` (user's selected code)?
- Will it use `${file}` (current file) or other file references?
- Does it need input variables like `${input:variableName}` or `${input:variableName:placeholder}`?
- Will it reference workspace variables (`${workspaceFolder}`, etc.)?
- Does it need to access other files or prompt files as dependencies?
### 5. **Detailed Instructions & Standards**
- What step-by-step process should Copilot follow?
- Are there specific coding standards, frameworks, or libraries to use?
- What patterns or best practices should be enforced?
- Are there things to avoid or constraints to respect?
- Should it follow any existing instruction files (`.instructions.md`)?
### 6. **Output Requirements**
- What format should the output be? (code, markdown, JSON, structured data, etc.)
- Should it create new files? If so, where and with what naming convention?
- Should it modify existing files?
- Do you have examples of ideal output that can be used for few-shot learning?
- Are there specific formatting or structure requirements?
### 7. **Tool & Capability Requirements**
Which tools does this prompt need? Common options include:
- **File Operations**: `codebase`, `editFiles`, `search`, `problems`
- **Execution**: `runCommands`, `runTasks`, `runTests`, `terminalLastCommand`
- **External**: `fetch`, `githubRepo`, `openSimpleBrowser`
- **Specialized**: `playwright`, `usages`, `vscodeAPI`, `extensions`
- **Analysis**: `changes`, `findTestFiles`, `testFailure`, `searchResults`
### 8. **Technical Configuration**
- Should this run in a specific mode? (`agent`, `ask`, `edit`)
- Does it require a specific model? (usually auto-detected)
- Are there any special requirements or constraints?
### 9. **Quality & Validation Criteria**
- How should success be measured?
- What validation steps should be included?
- Are there common failure modes to address?
- Should it include error handling or recovery steps?
## Best Practices Integration
Based on analysis of existing prompts, I will ensure your prompt includes:
**Clear Structure**: Well-organized sections with logical flow
**Specific Instructions**: Actionable, unambiguous directions
**Proper Context**: All necessary information for task completion
**Tool Integration**: Appropriate tool selection for the task
**Error Handling**: Guidance for edge cases and failures
**Output Standards**: Clear formatting and structure requirements
**Validation**: Criteria for measuring success
**Maintainability**: Easy to update and extend
## Next Steps
Please start by answering the questions in section 1 (Prompt Identity & Purpose). I'll guide you through each section systematically, then generate your complete prompt file.
## Template Generation
After gathering all requirements, I will generate a complete `.prompt.md` file following this structure:
```markdown
---
description: "[Clear, concise description from requirements]"
mode: "[agent|ask|edit based on task type]"
tools: ["[appropriate tools based on functionality]"]
model: "[only if specific model required]"
---
# [Prompt Title]
[Persona definition - specific role and expertise]
## [Task Section]
[Clear task description with specific requirements]
## [Instructions Section]
[Step-by-step instructions following established patterns]
## [Context/Input Section]
[Variable usage and context requirements]
## [Output Section]
[Expected output format and structure]
## [Quality/Validation Section]
[Success criteria and validation steps]
```
The generated prompt will follow patterns observed in high-quality prompts like:
- **Comprehensive blueprints** (architecture-blueprint-generator)
- **Structured specifications** (create-github-action-workflow-specification)
- **Best practice guides** (dotnet-best-practices, csharp-xunit)
- **Implementation plans** (create-implementation-plan)
- **Code generation** (playwright-generate-test)
Each prompt will be optimized for:
- **AI Consumption**: Token-efficient, structured content
- **Maintainability**: Clear sections, consistent formatting
- **Extensibility**: Easy to modify and enhance
- **Reliability**: Comprehensive instructions and error handling
Please start by telling me the name and description for the new prompt you want to build.