Directory structure
A skill is a directory containing at minimum aSKILL.md file:
SKILL.md format
TheSKILL.md file must contain YAML frontmatter followed by Markdown content.
Frontmatter (required)
| Field | Required | Constraints |
|---|---|---|
name | Yes | Max 64 characters. Lowercase letters, numbers, and hyphens only. Must not start or end with a hyphen. |
description | Yes | Max 1024 characters. Non-empty. Describes what the skill does and when to use it. |
license | No | License name or reference to a bundled license file. |
compatibility | No | Max 500 characters. Indicates environment requirements (intended product, system packages, network access, etc.). |
metadata | No | Arbitrary key-value mapping for additional metadata. |
allowed-tools | No | Space-delimited list of pre-approved tools the skill may use. (Experimental) |
name field
The required name field:
- Must be 1-64 characters
- May only contain unicode lowercase alphanumeric characters and hyphens (
a-zand-) - Must not start or end with
- - Must not contain consecutive hyphens (
--) - Must match the parent directory name
description field
The required description field:
- Must be 1-1024 characters
- Should describe both what the skill does and when to use it
- Should include specific keywords that help agents identify relevant tasks
license field
The optional license field:
- Specifies the license applied to the skill
- We recommend keeping it short (either the name of a license or the name of a bundled license file)
compatibility field
The optional compatibility field:
- Must be 1-500 characters if provided
- Should only be included if your skill has specific environment requirements
- Can indicate intended product, required system packages, network access needs, etc.
Most skills do not need the
compatibility field.metadata field
The optional metadata field:
- A map from string keys to string values
- Clients can use this to store additional properties not defined by the Agent Skills spec
- We recommend making your key names reasonably unique to avoid accidental conflicts
allowed-tools field
The optional allowed-tools field:
- A space-delimited list of tools that are pre-approved to run
- Experimental. Support for this field may vary between agent implementations
Body content
The Markdown body after the frontmatter contains the skill instructions. There are no format restrictions. Write whatever helps agents perform the task effectively. Recommended sections:- Step-by-step instructions
- Examples of inputs and outputs
- Common edge cases
SKILL.md content into referenced files.
Optional directories
scripts/
Contains executable code that agents can run. Scripts should:- Be self-contained or clearly document dependencies
- Include helpful error messages
- Handle edge cases gracefully
references/
Contains additional documentation that agents can read when needed:REFERENCE.md- Detailed technical referenceFORMS.md- Form templates or structured data formats- Domain-specific files (
finance.md,legal.md, etc.)
assets/
Contains static resources:- Templates (document templates, configuration templates)
- Images (diagrams, examples)
- Data files (lookup tables, schemas)
Progressive disclosure
Skills should be structured for efficient use of context:- Metadata (~100 tokens): The
nameanddescriptionfields are loaded at startup for all skills - Instructions (< 5000 tokens recommended): The full
SKILL.mdbody is loaded when the skill is activated - Resources (as needed): Files (e.g. those in
scripts/,references/, orassets/) are loaded only when required
SKILL.md under 500 lines. Move detailed reference material to separate files.
File references
When referencing other files in your skill, use relative paths from the skill root:SKILL.md. Avoid deeply nested reference chains.
Validation
Use the skills-ref reference library to validate your skills:SKILL.md frontmatter is valid and follows all naming conventions.