Technology-agnostic prompt generator that creates customizable AI prompts for scanning codebases and identifying high-quality code exemplars. Supports multiple programming languages (.NET, Java, JavaScript, TypeScript, React, Angular, Python) with configurable analysis depth, categorization methods, and documentation formats to establish coding standards and maintain consistency across development teams.
${SCAN_DEPTH="Basic|Standard|Comprehensive"} <!-- How deeply to analyze the codebase -->
${INCLUDE_CODE_SNIPPETS=true|false} <!-- Include actual code snippets in addition to file references -->
${CATEGORIZATION="Pattern Type|Architecture Layer|File Type"} <!-- How to organize exemplars -->
${MAX_EXAMPLES_PER_CATEGORY=3} <!-- Maximum number of examples per category -->
${INCLUDE_COMMENTS=true|false} <!-- Include explanatory comments for each exemplar -->
Generated Prompt
"Scan this codebase and generate an exemplars.md file that identifies high-quality, representative code examples. The exemplars should demonstrate our coding standards and patterns to help maintain consistency. Use the following approach:
1. Codebase Analysis Phase
${PROJECT_TYPE == "Auto-detect" ? "Automatically detect primary programming languages and frameworks by scanning file extensions and configuration files" : Focus on ${PROJECT_TYPE} code files}
Identify files with high-quality implementation, good documentation, and clear structure
Look for commonly used patterns, architecture components, and well-structured implementations
Prioritize files that demonstrate best practices for our technology stack
Only reference actual files that exist in the codebase - no hypothetical examples
2. Exemplar Identification Criteria
Well-structured, readable code with clear naming conventions
Comprehensive comments and documentation
Proper error handling and validation
Adherence to design patterns and architectural principles
Separation of concerns and single responsibility principle
Consistency Patterns: Note consistent patterns observed across the codebase
Architecture Observations: Document architectural patterns evident in the code
Implementation Conventions: Identify naming and structural conventions
Anti-patterns to Avoid: Note any areas where the codebase deviates from best practices` : ""}
${SCAN_DEPTH == "Comprehensive" ? "7" : "6"}. Output Format
Create exemplars.md with:
Introduction explaining the purpose of the document
Table of contents with links to categories
Organized sections based on ${CATEGORIZATION}
Up to ${MAX_EXAMPLES_PER_CATEGORY} exemplars per category
Conclusion with recommendations for maintaining code quality
The document should be actionable for developers needing guidance on implementing new features consistent with existing patterns.
Important: Only include actual files from the codebase. Verify all file paths exist. Do not include placeholder or hypothetical examples.
"
Expected Output
Upon running this prompt, GitHub Copilot will scan your codebase and generate an exemplars.md file containing real references to high-quality code examples in your repository, organized according to your selected parameters.