SKILL.md distills the full specification from agentskills.io — directory structure, frontmatter schema, naming rules, progressive disclosure model, and best practices for skill creation. Includes all 8 source pages as reference files for on-demand loading.
3.9 KiB
Documentation Index
Fetch the complete documentation index at: https://agentskills.io/llms.txt Use this file to discover all available pages before exploring further.
Quickstart
Create your first Agent Skill and see it work in VS Code.
In this tutorial, you'll create a skill that gives an agent the capability to roll dice using a random number generator.
Prerequisites
- VS Code with GitHub Copilot
Create the skill
A skill is a folder containing a SKILL.md file. VS Code looks for skills in .agents/skills/ by default. Create .agents/skills/roll-dice/SKILL.md in your project:
---
name: roll-dice
description: Roll dice using a random number generator. Use when asked to roll a die (d6, d20, etc.), roll dice, or generate a random dice roll.
---
To roll a die, use the following command that generates a random number from 1
to the given number of sides:
```bash
echo $((RANDOM % <sides> + 1))
```
```powershell
Get-Random -Minimum 1 -Maximum (<sides> + 1)
```
Replace `<sides>` with the number of sides on the die (e.g., 6 for a standard
die, 20 for a d20).
That's it — one file, under 20 lines. Here's what each part does:
name— A short identifier for the skill. Must match the folder name.description— Tells the agent when to use this skill. This is how the agent decides whether to activate it.- The body — Instructions the agent follows when the skill activates. Here, the agent is instructed to generate a random number using a terminal command, substituting the number of sides from the user's request.
Try it out
- Open your project in VS Code.
- Open the Copilot Chat panel.
- Select Agent mode from the mode dropdown at the bottom of the chat panel.
- Type
/skillsto confirm thatroll-diceappears in the list. If it doesn't, check that the file is at.agents/skills/roll-dice/SKILL.mdrelative to your project root. - Ask: "Roll a d20"
The agent should activate the roll-dice skill. It may ask for permission to run a terminal command — allow it. It will run the command and return a random number between 1 and 20.
How it works
Here's what happened behind the scenes:
-
Discovery — When the chat session started, the agent scanned default skill directories and found your skill. It read only the
nameanddescription, just enough to know when the skill might be relevant. -
Activation — When you asked about rolling dice, the agent matched your question to the skill's description and loaded the full
SKILL.mdbody into context. -
Execution — The agent followed the instructions in the body, adapting the terminal command to the number of sides in your request.
This process uses progressive disclosure to let the agent access many skills without loading all their instructions up front.
Next steps
You've created a working Agent Skill. From here:
- Best practices — How to write skills that are well-scoped and effective.
- Optimizing skill descriptions — Test and improve your skill's description so it activates on the right prompts.
- Specification — The complete format reference for
SKILL.mdfiles. - Example skills — Browse real-world skills on GitHub.