Skip to main content

Directory Structure

Each skill is a folder with a SKILL.md file and optional scripts/, references/, and assets/ directories:

SKILL.md Format

SKILL.md uses YAML frontmatter for metadata followed by Markdown instructions:

Frontmatter Fields

Name Rules

  • Must be kebab-case (lowercase letters, digits, hyphens only)
  • Cannot start or end with a hyphen
  • Cannot contain consecutive hyphens (--)
  • Max 64 characters
  • Must match the folder name

Description Rules

  • Must be a non-empty string, max 1024 characters
  • Must not contain XML bracket characters (< or >)
  • Should describe what the skill does and when to use it

Instructions Body

The Markdown body after the frontmatter is the instructions — this is what the agent reads when it calls get_skill_instructions(). Write it as if you’re briefing a colleague:
  • Explain when and how to apply the skill
  • Reference available scripts and references by filename
  • Be specific about expected outputs and quality standards
Keep instructions focused. The agent loads them on demand, so concise and actionable guidance works better than lengthy explanations.

Scripts

Place executable files in scripts/. Agents can read script content or execute them:
Scripts run with the skill directory as the working directory. You can pass arguments and set a timeout:
Scripts execute on the host machine. Only include scripts you trust. The timeout parameter (default: 30s) prevents runaway processes.

References

Place documentation files in references/. Agents read them on demand:
References are read-only documents — they are never executed.

Assets

Place supporting files like templates, fonts, and icons in assets/. Agents read them on demand:
Assets are read-only supporting files that complement the skill’s instructions and scripts.

Loading from a Directory

Point LocalSkills at a parent directory containing one or more skill folders:

Inline Skills

For simple skills without files, use InlineSkills: