SKILL.md reference

SKILL.md reference: every field, with its real constraints

A skill is a directory with a SKILL.md file at its root. This page lists what that file may contain, quoted from the specification rather than inferred from examples, so you can check a skill against it line by line.

Frontmatter fields

Two fields are required and the rest are optional. The constraints below are the ones a validator enforces, which is why skills fail for reasons that look cosmetic, such as a capital letter in a name.

FieldRequiredConstraint
nameRequired1 to 64 characters. Lowercase a-z, 0-9 and hyphens only. No leading or trailing hyphen, no consecutive hyphens. Must match the parent directory name.
descriptionRequired1 to 1024 characters. Must say what the skill does and when to use it, with keywords an agent can match against a task.
licenseOptionalA license name, or the name of a bundled license file. Recommended to keep it short.
compatibilityOptionalUp to 500 characters. Only include it when the skill has real environment requirements, such as a target product, system packages or network access.
metadataOptionalA map of string keys to string values for anything the spec does not define. Use distinctive key names to avoid collisions.
allowed-tools ExperimentalOptionalA space separated string of pre-approved tools, for example Bash(git:*) Read. Support varies between agent implementations.

Skills

Directory layout

Only SKILL.md is required. The other directories are conventions, and they exist so that big material can stay out of the agent's context until it is needed.

PathRequiredPurpose
SKILL.mdRequiredFrontmatter plus the instructions themselves.
scripts/OptionalExecutable code the agent can run.
references/OptionalDocumentation loaded on demand, not up front.
assets/OptionalTemplates, images, data files.

Progressive disclosure and the context budget

Skills load in three stages. This is the part that decides whether a large skill library is usable, because the first stage is paid for every installed skill on every session.

StageCostLoadedContains
Metadataaround 100 tokensLoaded at startup for every installed skillname and description only
Instructionsunder 5,000 tokens recommendedLoaded when the skill is activatedthe whole SKILL.md body
Resourcesas neededLoaded only when the task requires themfiles under scripts/, references/ and assets/

Rules worth memorising

  • Keep SKILL.md under 500 lines and move detail into references/.
  • Keep file references one level deep from SKILL.md.
  • The name must match the directory name, so renaming a skill means renaming both.
  • Most skills do not need compatibility. Add it only when the environment really matters.

Validate before you publish

The reference library checks frontmatter and naming conventions, which catches the errors that otherwise show up as a skill that silently never loads.

skills-ref validate ./my-skill

skills-ref

Sources

All constraints on this page come from the published specification, read on the date shown. Check the source before relying on a field in production.

Agent Skills specification Last reviewed: 2026-08-05