What is a SKILL.md file?
An Agent Skill is a folder of instructions an AI agent can load when a task calls for it. The folder holds one required file, SKILL.md. It starts with YAML frontmatter between two --- lines, then Markdown instructions. Agents read only the name and description at startup, and load the rest when they decide the skill fits the task.
The frontmatter fields
| Field | Required | Rule in the spec |
|---|---|---|
name | Yes | 1-64 characters. Lowercase letters, digits and hyphens. No hyphen at the start or end, no two in a row. Matches the folder name. |
description | Yes | 1-1024 characters. Says what the skill does and when to use it. |
license | No | A license name or the name of a bundled license file. |
compatibility | No | 1-500 characters. Environment needs, such as a product or system packages. |
metadata | No | A map from string keys to string values. Quote numbers, for example version: "1.0". |
allowed-tools | No | A space-separated string of pre-approved tools. Experimental. |
A multiline description
A long description can use a YAML block scalar. With > the lines are joined with spaces; with | the line breaks are kept. Either way the 1024-character limit applies to the text YAML reads, which this tool counts and shows under the results.
Where Claude Code differs
Claude Code reads the same file but is looser than the spec. The validator shows these as Claude Code notes, separate from spec errors:
nameanddescriptionare optional. Without a name it uses the folder name; without a description it uses the first non-empty line of the body.- It adds fields such as
when_to_use,disable-model-invocation,user-invocable,argument-hint,modelandpaths. claude.ai skill uploads and the Skills API reject them, so they are spec errors here. allowed-toolsmay also be a YAML list or a comma-separated string.- It cuts
descriptionpluswhen_to_useat 1,536 characters in its skill listing. - If the frontmatter is not valid YAML, the skill still loads, with no fields set.
Sources
- Agent Skills specification, agentskills.io, checked 2026-11-20.
- Extend Claude with skills, Claude Code docs, checked 2026-11-20.