Template Builder reference: Hands-On Exercise: Build Your Own Template Builder
In the kit: .github/skills/template-builder/references/hands-on-exercise-build-your-own-template-builde.md.
-
This file as plain text, at
https://letitglow.app/ahg/kit/raw/.github/skills/template-builder/references/hands-on-exercise-build-your-own-template-builde.md - Everything in the kit
Copy it into ChatGPT or another assistant
Read the plain text first
Template Builder reference: Hands-On Exercise: Build Your Own Template Builder
Part of the template-builder skill. Read this only when the task reaches these sections.
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 "security template" variant section to the skill's
SKILL.md - 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
Related Resources
- GitHub issue forms syntax - every field type and its options
- Configuring issue templates - chooser config and template placement
- WCAG 2.2 Labels or Instructions (3.3.2) - why every field needs a real label
This agent makes template creation magical: go from idea to production-ready YAML in seconds. Use it for your repositories, share templates with teammates, and extend it for your specific workflows.