You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Restore 'Copilot' and 'AI agent' terminology to match
the original doc's conventions. Keep new substantive content
(Writing High-Impact Skills, Gotchas, expanded examples).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: instructions/agent-skills.instructions.md
+27-28Lines changed: 27 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,18 @@
1
1
---
2
-
description: 'Guidelines for creating high-quality Agent Skills'
2
+
description: 'Guidelines for creating high-quality Agent Skills for GitHub Copilot'
3
3
applyTo: '**/skills/**/SKILL.md'
4
4
---
5
5
6
6
# Agent Skills File Guidelines
7
7
8
-
Instructions for creating effective and portable Agent Skills that enhance AI agents with specialized capabilities, workflows, and bundled resources.
8
+
Instructions for creating effective and portable Agent Skills that enhance GitHub Copilot with specialized capabilities, workflows, and bundled resources.
9
9
10
10
## What Are Agent Skills?
11
11
12
-
Agent Skills are self-contained folders with instructions and bundled resources that teach agents specialized capabilities. Unlike custom instructions (which define coding standards), skills enable task-specific workflows that can include scripts, examples, templates, and reference data.
12
+
Agent Skills are self-contained folders with instructions and bundled resources that teach AI agents specialized capabilities. Unlike custom instructions (which define coding standards), skills enable task-specific workflows that can include scripts, examples, templates, and reference data.
13
13
14
14
Key characteristics:
15
-
-**Portable**: Works across VS Code, Copilot CLI, Copilot coding agent, and other Agent Skills-compatible tools
15
+
-**Portable**: Works across VS Code, Copilot CLI, and Copilot coding agent
16
16
-**Progressive loading**: Only loaded when relevant to the user's request
17
17
-**Resource-bundled**: Can include scripts, templates, examples alongside instructions
18
18
-**On-demand**: Activated automatically based on prompt relevance
@@ -23,7 +23,6 @@ Skills are stored in specific locations:
23
23
24
24
| Location | Scope | Recommendation |
25
25
|----------|-------|----------------|
26
-
|`skills/<skill-name>/`| Repository resource collection | For community/curated skill repositories |
27
26
|`.github/skills/<skill-name>/`| Project/repository | Recommended for project skills |
28
27
|`.claude/skills/<skill-name>/`| Project/repository | Legacy, for backward compatibility |
29
28
|`~/.github/skills/<skill-name>/`| Personal (user-wide) | Recommended for personal skills |
@@ -51,7 +50,7 @@ license: Complete terms in LICENSE.txt
51
50
52
51
### Description Best Practices
53
52
54
-
**CRITICAL**: The `description` field is the PRIMARY mechanism for automatic skill discovery. The agent reads ONLY the `name` and `description` to decide whether to load a skill. If your description is vague, the skill will never be activated.
53
+
**CRITICAL**: The `description` field is the PRIMARY mechanism for automatic skill discovery. Copilot reads ONLY the `name` and `description` to decide whether to load a skill. If your description is vague, the skill will never be activated.
- No specific triggers (when should the agent load this?)
71
+
- No specific triggers (when should Copilot load this?)
73
72
- No keywords (what user prompts would match?)
74
73
- No capabilities (what can it actually do?)
75
74
76
75
### Body Content
77
76
78
-
The body contains detailed instructions that the agent loads AFTER the skill is activated. Recommended sections:
77
+
The body contains detailed instructions that Copilot loads AFTER the skill is activated. Recommended sections:
79
78
80
79
| Section | Purpose |
81
80
|---------|---------|
@@ -95,7 +94,7 @@ For content quality principles (what to include and what to leave out), see [Wri
95
94
96
95
**`# Title`** — One sentence stating what the skill enables. Avoid generic phrasing; be specific about the domain.
97
96
98
-
**`## When to Use This Skill`** — A bullet list of concrete scenarios that reinforce the description triggers. This helps the agent confirm it loaded the right skill.
97
+
**`## When to Use This Skill`** — A bullet list of concrete scenarios that reinforce the description triggers. This helps Copilot confirm it loaded the right skill.
99
98
100
99
```markdown
101
100
## When to Use This Skill
@@ -105,7 +104,7 @@ For content quality principles (what to include and what to leave out), see [Wri
105
104
- User wants to debug frontend behavior with browser console logs
106
105
```
107
106
108
-
**`## Prerequisites`** — Only include if the skill requires tools, services, or configuration that the agent cannot assume are available. List exact install commands.
107
+
**`## Prerequisites`** — Only include if the skill requires tools, services, or configuration that Copilot cannot assume are available. List exact install commands.
109
108
110
109
```markdown
111
110
## Prerequisites
@@ -135,7 +134,7 @@ For content quality principles (what to include and what to leave out), see [Wri
135
134
-**Never** call `billing.charge()` without checking `user.hasPaymentMethod` first —
136
135
the SDK throws an unrecoverable error instead of returning a failure.
137
136
- The `currency` field expects ISO 4217 codes, not display names.
138
-
The agent often writes "dollars" instead of "USD".
137
+
Copilot often writes "dollars" instead of "USD".
139
138
```
140
139
141
140
**`## Troubleshooting`** — Reactive fixes for known issues, presented as a table of symptom → solution pairs. Each row should be self-contained and actionable.
@@ -154,16 +153,16 @@ For content quality principles (what to include and what to leave out), see [Wri
154
153
155
154
## Bundling Resources
156
155
157
-
Skills can include additional files that the agent accesses on-demand:
156
+
Skills can include additional files that Copilot accesses on-demand:
158
157
159
158
### Supported Resource Types
160
159
161
160
| Folder | Purpose | Loaded into Context? | Example Files |
|`scripts/`| Executable automation that performs specific operations | When executed |`helper.py`, `validate.sh`, `build.ts`|
164
-
|`references/`| Documentation the agent reads to inform decisions | Yes, when referenced |`api_reference.md`, `schema.md`, `workflow_guide.md`|
165
-
|`assets/`|**Static files used AS-IS** in output (not modified by the agent) | No |`logo.png`, `brand-template.pptx`, `custom-font.ttf`|
166
-
|`templates/`|**Starter code/scaffolds that the agent MODIFIES** and builds upon | Yes, when referenced |`viewer.html` (insert algorithm), `hello-world/` (extend) |
163
+
|`references/`| Documentation the AI agent reads to inform decisions | Yes, when referenced |`api_reference.md`, `schema.md`, `workflow_guide.md`|
164
+
|`assets/`|**Static files used AS-IS** in output (not modified by the AI agent) | No |`logo.png`, `brand-template.pptx`, `custom-font.ttf`|
165
+
|`templates/`|**Starter code/scaffolds that the AI agent MODIFIES** and builds upon | Yes, when referenced |`viewer.html` (insert algorithm), `hello-world/` (extend) |
167
166
168
167
### Directory Structure Example
169
168
@@ -195,12 +194,12 @@ Skills can include additional files that the agent accesses on-demand:
195
194
- A `report-template.html` copied as output format
196
195
- A `custom-font.ttf` applied to text rendering
197
196
198
-
**Templates** are starter code/scaffolds that **the agent actively modifies**:
199
-
- A `scaffold.py` where the agent inserts logic
200
-
- A `config.template` where the agent fills in values based on user requirements
201
-
- A `hello-world/` project directory that the agent extends with new features
197
+
**Templates** are starter code/scaffolds that **the AI agent actively modifies**:
198
+
- A `scaffold.py` where the AI agent inserts logic
199
+
- A `config.template` where the AI agent fills in values based on user requirements
200
+
- A `hello-world/` project directory that the AI agent extends with new features
202
201
203
-
**Rule of thumb**: If the agent reads and builds upon the file content → `templates/`. If the file is used as-is in output → `assets/`.
202
+
**Rule of thumb**: If the AI agent reads and builds upon the file content → `templates/`. If the file is used as-is in output → `assets/`.
204
203
205
204
### Referencing Resources in SKILL.md
206
205
@@ -224,7 +223,7 @@ Skills use three-level loading for efficiency:
224
223
|-------|------------|------|
225
224
| 1. Discovery |`name` and `description` only | Always (lightweight metadata) |
226
225
| 2. Instructions | Full `SKILL.md` body | When request matches description |
227
-
| 3. Resources | Scripts, examples, docs | Only when the agent references them |
226
+
| 3. Resources | Scripts, examples, docs | Only when Copilot references them |
228
227
229
228
This means:
230
229
- Install many skills without consuming context
@@ -279,21 +278,21 @@ Scripts enable evolution: even simple operations benefit from being implemented
279
278
280
279
## Writing High-Impact Skills
281
280
282
-
### Focus on What the Agent Doesn't Know
281
+
### Focus on What Copilot Doesn't Know
283
282
284
-
Do not include information the agent already knows from its training data — standard language syntax, common library usage, or well-documented API behavior. Every line in a skill should teach something the agent would otherwise get wrong or miss entirely. If the information is on the first page of official docs, leave it out. Focus on internal conventions, non-obvious defaults, version-specific quirks, and domain-specific workflows that change the agent's behavior.
283
+
Do not include information Copilot already knows from its training data — standard language syntax, common library usage, or well-documented API behavior. Every line in a skill should teach something Copilot would otherwise get wrong or miss entirely. If the information is on the first page of official docs, leave it out. Focus on internal conventions, non-obvious defaults, version-specific quirks, and domain-specific workflows that change Copilot's behavior.
285
284
286
285
### Context Budget Awareness
287
286
288
-
All skill descriptions share a limited portion of the available context window during discovery. Your description competes with every other installed skill for the agent's attention. Keep descriptions concise and keyword-dense — aim for the shortest text that still communicates WHAT, WHEN, and relevant KEYWORDS. Verbose descriptions don't just waste your own budget; they reduce visibility for every other skill in the system.
287
+
All skill descriptions share a limited portion of the available context window during discovery. Your description competes with every other installed skill for Copilot's attention. Keep descriptions concise and keyword-dense — aim for the shortest text that still communicates WHAT, WHEN, and relevant KEYWORDS. Verbose descriptions don't just waste your own budget; they reduce visibility for every other skill in the system.
289
288
290
289
### Gotchas Are Your Highest-Signal Content
291
290
292
-
The `## Gotchas` section is consistently the most valuable part of any skill — proactive warnings that prevent mistakes before they happen. This is distinct from `## Troubleshooting`, which provides reactive fixes after something goes wrong. Treat gotchas as a living section: every time the agent produces a wrong result, add a gotcha. Bold the key constraint, then explain why (e.g., "**Never** call `X()` without checking `Y` first — the SDK throws an unrecoverable error").
291
+
The `## Gotchas` section is consistently the most valuable part of any skill — proactive warnings that prevent mistakes before they happen. This is distinct from `## Troubleshooting`, which provides reactive fixes after something goes wrong. Treat gotchas as a living section: every time Copilot produces a wrong result, add a gotcha. Bold the key constraint, then explain why (e.g., "**Never** call `X()` without checking `Y` first — the SDK throws an unrecoverable error").
293
292
294
293
### Prefer Flexible Guidelines Over Rigid Steps
295
294
296
-
Use numbered steps only for concrete, repeatable procedures (build, deploy, environment setup) where the sequence genuinely matters. For open-ended tasks (debugging, refactoring, code review), provide decision criteria and reference information instead — the agent needs flexibility to adapt to the user's specific situation.
295
+
Use numbered steps only for concrete, repeatable procedures (build, deploy, environment setup) where the sequence genuinely matters. For open-ended tasks (debugging, refactoring, code review), provide decision criteria and reference information instead — Copilot needs flexibility to adapt to the user's specific situation.
297
296
298
297
```markdown
299
298
# ❌ Too rigid
@@ -310,7 +309,7 @@ When fixing error handling in API handlers:
310
309
311
310
### Use Progressive Disclosure for Large Skills
312
311
313
-
If your SKILL.md exceeds ~200 lines, consider splitting detailed content into subdirectories. This reduces context consumption — the agent loads only the core instructions initially and pulls reference material on demand.
312
+
If your SKILL.md exceeds ~200 lines, consider splitting detailed content into subdirectories. This reduces context consumption — Copilot loads only the core instructions initially and pulls reference material on demand.
314
313
315
314
```markdown
316
315
## Reference Files
@@ -359,7 +358,7 @@ Before publishing a skill:
359
358
-[ ]`name` is lowercase with hyphens, ≤64 characters
360
359
-[ ]`description` clearly states **WHAT** it does, **WHEN** to use it, and relevant **KEYWORDS**
361
360
-[ ]`description` is concise and keyword-dense (respects context budget)
362
-
-[ ] Body focuses on information the agent wouldn't know from training data
361
+
-[ ] Body focuses on information Copilot wouldn't know from training data
363
362
-[ ] Body includes when to use, prerequisites (if applicable), and core instructions
364
363
-[ ]`## Gotchas` section present if skill involves non-obvious behavior, API quirks, or common traps
365
364
-[ ] SKILL.md body under 500 lines (consider splitting into `references/` at ~200 lines; 500 is the hard maximum)
0 commit comments