Understanding Agent Skills
Agent Skills are a practical way to package instructions, scripts, and supporting files into a reusable capability. In this post, we use a Copilot agent skill as an example and walk through the file structure, the SKILL.md format, and when to use skills instead of custom instructions.
What Is an Agent Skill
An agent skill is a folder of reusable guidance that an AI agent can load when a task matches the skill’s purpose. Instead of repeating the same steps in every conversation, you can capture the workflow once and let the agent reuse it on demand.
The main benefit is portability. A well-structured skill can work across different Copilot surfaces and other skill-compatible agents, so the same workflow does not have to be rewritten for every tool.
Skills vs Custom Instructions
Agent skills and custom instructions solve different problems.
Custom instructions are best for stable coding preferences, project conventions, and always-on rules. Agent skills are better for task-specific capabilities such as debugging, testing, deployment, or generating reports.
Use a skill when you need:
- A repeatable workflow with multiple steps
- Scripts, templates, or example files alongside instructions
- A capability that should load only when relevant
- A reusable package that can travel between agents
Use custom instructions when you need:
- Language or framework conventions
- Team-wide coding style rules
- Persistent project preferences that should always apply
Skill File Structure
A skill is stored in a directory that contains a SKILL.md file. For a project skill, the common layout looks like this:
1 | extension-root/ |
The important rule is that the directory name must match the name field inside SKILL.md. If the folder is my-skill, then the frontmatter name must also be my-skill.
When a skill is contributed by an extension, the structure is similar but the path is registered from package.json:
1 | extension-root/ |
1 | { |
SKILL.md Anatomy
SKILL.md has two parts: YAML frontmatter at the top and the instruction body below it.
The frontmatter is where you define metadata that helps the agent discover and load the skill:
1 | --- |
The most important fields are:
name- unique skill identifier, using lowercase letters, numbers, and hyphens onlydescription- what the skill does and when it should be loadedargument-hint- optional hint shown when the skill is used as a slash commanduser-invocable- whether the skill appears in the chat menudisable-model-invocation- whether the model can load it automaticallycontext- whether the skill runs inline or in a forked context
The body of the file should describe the workflow clearly and specifically. A good skill usually includes:
- What the skill helps accomplish
- When to use it
- Step-by-step instructions
- Expected input and output
- Links to any helper scripts or example files
A More Realistic Example
Here is a practical example of a skill for explaining code clearly and consistently:
1 | code-explainer/ |
1 | --- |
This layout makes the skill easier to understand because the main instructions stay in SKILL.md, while supporting material is organized into predictable folders.
Practical Guidance
If you are designing a skill for your own workflow, keep it narrow. A skill works best when it solves one recognizable task well instead of trying to become a catch-all handbook.
I also recommend writing the description as if it were a search query. The better the description matches the user’s intent, the more reliably the agent can decide when to load the skill.
Recommended Skills
Conclusion
Agent skills are a clean way to turn repeated AI workflows into reusable capabilities. For Copilot agent skill work, the key pieces are the directory structure, the SKILL.md frontmatter, and clear instructions in the body. Once those are in place, the same skill can be reused across tasks without repeating the setup every time.