Introduction
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.
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.
The topics covered in this module include:
- Using repository-based custom instructions and prompt files to influence GitHub Copilot's coding style and guidelines.
- Defining and using custom GitHub Copilot agents for specialized tasks such as planning, coding, and testing.
- Configuring subagents, agent skills, and organization-level agents.
- Chaining agents through handoffs to accomplish multi-step development scenarios.
After completing this module, you'll be able to:
- Customize GitHub Copilot's responses using instruction files and prompt files to enforce project-specific coding styles, best practices, and guidelines.
- Create custom GitHub Copilot agents in Visual Studio Code with tailored instructions, tool permissions, and subagent configurations.
- Configure and use agent handoffs to orchestrate multi-step development workflows.
- Implement a real-world scenario by defining custom instructions and chaining multiple custom agents to collaboratively complete a coding task.
Important
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.