1
---
2
name: create-skill-sample
3
description: This skill should be used when the user asks to "create a new skill sample", "add a skill", "scaffold a new skill", "contribute a skill", "create a GitHub Copilot skill", "build a custom skill", or needs to create a new GitHub Copilot custom skill sample with proper folder structure, SKILL.md, README, and sample.json metadata inside the skills folder. Do NOT use this skill for simple prompt samples or agent instructions.
4
---
5
6
# Create a New GitHub Copilot Skill Sample
7
8
This skill guides creating new custom skill samples for the pnp/copilot-prompts repository. These samples live inside `samples/skills/` and represent reusable instruction files (`SKILL.md`) that teach GitHub Copilot how to perform specific, repeatable tasks.
9
10
## Before Starting
11
12
**Critical**: Always ask the user for the following information before scaffolding:
13
14
1. **Skill name** — a short, descriptive name for the skill (e.g., "Code Review for C#", "API Documentation Generator", "Unit Test Scaffolder")
15
2. **Skill purpose** — a clear description of what the skill does. What task does it teach GitHub Copilot to perform?
16
3. **Trigger phrases** — 3–5 example phrases a user might say to activate the skill (e.g., "review my C# code", "generate API docs")
17
4. **Inputs needed** — what information the skill needs from the user before it can proceed (e.g., a source file, a framework version, a language)
18
5. **Output format** — what the skill produces (e.g., a Markdown report, generated code files, a checklist)
19
6. **Steps** — the high-level steps the skill follows (3–7 steps). Each step should be a discrete action.
20
7. **Rules** — any hard constraints the skill must always follow (e.g., "never modify source files directly")
21
8. **Author name** — the contributor's full name
22
9. **Author GitHub username** — the contributor's GitHub handle
23
24
If the user doesn't provide all details upfront, ask for the missing ones before proceeding.
25
26
## Sample Directory Structure
27
28
Create the sample in `samples/skills/{skill-name}/`:
29
30
```
31
samples/skills/{skill-name}/
32
├── SKILL.md # The skill definition file (core contribution)
33
├── README.md # Documentation and usage instructions
34
├── assets/
35
│ └── sample.json # Metadata for the M365 Solution Gallery
36
```
37
38
**Folder naming rules:**
39
- Use lowercase and hyphens only (e.g., `code-review-csharp`, `api-docs-generator`, `unit-test-scaffolder`)
40
- Do NOT use periods/dots in the folder name
41
- Keep it concise but descriptive — 2–5 words
42
- Do NOT include prefixes like `m365-` or `github-` — skill folders use plain descriptive names
43
44
## Step 1: Create SKILL.md
45
46
Create `samples/skills/{skill-name}/SKILL.md` following the schema defined in [SKILL-SCHEMA.md](../../../SKILL-SCHEMA.md).
47
48
The file must have:
49
50
1. **YAML frontmatter** with `name` and `description` fields
51
2. **Title** — `# <Skill Title>`
52
3. **Before Starting** — inputs the skill needs from the user
53
4. **Output Structure** — what the skill produces (template, format, file structure)
54
5. **Steps** — `## Step N: <Action>` sections with detailed instructions
55
6. **Rules** — non-negotiable constraints
56
7. **Examples** (recommended) — at least one worked input → output example
57
8. **Validation Checklist** (recommended) — self-verification checks
58
9. **References** (optional) — links to documentation or standards
59
60
```markdown
61
---
62
name: {skill-name}
63
description: This skill should be used when the user asks to "{trigger phrase 1}", "{trigger phrase 2}", "{trigger phrase 3}", or needs to {general description of when to use}.
64
---
65
66
# {Skill Title}
67
68
{One-paragraph description of what this skill does.}
69
70
## Before Starting
71
72
**Critical**: Always gather the following before proceeding:
73
74
1. **{Input 1 name}** — {description}
75
2. **{Input 2 name}** — {description}
76
3. ...
77
78
If the user doesn't provide all details upfront, ask for the missing ones before proceeding.
79
80
## Output Structure
81
82
{Define the format/template of what the skill produces.}
83
84
## Step 1: {First Action}
85
86
{Detailed instructions for step 1.}
87
88
## Step 2: {Second Action}
89
90
{Detailed instructions for step 2.}
91
92
...
93
94
## Rules
95
96
- {Rule 1}
97
- {Rule 2}
98
- ...
99
100
## Examples
101
102
### Example: {Scenario name}
103
104
**Input:**
105
{example input}
106
107
**Output:**
108
{example output}
109
110
## Validation Checklist
111
112
Before finalizing, verify:
113
- [ ] {Check 1}
114
- [ ] {Check 2}
115
- ...
116
117
## References
118
119
- [{Reference name}]({url})
120
```
121
122
**SKILL.md rules:**
123
- **NEVER rephrase, rewrite, or modify the user's skill instructions.** Copy the steps and rules exactly as provided by the user — word for word, character for character.
124
- The `name` field in frontmatter must match the folder name exactly
125
- The `description` must include specific trigger phrases so Copilot can match user requests
126
- Include at least one worked example
127
- Keep steps atomic — one action per step
128
- Rules should prevent common mistakes
129
130
## Step 2: Create README.md
131
132
Create `samples/skills/{skill-name}/README.md` using this structure:
133
134
```markdown
135
# {Emoji} {Skill Title} for GitHub Copilot
136
137

138
139
## Summary
140
141
{Short summary of what this skill does and why it's useful.}
142
143
## Skill 💡
144
145
The full skill definition is in [`SKILL.md`](./SKILL.md). To use it, copy the `SKILL.md` file into your repository's `.github/skills/{skill-name}/` folder.
146
147
### Trigger Phrases
148
149
Say any of these to GitHub Copilot to activate the skill:
150
151
- *"{Trigger phrase 1}"*
152
- *"{Trigger phrase 2}"*
153
- *"{Trigger phrase 3}"*
154
155
## Description ℹ️
156
157
{A more detailed description of how the skill works — list the steps it follows and what it produces.}
158
159
## Contributors 👨💻
160
161
[{Author Name}](https://github.com/{github-username})
162
163
## Version history
164
165
Version|Date|Comments
166
-------|----|--------
167
1.0|{Month DD, YYYY}|Initial release
168
169
## Instructions 📝
170
171
1. Copy the [`SKILL.md`](./SKILL.md) file into your repository at `.github/skills/{skill-name}/SKILL.md`
172
2. Open the relevant file(s) in VS Code
173
3. Open GitHub Copilot Chat
174
4. Say: *"{Primary trigger phrase}"*
175
5. Copilot will ask for any missing details and then perform the task
176
177
### Customization 🚀
178
179
{Suggestions for how the user can modify or extend the skill for their own needs.}
180
181
## Prerequisites
182
183
* [GitHub Copilot](https://copilot.github.com/)
184
* [Visual Studio Code](https://code.visualstudio.com/)
185
186
## Help
187
188
We do not support samples, but this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues.
189
190
You can try looking at [issues related to this sample](https://github.com/pnp/copilot-prompts/issues?q=label%3A%22sample%3A%20{skill-name}%22) to see if anybody else is having the same issues.
191
192
If you encounter any issues using this sample, [create a new issue](https://github.com/pnp/copilot-prompts/issues/new).
193
194
Finally, if you have an idea for improvement, [make a suggestion](https://github.com/pnp/copilot-prompts/issues/new).
195
196
## Disclaimer
197
198
**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**
199
200

201
```
202
203
**README rules:**
204
- The file MUST be named `README.md` (capital letters)
205
- Always include a screenshot reference at the top (use `./assets/demo.png` as placeholder)
206
- The tracking image at the bottom MUST follow the pattern: `https://m365-visitor-stats.azurewebsites.net/copilot-prompts/copilotprompts-skill-{skill-name}`
207
- Include the Help and Disclaimer sections exactly as shown
208
- Use the current date for the version history in `{Month DD, YYYY}` format
209
- Prerequisites always include GitHub Copilot and VS Code
210
- The Instructions section should explain how to install the SKILL.md file
211
212
## Step 3: Create Metadata (assets/sample.json)
213
214
Create `samples/skills/{skill-name}/assets/sample.json`:
215
216
```json
217
[
218
{
219
"name": "copilotprompts-skill-{skill-name}",
220
"source": "pnp",
221
"title": "{Skill Title} for GitHub Copilot",
222
"shortDescription": "{Short description of what the skill does}",
223
"url": "https://github.com/pnp/copilot-prompts/tree/main/samples/skills/{skill-name}",
224
"downloadUrl": "https://pnp.github.io/download-partial/?url=https://github.com/pnp/copilot-prompts/tree/main/samples/skills/{skill-name}",
225
"longDescription": [
226
"{A longer description of what the skill does and why it's useful. Mention how to install it.}"
227
],
228
"creationDateTime": "{YYYY-MM-DD}",
229
"updateDateTime": "{YYYY-MM-DD}",
230
"products": [
231
"GitHub Copilot"
232
],
233
"metadata": [],
234
"thumbnails": [
235
{
236
"type": "image",
237
"order": 100,
238
"url": "https://github.com/pnp/copilot-prompts/raw/main/samples/skills/{skill-name}/assets/demo.png",
239
"alt": "{Description of the screenshot}"
240
}
241
],
242
"authors": [
243
{
244
"gitHubAccount": "{github-username}",
245
"pictureUrl": "https://github.com/{github-username}.png",
246
"name": "{Author Name}"
247
}
248
],
249
"references": [
250
{
251
"name": "GitHub Copilot",
252
"description": "GitHub Copilot",
253
"url": "https://copilot.github.com/"
254
}
255
]
256
}
257
]
258
```
259
260
**Key metadata rules:**
261
- `name`: Always `copilotprompts-skill-{skill-name}` (matches the tracking image ID)
262
- `products`: Always `["GitHub Copilot"]` for skill samples
263
- `source`: Always `"pnp"`
264
- `url`: Points to `samples/skills/{skill-name}` on GitHub main branch
265
- `downloadUrl`: Uses the pnp partial download service URL
266
- `creationDateTime` and `updateDateTime`: Use `YYYY-MM-DD` format with the current date
267
- `pictureUrl` for authors: Use `https://github.com/{username}.png` as a shortcut
268
269
## Step 4: Remind About Screenshots
270
271
After creating the files, remind the user to:
272
1. Add a screenshot of the skill in action as `assets/demo.png` (or `.gif`)
273
2. Use a resolution of **1920x1080** if possible
274
3. The screenshot should show GitHub Copilot executing the skill and producing output
275
4. At minimum, provide one static `.png` file
276
277
## Validation Checklist
278
279
Before finalizing, verify:
280
- [ ] Folder is inside `samples/skills/` (NOT under `samples/agent-instructions/` or directly under `samples/`)
281
- [ ] Folder name is lowercase with hyphens only, no dots, matches the `name` in SKILL.md frontmatter
282
- [ ] `SKILL.md` exists with valid YAML frontmatter (`name` and `description`)
283
- [ ] `SKILL.md` follows the schema in SKILL-SCHEMA.md (has Before Starting, Output Structure, Steps, Rules)
284
- [ ] `SKILL.md` has at least one worked example
285
- [ ] `README.md` exists with correct capitalization
286
- [ ] `README.md` explains how to install the skill (copy to `.github/skills/`)
287
- [ ] `assets/` folder exists
288
- [ ] `assets/sample.json` exists with valid JSON
289
- [ ] `sample.json` `name` field matches pattern `copilotprompts-skill-{skill-name}`
290
- [ ] `sample.json` `products` is `["GitHub Copilot"]`
291
- [ ] `sample.json` dates are in `YYYY-MM-DD` format
292
- [ ] `sample.json` URLs include the full path `samples/skills/{skill-name}`
293
- [ ] README tracking image URL matches `copilotprompts-skill-{skill-name}`
294
- [ ] README contains Instructions, Help, and Disclaimer sections
295
- [ ] Author information is filled in
296
297
## Key Rules
298
299
- **NEVER rephrase, rewrite, or modify the user's skill logic.** Always copy their steps and rules verbatim into the SKILL.md. The user's exact wording is the contribution.
300
- **This skill is for GitHub Copilot custom skill samples ONLY** — not for simple prompts or agent instructions
301
- Samples MUST go in `samples/skills/{skill-name}/`, never directly under `samples/` or in `agent-instructions/`
302
- Every sample needs exactly: `SKILL.md` + `README.md` + `assets/sample.json`
303
- The core contribution is the **SKILL.md file** — it must follow the schema in SKILL-SCHEMA.md
304
- The `products` field in sample.json is always `["GitHub Copilot"]` (these are GitHub Copilot skills)
305
- Prerequisites always include GitHub Copilot and VS Code
306
- The `sample.json` feeds the [M365 Solution Gallery](https://adoption.microsoft.com/en-us/sample-solution-gallery/) — accuracy matters
307
- Follow existing naming patterns in the `skills` folder for consistency
308