Code exemplars blueprint generator
Turn the user's exemplar-generation settings into a complete prompt that instructs GitHub Copilot to scan real repository files, choose representative code patterns, and create an actionable exemplars.md document.
When to invoke
- "Generate a prompt to find code exemplars in this repo."
- "Create an exemplars.md blueprint for our coding standards."
- "Give me configuration variables for scanning examples."
- "Find representative .NET, Java, React, Angular, Python, or TypeScript patterns."
- "Build a prompt that catalogs high-quality code examples."
Inputs
Use $ARGUMENTS as optional configuration text. Accept explicit values for PROJECT_TYPE, SCAN_DEPTH, INCLUDE_CODE_SNIPPETS, CATEGORIZATION, MAX_EXAMPLES_PER_CATEGORY, and INCLUDE_COMMENTS; otherwise use the defaults in the configuration table.
Configuration variables
| Variable |
Allowed values |
Default |
Controls |
PROJECT_TYPE |
Auto-detect, .NET, Java, JavaScript, TypeScript, React, Angular, Python, Other |
Auto-detect |
Which languages and frameworks the generated prompt emphasizes. |
SCAN_DEPTH |
Basic, Standard, Comprehensive |
Standard |
How much project-wide convention and architecture analysis to request. |
INCLUDE_CODE_SNIPPETS |
true, false |
true |
Whether exemplars.md includes short snippets as well as file paths. |
CATEGORIZATION |
Pattern Type, Architecture Layer, File Type |
Pattern Type |
How examples are grouped. |
MAX_EXAMPLES_PER_CATEGORY |
Positive integer |
3 |
Maximum exemplars in each category. |
INCLUDE_COMMENTS |
true, false |
true |
Whether each exemplar explains key implementation details and principles. |
Render these settings in the generated prompt as literal configuration assignments when useful:
${PROJECT_TYPE="Auto-detect|.NET|Java|JavaScript|TypeScript|React|Angular|Python|Other"}
${SCAN_DEPTH="Basic|Standard|Comprehensive"}
${INCLUDE_CODE_SNIPPETS=true|false}
${CATEGORIZATION="Pattern Type|Architecture Layer|File Type"}
${MAX_EXAMPLES_PER_CATEGORY=3}
${INCLUDE_COMMENTS=true|false}
Exemplar selection criteria
Only include actual files that exist in the codebase. Never invent hypothetical examples.
| Criterion |
What to look for |
Reject when |
| Readability |
Clear naming, small units, visible intent |
Clever but opaque implementation. |
| Documentation |
Helpful comments, docstrings, or README-backed usage |
Comments repeat syntax without explaining why. |
| Error handling |
Explicit validation, typed errors, recoverable failure paths |
Exceptions swallowed or converted to vague messages. |
| Architecture fit |
Separation of concerns, dependency direction, conventional boundaries |
Feature code bypasses layers or central conventions. |
| Tests |
Representative unit, integration, or component tests |
Tests only assert imports or snapshots with no behavior. |
| Maintainability |
Low duplication, simple control flow, standard patterns |
Code smell is present even if the file is common. |
Category catalog
Include only categories relevant to the detected or requested stack.
| Stack |
Candidate categories |
.NET |
Domain Models, Repository Implementations, Service Layer Components, Controller Patterns, Dependency Injection Usage, Middleware Components, Unit Test Patterns. |
Frontend (JavaScript, TypeScript, React, Angular) |
Component Structure, State Management, API Integration, Form Handling, Routing Implementation, UI Components, Unit Test Examples. |
Java |
Entity Classes, Service Implementations, Repository Patterns, Controller/Resource Classes, Configuration Classes, Unit Tests. |
Python |
Class Definitions, API Routes/Views, Data Models, Service Functions, Utility Modules, Test Cases. |
| Architecture layer grouping |
Presentation Layer, Business Logic Layer, Data Access Layer, Cross-Cutting Concerns such as logging, error handling, authentication/authorization, and validation. |
When SCAN_DEPTH is Comprehensive, ask the downstream scan to add Consistency Patterns, Architecture Observations, Implementation Conventions, and Anti-patterns to Avoid.
Generated prompt requirements
The generated prompt must instruct GitHub Copilot to:
- Detect primary languages and frameworks from file extensions and configuration files when
PROJECT_TYPE is Auto-detect; otherwise focus on the requested stack.
- Identify high-quality implementation, documentation, test, and structure examples.
- Prioritize files that demonstrate standards the team should copy.
- Verify every referenced path exists.
- Document file path, description, pattern/component type, optional key implementation comments, and optional short snippets.
- Create
exemplars.md with an introduction, table of contents, organized sections based on CATEGORIZATION, no more than MAX_EXAMPLES_PER_CATEGORY examples per category, and maintenance recommendations.
Prompt fragments to preserve
The generated prompt may include exact conditional language such as Focus on ${PROJECT_TYPE} code files when PROJECT_TYPE is not Auto-detect. Preserve stack category labels including Controllers/API, Routes/Views**, models/DTOs, and Authentication/authorization when the target repository uses those layers. Prefer the phrase well-structured for exemplar quality because the downstream artifact should distinguish representative files from merely functional files.
Output template
## Code exemplars blueprint
**Status:** ready
**Configuration:** `PROJECT_TYPE=<value>`, `SCAN_DEPTH=<value>`, `INCLUDE_CODE_SNIPPETS=<true/false>`, `CATEGORIZATION=<value>`, `MAX_EXAMPLES_PER_CATEGORY=<n>`, `INCLUDE_COMMENTS=<true/false>`
### Generated prompt
```text
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.
Configuration:
- PROJECT_TYPE: <value>
- SCAN_DEPTH: <value>
- INCLUDE_CODE_SNIPPETS: <true/false>
- CATEGORIZATION: <value>
- MAX_EXAMPLES_PER_CATEGORY: <n>
- INCLUDE_COMMENTS: <true/false>
<complete scan instructions, stack categories, documentation format, and verification rules>
Expected artifact
exemplars.md containing real repository file references, organized categories, and actionable guidance for developers implementing new features consistently.
## Quality gate
- [ ] All six configuration variables are present and resolved to allowed values.
- [ ] The generated prompt requires real existing file paths and bans hypothetical examples.
- [ ] Stack-specific categories match `PROJECT_TYPE` or auto-detection.
- [ ] `SCAN_DEPTH=Comprehensive` includes consistency patterns, architecture observations, implementation conventions, and anti-patterns.
- [ ] The output artifact is literally named `exemplars.md`.
- [ ] The prompt caps each category at `MAX_EXAMPLES_PER_CATEGORY`.
1---2name: code-exemplars-blueprint-generator3description: Generate a configurable prompt blueprint for scanning a codebase and producing an exemplars.md catalog of high-quality, real code examples. Use this skill when the user asks for code exemplars, exemplar blueprint prompts, coding standard examples, repository pattern catalogs, or configuration variables for exemplar generation.4---56<!-- Generated from harness/github-copilot/skills/code-exemplars-blueprint-generator/SKILL.md by harness/claude-code/scripts/convert_from_copilot.py. Edit the source, not this file. -->78# Code exemplars blueprint generator910Turn the user's exemplar-generation settings into a complete prompt that instructs GitHub Copilot to scan real repository files, choose representative code patterns, and create an actionable `exemplars.md` document.1112## When to invoke1314- "Generate a prompt to find code exemplars in this repo."15- "Create an exemplars.md blueprint for our coding standards."16- "Give me configuration variables for scanning examples."17- "Find representative .NET, Java, React, Angular, Python, or TypeScript patterns."18- "Build a prompt that catalogs high-quality code examples."1920## Inputs2122Use `$ARGUMENTS` as optional configuration text. Accept explicit values for `PROJECT_TYPE`, `SCAN_DEPTH`, `INCLUDE_CODE_SNIPPETS`, `CATEGORIZATION`, `MAX_EXAMPLES_PER_CATEGORY`, and `INCLUDE_COMMENTS`; otherwise use the defaults in the configuration table.2324## Configuration variables2526| Variable | Allowed values | Default | Controls |27| --- | --- | --- | --- |28| `PROJECT_TYPE` | `Auto-detect`, `.NET`, `Java`, `JavaScript`, `TypeScript`, `React`, `Angular`, `Python`, `Other` | `Auto-detect` | Which languages and frameworks the generated prompt emphasizes. |29| `SCAN_DEPTH` | `Basic`, `Standard`, `Comprehensive` | `Standard` | How much project-wide convention and architecture analysis to request. |30| `INCLUDE_CODE_SNIPPETS` | `true`, `false` | `true` | Whether `exemplars.md` includes short snippets as well as file paths. |31| `CATEGORIZATION` | `Pattern Type`, `Architecture Layer`, `File Type` | `Pattern Type` | How examples are grouped. |32| `MAX_EXAMPLES_PER_CATEGORY` | Positive integer | `3` | Maximum exemplars in each category. |33| `INCLUDE_COMMENTS` | `true`, `false` | `true` | Whether each exemplar explains key implementation details and principles. |3435Render these settings in the generated prompt as literal configuration assignments when useful:3637```text38${PROJECT_TYPE="Auto-detect|.NET|Java|JavaScript|TypeScript|React|Angular|Python|Other"}39${SCAN_DEPTH="Basic|Standard|Comprehensive"}40${INCLUDE_CODE_SNIPPETS=true|false}41${CATEGORIZATION="Pattern Type|Architecture Layer|File Type"}42${MAX_EXAMPLES_PER_CATEGORY=3}43${INCLUDE_COMMENTS=true|false}44```4546## Exemplar selection criteria4748Only include actual files that exist in the codebase. Never invent hypothetical examples.4950| Criterion | What to look for | Reject when |51| --- | --- | --- |52| Readability | Clear naming, small units, visible intent | Clever but opaque implementation. |53| Documentation | Helpful comments, docstrings, or README-backed usage | Comments repeat syntax without explaining why. |54| Error handling | Explicit validation, typed errors, recoverable failure paths | Exceptions swallowed or converted to vague messages. |55| Architecture fit | Separation of concerns, dependency direction, conventional boundaries | Feature code bypasses layers or central conventions. |56| Tests | Representative unit, integration, or component tests | Tests only assert imports or snapshots with no behavior. |57| Maintainability | Low duplication, simple control flow, standard patterns | Code smell is present even if the file is common. |5859## Category catalog6061Include only categories relevant to the detected or requested stack.6263| Stack | Candidate categories |64| --- | --- |65| `.NET` | Domain Models, Repository Implementations, Service Layer Components, Controller Patterns, Dependency Injection Usage, Middleware Components, Unit Test Patterns. |66| Frontend (`JavaScript`, `TypeScript`, `React`, `Angular`) | Component Structure, State Management, API Integration, Form Handling, Routing Implementation, UI Components, Unit Test Examples. |67| `Java` | Entity Classes, Service Implementations, Repository Patterns, Controller/Resource Classes, Configuration Classes, Unit Tests. |68| `Python` | Class Definitions, API Routes/Views, Data Models, Service Functions, Utility Modules, Test Cases. |69| Architecture layer grouping | Presentation Layer, Business Logic Layer, Data Access Layer, Cross-Cutting Concerns such as logging, error handling, authentication/authorization, and validation. |7071When `SCAN_DEPTH` is `Comprehensive`, ask the downstream scan to add Consistency Patterns, Architecture Observations, Implementation Conventions, and Anti-patterns to Avoid.7273## Generated prompt requirements7475The generated prompt must instruct GitHub Copilot to:76771. Detect primary languages and frameworks from file extensions and configuration files when `PROJECT_TYPE` is `Auto-detect`; otherwise focus on the requested stack.782. Identify high-quality implementation, documentation, test, and structure examples.793. Prioritize files that demonstrate standards the team should copy.804. Verify every referenced path exists.815. Document file path, description, pattern/component type, optional key implementation comments, and optional short snippets.826. Create `exemplars.md` with an introduction, table of contents, organized sections based on `CATEGORIZATION`, no more than `MAX_EXAMPLES_PER_CATEGORY` examples per category, and maintenance recommendations.8384## Prompt fragments to preserve8586The generated prompt may include exact conditional language such as `Focus on ${PROJECT_TYPE} code files` when `PROJECT_TYPE` is not `Auto-detect`. Preserve stack category labels including `Controllers/API`, `Routes/Views**`, `models/DTOs`, and `Authentication/authorization` when the target repository uses those layers. Prefer the phrase `well-structured` for exemplar quality because the downstream artifact should distinguish representative files from merely functional files.8788## Output template8990```markdown91## Code exemplars blueprint9293**Status:** ready94**Configuration:** `PROJECT_TYPE=<value>`, `SCAN_DEPTH=<value>`, `INCLUDE_CODE_SNIPPETS=<true/false>`, `CATEGORIZATION=<value>`, `MAX_EXAMPLES_PER_CATEGORY=<n>`, `INCLUDE_COMMENTS=<true/false>`9596### Generated prompt97```text98Scan 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.99100Configuration:101- PROJECT_TYPE: <value>102- SCAN_DEPTH: <value>103- INCLUDE_CODE_SNIPPETS: <true/false>104- CATEGORIZATION: <value>105- MAX_EXAMPLES_PER_CATEGORY: <n>106- INCLUDE_COMMENTS: <true/false>107108<complete scan instructions, stack categories, documentation format, and verification rules>109```110111### Expected artifact112`exemplars.md` containing real repository file references, organized categories, and actionable guidance for developers implementing new features consistently.113```114115## Quality gate116117- [ ] All six configuration variables are present and resolved to allowed values.118- [ ] The generated prompt requires real existing file paths and bans hypothetical examples.119- [ ] Stack-specific categories match `PROJECT_TYPE` or auto-detection.120- [ ] `SCAN_DEPTH=Comprehensive` includes consistency patterns, architecture observations, implementation conventions, and anti-patterns.121- [ ] The output artifact is literally named `exemplars.md`.122- [ ] The prompt caps each category at `MAX_EXAMPLES_PER_CATEGORY`.