|
| 1 | +--- |
| 2 | +title: Use Agent Skills with GitHub Copilot |
| 3 | +description: Learn how to define reusable Agent Skills that teach Copilot agents how to perform specific tasks in Visual Studio. |
| 4 | +ms.date: 04/27/2026 |
| 5 | +ms.topic: how-to |
| 6 | +author: mikejo5000 |
| 7 | +ms.author: mikejo |
| 8 | +ms.manager: mijacobs |
| 9 | +ms.subservice: ai-tools |
| 10 | +ms.collection: ce-skilling-ai-copilot |
| 11 | +ms.custom: awp-ai |
| 12 | +ai-usage: ai-assisted |
| 13 | +ms.update-cycle: 180-days |
| 14 | +monikerRange: '>= visualstudio' |
| 15 | +--- |
| 16 | + |
| 17 | +# Use Agent Skills with GitHub Copilot |
| 18 | + |
| 19 | +Agent skills are reusable sets of instructions that teach Copilot agents how to perform specific tasks, like running a build pipeline, generating boilerplate, or following your team's coding standards. By defining skills once, you save time and ensure consistent behavior across your workflow. |
| 20 | + |
| 21 | +Skills complement [custom agents](copilot-specialized-agents.md) and [custom instructions](copilot-chat-context.md#use-custom-instructions). While custom agents define a persona and tool set, and custom instructions set general coding preferences, skills provide focused, task-specific guidance that any agent can discover and use automatically. |
| 22 | + |
| 23 | +## Prerequisites |
| 24 | + |
| 25 | ++ [Visual Studio 2026 version 18.5](/visualstudio/releases/2026/release-notes) or later |
| 26 | ++ A [GitHub Copilot subscription](https://docs.github.com/en/copilot/about-github-copilot/what-is-github-copilot#getting-access-to-copilot) |
| 27 | + |
| 28 | +## How Agent Skills work |
| 29 | + |
| 30 | +When you use [agent mode](copilot-agent-mode.md), Copilot automatically discovers skills from your repository and user profile. The agent decides when a skill is relevant to your request and activates it. When a skill is activated, it appears in the chat to let you know it's being applied. |
| 31 | + |
| 32 | +:::image type="content" source="media/visualstudio/agent-skills.png" alt-text="Screenshot that shows a skill being used by the Copilot agent in chat." lightbox="media/visualstudio/agent-skills.png"::: |
| 33 | + |
| 34 | +## Skill locations |
| 35 | + |
| 36 | +Skills are picked up from the following locations: |
| 37 | + |
| 38 | +| Skill type | Location | |
| 39 | +|---|---| |
| 40 | +| Workspace or project skills (stored in your repository) | `.github/skills/`, `.claude/skills/`, `.agents/skills/` | |
| 41 | +| Personal skills (stored in your user profile) | `~/.copilot/skills/`, `~/.claude/skills/`, `~/.agents/skills/` | |
| 42 | + |
| 43 | +Workspace skills are shared with your team through source control. Personal skills apply to all your projects and aren't committed to any repository. |
| 44 | + |
| 45 | +## Create a skill |
| 46 | + |
| 47 | +<!-- This goes out in 18.6 in May and replaces the subsequent sentence. |
| 48 | +You can create a skill from the skills panel in Visual Studio, or manually in your file system. |
| 49 | +--> |
| 50 | + |
| 51 | +You can create a skill manually in your file system. |
| 52 | + |
| 53 | +<!-- This goes out in 18.6 in May |
| 54 | +### Create a skill from the skills panel |
| 55 | +
|
| 56 | +1. Select the **Tools** icon in the bottom-right corner of Copilot Chat to open the skills panel. |
| 57 | +2. Select the **+** button in the top-right corner of the panel. |
| 58 | +
|
| 59 | + :::image type="content" source="media/visualstudio/skills-create.png" alt-text="Screenshot that shows creating a new skill from the skills panel." lightbox="media/visualstudio/skills-create.png"::: |
| 60 | +
|
| 61 | +1. Choose a destination (global or solution-level skill) and pick a name. |
| 62 | +
|
| 63 | + :::image type="content" source="media/visualstudio/skills-create-new.png" alt-text="Screenshot that shows naming a new skill." lightbox="media/visualstudio/skills-create-new.png"::: |
| 64 | +
|
| 65 | +1. Visual Studio generates a skill template for you to fill in. You can use Copilot agent mode to help you complete the template. |
| 66 | +--> |
| 67 | + |
| 68 | +### Create a skill manually |
| 69 | + |
| 70 | +Each skill is a directory containing a `SKILL.md` file that follows the [agentskills.io specification](https://agentskills.io/specification). |
| 71 | + |
| 72 | +1. Create a skills directory. For a workspace skill, use `.github/skills/` at the root of your repository. For a personal skill, use `~/.copilot/skills/`. |
| 73 | + |
| 74 | +2. Create a subdirectory for your skill. Each skill should have its own directory (for example, `.github/skills/github-issues/`). |
| 75 | + |
| 76 | +3. Create a `SKILL.md` file in the skill directory. The file contains YAML frontmatter with metadata followed by Markdown instructions. |
| 77 | + |
| 78 | +4. Optionally, add scripts, examples, or other resources to your skill's directory. |
| 79 | + |
| 80 | +### Skill directory structure |
| 81 | + |
| 82 | +```text |
| 83 | +your-repo/ |
| 84 | +└── .github/ |
| 85 | + └── skills/ |
| 86 | + └── github-issues/ |
| 87 | + ├── SKILL.md # Required: metadata + instructions |
| 88 | + ├── scripts/ # Optional: executable code |
| 89 | + ├── references/ # Optional: documentation |
| 90 | + └── assets/ # Optional: templates, resources |
| 91 | +``` |
| 92 | + |
| 93 | +### SKILL.md format |
| 94 | + |
| 95 | +The `SKILL.md` file must contain YAML frontmatter followed by Markdown content: |
| 96 | + |
| 97 | +```markdown |
| 98 | +--- |
| 99 | +name: github-issues |
| 100 | +description: Creates and manages GitHub issues following team conventions. Use when working with issue tracking, bug reports, or feature requests. |
| 101 | +--- |
| 102 | + |
| 103 | +When creating GitHub issues: |
| 104 | + |
| 105 | +- Use the standard title format: [Component] Brief description |
| 106 | +- Add appropriate labels based on issue type |
| 107 | +- Include reproduction steps for bug reports |
| 108 | +- Link related issues and PRs |
| 109 | +``` |
| 110 | + |
| 111 | +#### Frontmatter properties |
| 112 | + |
| 113 | +| Property | Required | Description | |
| 114 | +|----------|----------|-------------| |
| 115 | +| `name` | Yes | Lowercase letters, numbers, and hyphens only. Must match the parent directory name. Maximum 64 characters. | |
| 116 | +| `description` | Yes | Describes what the skill does and when to use it. Maximum 1,024 characters. | |
| 117 | +| `license` | No | License name or reference to a bundled license file. | |
| 118 | +| `compatibility` | No | Environment requirements, such as intended product or required system packages. | |
| 119 | +| `metadata` | No | Arbitrary key-value mapping for additional metadata. | |
| 120 | +| `allowed-tools` | No | Space-separated string of pre-approved tools the skill can use. | |
| 121 | + |
| 122 | +### Tips for writing effective skills |
| 123 | + |
| 124 | +- Keep the main `SKILL.md` under 500 lines. Move detailed reference material to separate files in the `references/` directory. |
| 125 | +- Write a clear `description` that includes specific keywords to help agents identify when the skill is relevant. |
| 126 | +- Include step-by-step instructions, examples, and common edge cases. |
| 127 | + |
| 128 | +## Manage skills from the skills panel |
| 129 | +<!-- Skills panel is in GA in 18.6 --> |
| 130 | +Select the **Tools** icon in the bottom-right corner of Copilot Chat to open the skills panel, a dedicated view of every discovered skill. The Skills panel is available only in the Visual Studio 2026 Insiders. |
| 131 | + |
| 132 | +:::image type="content" source="media/visualstudio/skills-panel.png" alt-text="Screenshot that shows the skills panel where you can edit and open skills." lightbox="media/visualstudio/skills-panel.png"::: |
| 133 | + |
| 134 | +From the panel, you can: |
| 135 | + |
| 136 | +- **Edit**: Open any skill's `SKILL.md` directly in the editor from the **...** menu. |
| 137 | +- **Open file location**: Jump to the skill directory on disk. |
| 138 | +- **Search**: Filter skills by name or keyword. |
| 139 | + |
| 140 | +The panel also surfaces diagnostics for any skill configuration errors, so you can quickly spot and fix issues. |
| 141 | + |
| 142 | +<!-- Remove for now. Simona would like to see a dedicated article for this subject |
| 143 | +## Skills vs. custom instructions |
| 144 | +
|
| 145 | +You might already use [custom instructions](copilot-chat-context.md#use-custom-instructions) (`.github/copilot-instructions.md`) to guide Copilot's behavior. Custom instructions are great for broad, always-on guidance, such as "use tabs, not spaces" or "prefer async/await over callbacks." They're automatically applied to every interaction with Copilot. |
| 146 | +
|
| 147 | +Agent skills are different. Skills are task-specific and dynamically loaded. The model decides when a skill is relevant and applies it only in matching contexts. |
| 148 | +
|
| 149 | +| Feature | Custom instructions | Agent skills | |
| 150 | +|---|---|---| |
| 151 | +| Scope | Always applied to every interaction | Applied only when the model determines relevance | |
| 152 | +| Purpose | Broad coding standards and preferences | Task-specific workflows and procedures | |
| 153 | +| Format | `.github/copilot-instructions.md` | `SKILL.md` in a skill directory | |
| 154 | +
|
| 155 | +Use custom instructions for rules that should always apply. Use skills for specialized workflows that only matter in certain contexts. |
| 156 | +
|
| 157 | +You can also extend your agent's capabilities through [MCP tools](mcp-servers.md), which let the agent interact with external services and APIs. Skills and MCP tools complement each other — a skill can describe how to handle a task while an MCP tool provides the capability to execute it. |
| 158 | +--> |
| 159 | + |
| 160 | +## Community skills |
| 161 | + |
| 162 | +See the [awesome-copilot repository](https://github.com/github/awesome-copilot) for example skills shared by the community. |
| 163 | + |
| 164 | +## Related content |
| 165 | + |
| 166 | ++ [Get started with GitHub Copilot agent mode](copilot-agent-mode.md) |
| 167 | ++ [Use custom agents in GitHub Copilot](copilot-specialized-agents.md) |
| 168 | ++ [Customize chat responses and set context](copilot-chat-context.md) |
| 169 | ++ [Use MCP servers](mcp-servers.md) |
0 commit comments