How Skills Work
Skills are markdown documents with a name, description, and body of instructions. At prompt render time, Output builds a summary of available skills and adds it to the system message: The LLM decides which skills are relevant for the task and loads them when nessesary.Providing Skills
There are three ways to give skills to an LLM call in Output: colocated files, frontmatter paths, or inline code.Colocated Files (Auto-Discovery)
Place.md files in a skills/ folder next to your prompt file. Output discovers them automatically, no configuration needed.
name and description:
clarity_guidelines.md
writing_assistant@v1.prompt
Frontmatter Paths (Explicit)
For explicit control over which skills are loaded, list paths in the prompt frontmatter. Paths can point to individual files or directories of.md files, resolved relative to the prompt file’s location:
writing_assistant@v1.prompt
skills: is set in frontmatter, auto-discovery of the colocated skills/ directory is skipped. Only the explicitly listed paths are loaded.
Inline Skills (Code)
Create skills programmatically with theskill() function. This is useful when skill content is dynamic or generated from data:
steps.ts
generateText or Agent:
Skill File Format
Skill files are markdown documents with an optional YAML frontmatter block:| Field | Required | Default | Description |
|---|---|---|---|
name | No | Filename without .md | Identifier the LLM uses with load_skill |
description | No | Same as name | When to use this skill (shown in system message) |
| Body | Yes | - | Full instructions returned by load_skill |
.md) is used as both the name and description. A file named clarity_guidelines.md with no frontmatter would have name: "clarity_guidelines" and description: "clarity_guidelines".
Write good descriptions. They’re what the LLM uses to decide whether to load a skill. “Rules for writing clear, readable technical content” is better than “clarity_guidelines”.
Resolution Priority
Skills are resolved in this order:
- Frontmatter paths: If
skills:is set in the prompt frontmatter, those paths are loaded - Colocated auto-discovery: If no
skills:in frontmatter, theskills/directory next to the prompt file is scanned - Caller-provided skills: Skills passed via code (
skills: [...]ingenerateTextorAgent) are always merged in
skills: in frontmatter disables auto-discovery. Caller-provided skills are always added regardless of which file-based method is used.Disabling Skills
Setskills: [] in the prompt frontmatter to explicitly opt out of auto-discovery:
no_skills_assistant@v1.prompt