SKILL.md file with optional scripts/ and references/ subdirectories.
Directory Structure
The SKILL.md File
TheSKILL.md file is the heart of a skill. It contains YAML frontmatter with metadata, followed by markdown instructions.
Required Fields
- name: Must be lowercase, alphanumeric with hyphens only (max 64 characters)
- description: Brief summary shown in the agent’s system prompt (max 1024 characters)
Optional Fields
- license: License string. Use an SPDX identifier like
MITorApache-2.0. - metadata: Dictionary of custom fields (version, author, tags).
- compatibility: Environment requirements string (max 500 characters).
- allowed-tools: List of tool names the skill declares it may use.
Full Example
Adding Scripts
Scripts are executable files the agent can run. They must have a shebang line.Python Script Example
Createscripts/check_style.py:
Shell Script Example
Createscripts/lint.sh:
Scripts are executed with the skill directory as the working directory. The agent can pass arguments when executing scripts.
Adding References
References are documentation files the agent can load on demand.Example Reference
Createreferences/style-guide.md:
Validation Rules
Skills are validated when loaded. Here are the rules:Name Requirements
- Maximum 64 characters
- Lowercase letters, numbers, and hyphens only
- Cannot start or end with a hyphen
- No consecutive hyphens (
--) - Must match the directory name
Field Limits
Allowed Fields
Frontmatter may only containname, description, license, compatibility, allowed-tools, and metadata. Any other top-level field fails validation. Put custom fields under metadata.
Licenses
Any string is accepted forlicense. Use an SPDX identifier like MIT or Apache-2.0.