GitHub Copilot Agent Builder
Generate custom GitHub Copilot agents following VS Code's .agent.md format with proper YAML frontmatter and markdown instructions.
When to Activate
Trigger this skill when user says:
- "create copilot agent"
- "generate github copilot agent"
- "new copilot agent for [purpose]"
- "make a copilot agent"
- "build copilot agent"
- "copilot custom agent"
Agent Creation Process
Step 1: Gather Requirements
Ask user for agent configuration:
Agent Purpose & Name:
- What should the agent do? (e.g., "plan features", "review security", "write tests")
- Suggested name: Extract from purpose (e.g., "planner", "security-reviewer", "test-writer")
Tools Selection (multi-select):
fetch - Retrieve web content and documentation
search - Search codebase and files
githubRepo - Access GitHub repository data
usages - Find code references and usage patterns
files - File operations
- Custom tools if available
Handoff Workflows (optional):
- Should this agent hand off to another? (e.g., planner → coder)
- Handoff agent name
- Handoff prompt text
- Auto-send handoff? (yes/no)
Additional Configuration (optional):
- Specific model to use?
- Argument hint for users?
Step 2: Validate Directory Structure
# Ensure .github/agents directory exists
mkdir -p .github/agents
Step 3: Generate Agent File
Create .github/agents/{agent-name}.agent.md with:
YAML Frontmatter Structure:
---
description: [Brief overview shown in chat input]
name: [Agent identifier, lowercase with hyphens]
tools: [Array of tool names]
handoffs: # Optional
- label: [Button text]
agent: [Target agent name]
prompt: [Handoff message]
send: [true/false - auto-submit?]
model: [Optional - specific model name]
argument-hint: [Optional - user guidance text]
---
Markdown Body:
- Clear role definition
- Specific instructions
- Tool usage guidance (reference as
#tool:toolname)
- Output format expectations
- Constraints and guidelines
Step 4: Validate Format
Ensure generated file has:
- ✓ Valid YAML frontmatter with
--- delimiters
- ✓ All required fields (description, name)
- ✓ Tools array properly formatted
- ✓ Handoffs array if specified (with label, agent, prompt, send)
- ✓ Markdown instructions that are clear and actionable
Step 5: Confirm Creation
Show user:
✅ GitHub Copilot Agent Created
📁 Location: `.github/agents/{name}.agent.md`
🎯 Agent: {name}
📝 Description: {description}
🛠️ Tools: {tools list}
To use:
1. Reload VS Code window (Cmd/Ctrl + Shift + P → "Reload Window")
2. Open GitHub Copilot Chat
3. Type `@{name}` to invoke your custom agent
{If handoffs configured: "This agent can hand off to: {handoff targets}"}
Output Format
After creation, provide:
- File path confirmation
- Configuration summary (name, description, tools, handoffs)
- Usage instructions (how to reload and use)
- Next steps (testing suggestions)
Reference Documentation
- Templates and structures →
templates.md
- Real-world examples →
examples.md
Important Guidelines
- Naming Convention: Use lowercase with hyphens (e.g.,
feature-planner, security-reviewer)
- Description: Brief (1-2 sentences), shown in chat input UI
- Tools: Only include tools the agent actually needs
- Handoffs: Enable multi-step workflows (planning → implementation → testing)
- Instructions: Be specific about what the agent should and shouldn't do
- Tool References: Use
#tool:toolname syntax in markdown body
Common Agent Patterns
Planning Agent:
- Tools:
fetch, search, githubRepo, usages
- Handoff: To implementation agent
- Focus: Analysis and planning, no code edits
Implementation Agent:
- Tools:
search, files, usages
- Handoff: To testing agent
- Focus: Write and modify code
Review Agent:
- Tools:
search, githubRepo, usages
- Handoff: Back to implementation for fixes
- Focus: Quality, security, performance checks
Testing Agent:
- Tools:
search, files
- Handoff: Back to implementation or to review
- Focus: Test creation and validation
Ready to build custom GitHub Copilot agents!
1---2name: copilot-agent-builder3description: Generate custom GitHub Copilot agents (.agent.md files) for VS Code with proper YAML frontmatter, tools configuration, and handoff workflows. Use when "create copilot agent", "generate github copilot agent", "new copilot agent for", "make a copilot agent", or "build copilot agent".4---5
6# GitHub Copilot Agent Builder
7
8Generate custom GitHub Copilot agents following VS Code's `.agent.md` format with proper YAML frontmatter and markdown instructions.
9
10## When to Activate
11
12Trigger this skill when user says:
13- "create copilot agent"
14- "generate github copilot agent"
15- "new copilot agent for [purpose]"
16- "make a copilot agent"
17- "build copilot agent"
18- "copilot custom agent"
19
20## Agent Creation Process
21
22### Step 1: Gather Requirements
23
24Ask user for agent configuration:
25
261. **Agent Purpose & Name**:
27 - What should the agent do? (e.g., "plan features", "review security", "write tests")
28 - Suggested name: Extract from purpose (e.g., "planner", "security-reviewer", "test-writer")
29
302. **Tools Selection** (multi-select):
31 - `fetch` - Retrieve web content and documentation
32 - `search` - Search codebase and files
33 - `githubRepo` - Access GitHub repository data
34 - `usages` - Find code references and usage patterns
35 - `files` - File operations
36 - Custom tools if available
37
383. **Handoff Workflows** (optional):
39 - Should this agent hand off to another? (e.g., planner → coder)
40 - Handoff agent name
41 - Handoff prompt text
42 - Auto-send handoff? (yes/no)
43
444. **Additional Configuration** (optional):
45 - Specific model to use?
46 - Argument hint for users?
47
48### Step 2: Validate Directory Structure
49
50```bash
51# Ensure .github/agents directory exists
52mkdir -p .github/agents
53```
54
55### Step 3: Generate Agent File
56
57Create `.github/agents/{agent-name}.agent.md` with:
58
59**YAML Frontmatter Structure**:
60```yaml
61---
62description: [Brief overview shown in chat input]
63name: [Agent identifier, lowercase with hyphens]
64tools: [Array of tool names]
65handoffs: # Optional
66 - label: [Button text]
67 agent: [Target agent name]
68 prompt: [Handoff message]
69 send: [true/false - auto-submit?]
70model: [Optional - specific model name]
71argument-hint: [Optional - user guidance text]
72---
73```
74
75**Markdown Body**:
76- Clear role definition
77- Specific instructions
78- Tool usage guidance (reference as `#tool:toolname`)
79- Output format expectations
80- Constraints and guidelines
81
82### Step 4: Validate Format
83
84Ensure generated file has:
85- ✓ Valid YAML frontmatter with `---` delimiters
86- ✓ All required fields (description, name)
87- ✓ Tools array properly formatted
88- ✓ Handoffs array if specified (with label, agent, prompt, send)
89- ✓ Markdown instructions that are clear and actionable
90
91### Step 5: Confirm Creation
92
93Show user:
94```markdown
95✅ GitHub Copilot Agent Created
96
97📁 Location: `.github/agents/{name}.agent.md`
98🎯 Agent: {name}
99📝 Description: {description}
100🛠️ Tools: {tools list}
101
102To use:
1031. Reload VS Code window (Cmd/Ctrl + Shift + P → "Reload Window")
1042. Open GitHub Copilot Chat
1053. Type `@{name}` to invoke your custom agent
106
107{If handoffs configured: "This agent can hand off to: {handoff targets}"}
108```
109
110## Output Format
111
112After creation, provide:
113
1141. **File path confirmation**
1152. **Configuration summary** (name, description, tools, handoffs)
1163. **Usage instructions** (how to reload and use)
1174. **Next steps** (testing suggestions)
118
119## Reference Documentation
120
121- Templates and structures → `templates.md`
122- Real-world examples → `examples.md`
123
124## Important Guidelines
125
1261. **Naming Convention**: Use lowercase with hyphens (e.g., `feature-planner`, `security-reviewer`)
1272. **Description**: Brief (1-2 sentences), shown in chat input UI
1283. **Tools**: Only include tools the agent actually needs
1294. **Handoffs**: Enable multi-step workflows (planning → implementation → testing)
1305. **Instructions**: Be specific about what the agent should and shouldn't do
1316. **Tool References**: Use `#tool:toolname` syntax in markdown body
132
133## Common Agent Patterns
134
135**Planning Agent**:
136- Tools: `fetch`, `search`, `githubRepo`, `usages`
137- Handoff: To implementation agent
138- Focus: Analysis and planning, no code edits
139
140**Implementation Agent**:
141- Tools: `search`, `files`, `usages`
142- Handoff: To testing agent
143- Focus: Write and modify code
144
145**Review Agent**:
146- Tools: `search`, `githubRepo`, `usages`
147- Handoff: Back to implementation for fixes
148- Focus: Quality, security, performance checks
149
150**Testing Agent**:
151- Tools: `search`, `files`
152- Handoff: Back to implementation or to review
153- Focus: Test creation and validation
154
155---
156
157**Ready to build custom GitHub Copilot agents!**