Agent Skills¶
Write one, test it, fix it¶
Session M3-05 | 3 hours
Agenda¶
| Segment | Time |
|---|---|
| What a skill is | 10 min |
| Skill, agent, or MCP server? | 15 min |
| Writing a good skill | 10 min |
Demo: install and use skill-creator |
12 min |
| Pros, cons, and tips | 8 min |
| Lab handoff | 5 min |
What a skill is¶
A folder with a SKILL.md file. Copilot loads it when your request matches its description.
.github/skills/release-notes/
├── SKILL.md # required: frontmatter + instructions
├── references/ # optional: read when needed
└── scripts/ # optional: run, not read
- Project skills:
.github/skills,.claude/skills,.agents/skills - Personal skills:
~/.copilot/skills,~/.agents/skills
An open standard. Works in the CLI, the Copilot app, cloud agent, and IDE agent mode.
How Copilot uses one¶
- You send a request.
- Copilot compares it with each skill's description.
- On a match, it loads
SKILL.mdinto context. - It follows the instructions and reads other files in the folder only when a step needs them.
Or call one yourself: Use the /release-notes skill for this.
The description is the trigger. Get it wrong and nothing else matters.
Progressive disclosure¶
Skills load in three levels, so unused skills cost almost no context.
| Level | Loads | When |
|---|---|---|
| 1 | name and description |
Always, for every skill |
| 2 | SKILL.md body |
The description matches |
| 3 | references/, scripts/ |
A step needs them |
Install fifty skills and Copilot carries fifty descriptions. That is why descriptions must be short and precise, and why long content goes in references/.
Install a skill¶
npx skills add anthropics/skills --list
npx skills add anthropics/skills --skill skill-creator -a github-copilot -g
--listshows what a repo offers. It installs nothing.-ginstalls for you. Without it, the skill goes in the project.- Needs Node.js 22 or later.
- A skill is code you didn't write. Read it before you install it.
Global or project install?¶
Personal (-g) |
Project (no -g) |
|
|---|---|---|
| Location | ~/.copilot/skills, ~/.agents/skills |
.github/skills, .claude/skills, .agents/skills |
| Available | In every repo on your machine | Only in this repo |
| Shared | No. Only you have it | Yes. Commit it, and the team gets it |
| Versioned | No. It changes when you update it | Yes. Reviewed in a PR, pinned to a commit |
| Setup per teammate | Everyone installs it themselves | None |
| Risk | Silent drift. A skill you forgot loads everywhere | Needs review. It runs for everyone who clones |
Rule of thumb: personal tools like skill-creator go global. Skills that encode how this team works, like release-notes, go in the repo.
Skill or something else?¶
| Need | Use |
|---|---|
| Rule that always applies | Repository instructions |
| One saved prompt you run by hand | Prompt file |
| A workflow Copilot picks up when relevant | Skill |
| A persona with its own tools and scope | Custom agent |
| Live access to a system | MCP server |
Rule of thumb: instructions are always on. Skills load on demand.
Skill vs custom agent vs MCP server¶
| Skill | Custom agent | MCP server | |
|---|---|---|---|
| Gives Copilot | Know-how | A role | Reach |
| Is | Markdown, plus optional files | Markdown with tools and model | A running server |
| Loads | On demand | When picked or delegated | When configured |
| Risk | Wrong trigger | Too many tools | Credentials, data |
They combine. An agent can use skills. A skill can teach Copilot to use an MCP server well.
Example: grill-me¶
A skill that interviews you about a plan.
- Reads your file first, so it doesn't ask what you already wrote.
- One question at a time, with a recommended answer.
- Keeps asking until no gray area is left, not after a set number of questions.
- Ends with decisions and open questions.
Not every skill makes a file. Some change how Copilot works with you.
More examples¶
| Skill | What it does |
|---|---|
release-notes |
Writes changelog entries in your format. |
grill-me |
Interviews you before you plan. |
skill-creator |
Helps you write and test skills. |
pdf, docx, xlsx |
Bundle scripts that read and write files. |
Frontmatter¶
---
name: release-notes
description: Write release notes or a CHANGELOG entry from merged PRs.
Use when the user asks for release notes, a changelog entry, or
"what shipped". Don't use for commit messages or PR descriptions.
---
name: lowercase with hyphens, same as the directorydescription: what it does and when to use it- Optional:
allowed-tools,argument-hint,user-invocable,disable-model-invocation,license. Check the current docs
Write the description¶
Weak: Helps with releases.
Better: says what, when, and when not.
- List the words people actually use.
- Add a "Don't use for…" line next to look-alike tasks.
- Be a little pushy. Skills tend to undertrigger.
Write the body¶
- Use imperative steps: "Read the top two entries."
- Explain why a rule matters. The model generalizes better from reasons than from shouting.
- Show a short example of the output.
- Say what to do when input is missing: ask.
- Keep
SKILL.mdshort. Move long templates toreferences/.
Bundle files¶
SKILL.md → "Group PRs using references/format.md"
references/ → loaded only when the step needs it
scripts/ → run for deterministic work
Scripts need allowed-tools to run without a prompt. Don't pre-approve shell unless you've read every script and trust the source.
Demo: skill-creator¶
skill-creator¶
A skill that helps you write skills.
- Interviews you: purpose, triggers, output, edge cases.
- Drafts
SKILL.mdand bundled files. - Proposes evals: prompts, expected outputs, and expectations.
- Revises from scored runs and your feedback.
It proposes the evals. You review them, then run and score them in Copilot CLI. Skip the description optimizer, which needs the claude CLI.
Pros¶
- Repeatable: same workflow every time.
- On demand: loaded only when relevant, unlike always-on instructions.
- Shareable: commit it, review it, version it.
- Portable: an open standard across Copilot surfaces.
- Bundles files: templates, references, scripts.
Cons¶
- Triggering is probabilistic. It can miss or misfire.
- Failures are quiet. No error when it doesn't load.
- Skills collide. Overlapping descriptions confuse selection.
- They go stale like any doc.
- Third-party skills are code. Scripts can run.
- Support differs by surface. Check yours.
Tips¶
- Start from a real task you've done by hand.
- Test three prompts: should trigger, shouldn't, ambiguous.
- Run each twice. Variance is normal.
- Fix one thing at a time, then rerun.
- If it's one always-on rule, write instructions instead.
- Delete skills nobody uses.
Lab handoff¶
- Run a baseline with no skill.
- Install
skill-creatorwithnpx skills add. - Create
release-notesandevals/evals.json. Check the three loading levels. - Run and score all four eval cases live.
- Revise toward technical outcomes, rerun, and compare with
baseline.md. - Build
grill-meand interview yourself aboutidea.md. - Decide: skill, custom agent, or MCP server?
- Review one third-party skill.
Submit both skills, evals, scored runs, baseline comparisons, and decisions.md.