Authoritative Sources
- GitHub Issue Templates — https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository
- GitHub Pull Request Templates — https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/creating-a-pull-request-template-for-your-repository
- GitHub Discussion Templates — https://docs.github.com/en/discussions/managing-discussions-for-your-community/creating-discussion-category-forms
Template Builder Agent
Shared instructions
Skills: github-workflow-standards, github-scanning
A magical interactive agent that guides you through building GitHub issue templates step-by-step using VS Code's Ask Questions feature. Instead of writing YAML, answer simple questions and the agent generates the template for you.
How to Use
In VS Code
- Open Copilot Chat (
Ctrl+Shift+IWindows,Cmd+Shift+ImacOS) - Type:
@template-builderor/build-template - The agent will ask you a series of questions to understand your template
- Answer each question in the Ask Questions prompts
- The agent generates your complete YAML template
- Copy the output to
.github/ISSUE_TEMPLATE/your-template-name.yml
In GitHub Web
- Open Copilot Chat (Copilot button in top right)
- Mention:
@template-builder - Type your template goals (e.g., "I want to build an accessibility bug report template")
- The agent provides step-by-step YAML scaffolding you can copy and refine
Example Workflow
You: @template-builder create accessibility bug template
Agent asks (via Ask Questions):
- Template name? -> You answer: "Accessibility Bug Report"
- What's this template for? -> "Report screen reader and keyboard issues"
- First field? -> "Screen Reader (dropdown)"
- Dropdown options? -> "NVDA, JAWS, VoiceOver, Other"
- Is it required? -> "Yes"
- Next field? -> "Browser (dropdown)" ... (continues for each field)
Agent outputs: Complete YAML template ready to paste
Template Builder Guide: Step-by-Step
Phase 1: Gather Template Metadata
The agent starts by asking core questions about your template:
Questions:
- What is the template name? (e.g., "Bug Report", "Feature Request", "Accessibility Issue")
- One-line description of this template's purpose
- Default title prefix for issues (e.g., "[BUG]", "[A11Y]", "[FEAT]")
- What labels should this template auto-apply? (comma-separated)
Agent generates:
name: Your Template Name
description: Your description
title: "[TAG] "
labels: ["label1", "label2"]
Phase 2: Build Form Fields Interactively
The agent walks through adding fields one-by-one:
Questions for each field:
-
Field type? -> Show options:
markdown(instructional text)input(single-line text)textarea(multi-line text)dropdown(select from options)checkboxes(multiple selections)
-
Field label? (required)
-
Help text / description? (optional)
-
Is this field required? (yes/no)
-
For
textarea: Should code highlighting be enabled? (markdown, python, javascript, etc.) -
For
dropdown: What are the options? (comma-separated or one per line) -
For
dropdown: Can user select multiple? (yes/no) -
Another field? (yes/no)
Agent generates field YAML:
- type: dropdown
id: screen-reader
attributes:
label: Screen Reader
description: Which screen reader are you using?
options:
- NVDA
- JAWS
- VoiceOver
validations:
required: true
Phase 3: Generate Complete Template
Once all fields are entered, the agent:
-
Asks for final review:
- "Does this capture all the information you need?"
- "Any fields to reorder or remove?"
-
Generates the complete YAML:
- Full frontmatter with all metadata
- All fields in order
- Proper validation setup
- Formatted and ready to copy
-
Provides usage instructions:
- Where to save the file (.github/ISSUE_TEMPLATE/your-name.yml)
- How to test it
- How to edit it later
- How to add it to the template chooser via config.yml
Pre-Built Workflow: Guided Accessibility Template
The agent includes a guided workflow for the most common case: building an accessibility bug report template.
Invoke with
@template-builder+ "create accessibility template"/build-a11y-template
Workflow
The agent skips to Phase 2 but pre-populates it with accessibility-specific fields:
- Component affected? (dropdown with agent names)
- Screen reader (with NVDA, JAWS, VoiceOver, TalkBack, etc. pre-options)
- Browser version
- Operating system
- Expected behavior vs actual behavior
- Steps to reproduce
- WCAG success criterion (dropdown with criteria)
- Before submitting checklist (checkboxes for verification)
Output: Production-ready accessibility bug template you can immediately use.
Advanced: Customize the Template Builder
The Template Builder agent itself can be extended. Students in the workshop can:
- Add new field types -> Extend the agent to support custom validations
- Create workflow templates -> Pre-built templates for specific issue types (Security, Documentation, etc.)
- Add conditional fields -> Show/hide fields based on previous answers
- Export to markdown -> Generate Markdown templates in addition to YAML
- Template sharing -> Generate a code block to share with other projects
Integration with Nexus
The Template Builder works alongside the five core agents:
| Agent | Creates | Template Builder Uses |
|---|---|---|
| @daily-briefing | Issue summaries | Templates to collect consistent data |
| @issue-tracker | Issue recommendations | Templates to standardize issue quality |
| @pr-review | PR checklists | Templates to structure PR descriptions |
| @analytics | Performance insights | Templates to capture metrics consistently |
| @template-builder | Issue templates themselves | (This agent) |
Together: The five agents automate workflow; the Template Builder automates the infrastructure that makes workflows possible.
Day 2 Amplifier: From Manual to Magical
| Day 1 | Day 2 in Browser | Day 2 in VS Code | Nexus |
|---|---|---|---|
| Learn to identify accessibility issues in code review | Learn to design templates that prevent those issues | Use Template Builder to generate templates interactively | Agent automates the entire cycle |
| (Chapter 14) | (Chapter 15) | (Chapter 16) | (Capstone) |
Hands-On Exercise: Build Your Own Template Builder
During the workshop (Chapter 16), you will extend this agent:
Exercise 1: Generate Your Project's Template
- Open VS Code
- Activate Copilot Chat
- Type:
@template-builder+ describe your project's needs - Follow the Ask Questions flow
- Save the generated YAML to your fork
Exercise 2: Add a Workflow Variant
The base agent handles general templates. Add a security-template or documentation-template variant:
- Open the Template Builder agent definition
- Add a new slash command:
/build-security-template - Pre-populate field questions for security-specific data (vulnerability type, severity, affected versions)
- Test it with
@template-builder+ "create security template"
Exercise 3: Export to Markdown
Currently the agent outputs YAML. Add a follow-up step:
- After generating YAML, ask: "Also generate a Markdown version?"
- Convert the YAML field structure to Markdown template format
- Output both versions so users can choose
Exercise 4: Create a Template Showcase
Collect anonymous templates built by workshop participants:
- Your template works - share it
- Create a PR to
.github/community-templates/ - List your template (name, description, field count) in
COMMUNITY_TEMPLATES.md - Other participants can reference or fork your template
Technical Details: VS Code Ask Questions Integration
The Template Builder uses VS Code's Ask Questions feature to create an interactive wizard. Here's how it works internally:
Phase 1: Initial Questions
Agent asks (via Ask Questions UI):
- Template name?
[Input field with placeholder "e.g., Bug Report"]
- What is this template for?
[Text area with prompt text]
Accept / Cancel buttons below
Phase 2: Field-by-Field Loop
Agent displays:
"Add a field to your template"
[Dropdown: Select field type]
[Input: Field label]
[Textarea: Description]
[Checkbox: Required?]
[Checkbox: For textarea - enable code highlighting?]
[Dynamic input: For dropdown - add options]
[Add Another Field] [Finish]
Phase 3: Review
Agent shows:
"Here's your YAML template. Ready?"
[Syntax-highlighted code block]
[Copy to Clipboard] [Edit] [Save to file]
When the user clicks "Copy to Clipboard", the agent provides instructions:
- Go to VS Code Explorer
- Navigate to
.github/ISSUE_TEMPLATE/ - New file:
your-template-name.yml - Paste the YAML
- Save and commit
Troubleshooting & Tips
Issue: "I want to reorder my fields"
After the template is generated, ask: @template-builder reorder fields + paste your YAML. The agent will show you a visual reordering interface or provide the reordered YAML.
Issue: "I want to edit just one field"
Reply to the agent: "Change field 3 to a textarea instead of input" and the agent regenerates with that one change.
Tip: "Save time by describing your entire template at once"
Instead of using Ask Questions, you can paste a template description:
@template-builder
Create a template with:
- Component dropdown (values: Agent A, Agent B, Agent C)
- Severity dropdown (required)
- Detailed description textarea
- Steps to reproduce textarea
- Before submitting: 2 checkboxes
The agent parses your description and generates the template.
Tip: "Use the template for documentation too"
This agent creates GitHub issue templates, but the same pattern works for:
- PR templates (saved as
.github/pull_request_template.md) - Discussion templates
- GitHub Forms on custom websites