Skip to content

Commit 7353e24

Browse files
authored
Merge pull request #53609 from ChrisHowd/Feb2026-configure-customize-github-copilot
Feb2026 configure customize GitHub copilot
2 parents b9d29a8 + 0587683 commit 7353e24

17 files changed

Lines changed: 821 additions & 0 deletions
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.configure-customize-github-copilot-visual-studio-code.introduction
3+
title: "Introduction"
4+
metadata:
5+
title: "Introduction"
6+
description: "Introduction."
7+
ms.date: 02/17/2026
8+
author: chrishowd
9+
ms.author: cahowd
10+
ms.topic: unit
11+
durationInMinutes: 3
12+
content: |
13+
[!include[](includes/1-introduction.md)]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.configure-customize-github-copilot-visual-studio-code.examine-benefits-customize-github-copilot
3+
title: "Examine the benefits of customizing GitHub Copilot"
4+
metadata:
5+
title: "Examine the Benefits of Customizing GitHub Copilot"
6+
description: "Examine the benefits of customizing GitHub Copilot."
7+
ms.date: 02/17/2026
8+
author: chrishowd
9+
ms.author: cahowd
10+
ms.topic: unit
11+
durationInMinutes: 4
12+
content: |
13+
[!include[](includes/2-examine-benefits-customize-github-copilot.md)]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.configure-customize-github-copilot-visual-studio-code.customize-copilot-responses-instruction-files
3+
title: "Customize GitHub Copilot responses using instruction files"
4+
metadata:
5+
title: "Customize GitHub Copilot Responses using Instruction Files"
6+
description: "Customize GitHub Copilot responses using instruction files."
7+
ms.date: 02/17/2026
8+
author: chrishowd
9+
ms.author: cahowd
10+
ms.topic: unit
11+
durationInMinutes: 8
12+
content: |
13+
[!include[](includes/3-customize-copilot-responses-instruction-files.md)]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.configure-customize-github-copilot-visual-studio-code.create-custom-github-copilot-agents
3+
title: "Create custom GitHub Copilot agents in Visual Studio Code"
4+
metadata:
5+
title: "Create Custom GitHub Copilot Agents in Visual Studio Code"
6+
description: "Create custom GitHub Copilot agents in Visual Studio Code."
7+
ms.date: 02/17/2026
8+
author: chrishowd
9+
ms.author: cahowd
10+
ms.topic: unit
11+
durationInMinutes: 8
12+
content: |
13+
[!include[](includes/4-create-custom-github-copilot-agents.md)]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.configure-customize-github-copilot-visual-studio-code.chain-agents-handoffs-multiple-step-tasks
3+
title: "Chain agents with handoffs for multi-step tasks"
4+
metadata:
5+
title: "Chain Agents with Handoffs for Multi-Step Tasks"
6+
description: "Chain agents with handoffs for multi-step tasks."
7+
ms.date: 02/17/2026
8+
author: chrishowd
9+
ms.author: cahowd
10+
ms.topic: unit
11+
durationInMinutes: 6
12+
content: |
13+
[!include[](includes/5-chain-agents-handoffs-multiple-step-tasks.md)]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.configure-customize-github-copilot-visual-studio-code.exercise-create-chain-custom-copilot-agents
3+
title: "Exercise - Create and chain custom GitHub Copilot agents for a C# project"
4+
metadata:
5+
title: "Exercise - Create and Chain Custom GitHub Copilot Agents for a C# Project"
6+
description: "Exercise - Create and chain custom GitHub Copilot agents for a C# project."
7+
ms.date: 02/17/2026
8+
author: chrishowd
9+
ms.author: cahowd
10+
ms.topic: unit
11+
durationInMinutes: 60
12+
content: |
13+
[!include[](includes/6-exercise-create-chain-custom-copilot-agents.md)]
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.configure-customize-github-copilot-visual-studio-code.knowledge-check
3+
title: Module assessment
4+
metadata:
5+
title: Module Assessment
6+
description: "Module assessment"
7+
ms.date: 02/17/2026
8+
author: chrishowd
9+
ms.author: cahowd
10+
ms.topic: unit
11+
durationInMinutes: 10
12+
quiz:
13+
title: "Check your knowledge"
14+
questions:
15+
- content: "What is the purpose of a `.github/copilot-instructions.md` file in a repository?"
16+
choices:
17+
- content: "It configures which AI model Copilot uses for inline code completions."
18+
isCorrect: false
19+
explanation: "Incorrect. The `copilot-instructions.md` file provides custom guidelines for Copilot Chat responses, not model configuration for inline completions."
20+
- content: "It provides always-on custom guidelines that are automatically included in every Copilot Chat request within the workspace."
21+
isCorrect: true
22+
explanation: "Correct. The `.github/copilot-instructions.md` file contains natural language guidelines in Markdown that Copilot automatically includes in every chat request, ensuring AI responses align with project-specific coding standards and conventions."
23+
- content: "It stores environment variables that Copilot needs to access external APIs."
24+
isCorrect: false
25+
explanation: "Incorrect. The `copilot-instructions.md` file contains natural language guidelines for Copilot, not environment variables or API configuration."
26+
- content: "How do `.instructions.md` files differ from the repository-wide `copilot-instructions.md` file?"
27+
choices:
28+
- content: "`.instructions.md` files replace the `copilot-instructions.md` file when both are present."
29+
isCorrect: false
30+
explanation: "Incorrect. When both exist, Copilot combines the repository-wide instructions with the relevant path-specific instructions rather than replacing one with the other."
31+
- content: "`.instructions.md` files use an `applyTo` frontmatter field to target specific files or file patterns, applying instructions only when the agent is working on matching files."
32+
isCorrect: true
33+
explanation: "Correct. Path-specific `.instructions.md` files include a YAML frontmatter header with an `applyTo` field that uses glob patterns to specify which files the instructions apply to, enabling targeted guidance for different parts of the codebase."
34+
- content: "`.instructions.md` files are only used for inline code completion suggestions, while `copilot-instructions.md` is used for chat responses."
35+
isCorrect: false
36+
explanation: "Incorrect. Neither file type affects inline code completions. Both types of instruction files apply to Copilot Chat and other high-level requests."
37+
- content: "What is a custom agent in Visual Studio Code's Copilot Chat?"
38+
choices:
39+
- content: "A built-in Visual Studio Code extension that adds new programming language support."
40+
isCorrect: false
41+
explanation: "Incorrect. Custom agents are specialized AI configurations for Copilot Chat, not Visual Studio Code extensions for language support."
42+
- content: "A specialized AI persona defined by a `.agent.md` file that encapsulates a set of instructions and tool permissions for a particular development role."
43+
isCorrect: true
44+
explanation: "Correct. Custom agents are defined using `.agent.md` Markdown files that include YAML frontmatter for metadata and tool configuration, plus a body with instructions that steer Copilot's behavior when that agent is selected."
45+
- content: "A remote server that processes Copilot requests on behalf of the developer."
46+
isCorrect: false
47+
explanation: "Incorrect. Custom agents are locally defined configurations in `.agent.md` files, not remote server processes."
48+
- content: "What does the `tools` field in a custom agent's YAML frontmatter control?"
49+
choices:
50+
- content: "The programming languages the agent can generate code in."
51+
isCorrect: false
52+
explanation: "Incorrect. The `tools` field controls what actions the agent can perform (such as reading, editing, or searching files), not which programming languages it supports."
53+
- content: "Which actions the agent can perform, such as reading files, editing code, searching the workspace, or running terminal commands."
54+
isCorrect: true
55+
explanation: "Correct. The `tools` field restricts or empowers the agent with specific capabilities. For example, a planning agent might only have `['search', 'read']` tools, while an implementation agent would include `['search', 'read', 'edit', 'terminal']`."
56+
- content: "The list of non-Microsoft extensions that the agent depends on."
57+
isCorrect: false
58+
explanation: "Incorrect. The `tools` field specifies built-in Copilot capabilities (like read, edit, search), not third-party extension dependencies."
59+
- content: "What is a handoff in the context of custom Copilot agents?"
60+
choices:
61+
- content: "A mechanism for transferring Copilot Chat conversations to a human developer."
62+
isCorrect: false
63+
explanation: "Incorrect. Handoffs transition between custom agents within Copilot Chat, not from the AI to a human developer."
64+
- content: "A transition that switches from one custom agent to another, carrying over context and optionally prefilling a prompt to continue a multi-step workflow."
65+
isCorrect: true
66+
explanation: "Correct. Handoffs are configured in the YAML frontmatter of an agent file and create buttons that, when selected, switch to a target agent with the conversation context preserved and an optional prompt prefilled."
67+
- content: "A process that automatically saves the agent's output to a file in the workspace."
68+
isCorrect: false
69+
explanation: "Incorrect. Handoffs are transitions between agents in a workflow, not file-saving operations."
70+
- content: "When a developer configures a handoff, what does setting `send: false` mean?"
71+
choices:
72+
- content: "The handoff button is hidden from the user interface."
73+
isCorrect: false
74+
explanation: "Incorrect. The `send` field controls whether the prompt is automatically submitted, not whether the handoff button is visible."
75+
- content: "The prompt is prefilled in the chat input for the developer to review and edit before sending, rather than being submitted automatically."
76+
isCorrect: true
77+
explanation: "Correct. When `send` is `false` (the default), the handoff prefills the prompt text but waits for the developer to review and submit it manually, keeping the human in the loop."
78+
- content: "The handoff is disabled and the agent can't transition to the target agent."
79+
isCorrect: false
80+
explanation: "Incorrect. The `send: false` setting doesn't disable the handoff. It simply requires the developer to manually submit the prefilled prompt rather than having it sent automatically."
81+
- content: "What is the purpose of a `.prompt.md` file in the `.github/prompts/` folder?"
82+
choices:
83+
- content: "It defines a custom agent persona with specific tool permissions."
84+
isCorrect: false
85+
explanation: "Incorrect. Custom agent personas are defined in `.agent.md` files, not `.prompt.md` files."
86+
- content: "It provides a reusable prompt template that can be invoked as a slash command in Copilot Chat to run a common task consistently."
87+
isCorrect: true
88+
explanation: "Correct. Prompt files (`.prompt.md`) are reusable prompt templates with optional YAML frontmatter and variable placeholders. Once created, they appear as slash commands in Copilot Chat, allowing the team to standardize common tasks like generating tests or producing documentation."
89+
- content: "It configures which AI model Copilot uses for all chat interactions in the workspace."
90+
isCorrect: false
91+
explanation: "Incorrect. Prompt files define reusable prompt templates, not model configuration. Model preferences can be set per-agent or per-prompt using the `model` frontmatter field."
92+
- content: "How do subagents differ from handoffs in custom agent workflows?"
93+
choices:
94+
- content: "Subagents and handoffs are different names for the same feature."
95+
isCorrect: false
96+
explanation: "Incorrect. Subagents and handoffs are distinct mechanisms. Subagents are invoked programmatically within an agent's response, while handoffs transfer control to the user to approve a transition."
97+
- content: "Subagents are invoked automatically within an agent's processing and return results to the calling agent, while handoffs transfer control to the user to approve a transition to another agent."
98+
isCorrect: true
99+
explanation: "Correct. Subagents are called programmatically by the parent agent during its response processing—the result flows back to the calling agent automatically. Handoffs, by contrast, present a button to the user who decides whether to transition to the next agent."
100+
- content: "Subagents can only run in the cloud, while handoffs run locally in Visual Studio Code."
101+
isCorrect: false
102+
explanation: "Incorrect. Both subagents and handoffs can run in either the client or the cloud, depending on the agent's `target` configuration."
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.configure-customize-github-copilot-visual-studio-code.summary
3+
title: "Summary"
4+
metadata:
5+
title: "Summary"
6+
description: "Summary."
7+
ms.date: 02/17/2026
8+
author: chrishowd
9+
ms.author: cahowd
10+
ms.topic: unit
11+
durationInMinutes: 2
12+
content: |
13+
[!include[](includes/8-summary.md)]
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
GitHub Copilot in Visual Studio Code offers powerful AI-assisted coding out of the box, but its true potential emerges when you customize it to match your team's specific workflows and project requirements. By providing custom instructions and creating specialized agents, you can transform GitHub Copilot from a general-purpose assistant into a set of tailored AI collaborators that understand your codebase, follow your conventions, and handle multi-step development tasks.
2+
3+
Imagine you're a developer on a team that maintains a large C# application. Your team has specific coding standards, architectural patterns, and review processes that every pull request must follow. Instead of repeating these guidelines in every GitHub Copilot Chat prompt, you can embed them directly into instruction files that GitHub Copilot reads automatically. You can also create custom agents—specialized AI personas like a "Planner" that designs implementation strategies or a "Code Reviewer" that checks for security issues—and chain them together so one agent's output flows into the next.
4+
5+
The topics covered in this module include:
6+
7+
- Using repository-based custom instructions and prompt files to influence GitHub Copilot's coding style and guidelines.
8+
- Defining and using custom GitHub Copilot agents for specialized tasks such as planning, coding, and testing.
9+
- Configuring subagents, agent skills, and organization-level agents.
10+
- Chaining agents through handoffs to accomplish multi-step development scenarios.
11+
12+
After completing this module, you'll be able to:
13+
14+
- Customize GitHub Copilot's responses using instruction files and prompt files to enforce project-specific coding styles, best practices, and guidelines.
15+
- Create custom GitHub Copilot agents in Visual Studio Code with tailored instructions, tool permissions, and subagent configurations.
16+
- Configure and use agent handoffs to orchestrate multi-step development workflows.
17+
- Implement a real-world scenario by defining custom instructions and chaining multiple custom agents to collaboratively complete a coding task.
18+
19+
> [!IMPORTANT]
20+
> To complete this GitHub Copilot training, you must have an active subscription for GitHub Copilot in your personal GitHub account (includes the GitHub Copilot Free plan), or you must be assigned to a subscription managed by an organization or enterprise. Module activities might include GitHub Copilot suggestions that match public code. If you're a member of an organization on GitHub Enterprise Cloud who is assigned to a GitHub Copilot subscription through your organization, the setting for suggestions matching public code might be inherited from your organization or enterprise. If your account blocks suggestions that match public code, module activities might not work as expected.

0 commit comments

Comments
 (0)