Documentation Index
Fetch the complete documentation index at: https://mintlify.com/openai/skills/llms.txt
Use this file to discover all available pages before exploring further.
SKILL.md is the only required file in any skill. It serves as both the trigger mechanism and the instruction set: the YAML frontmatter tells Codex when to activate the skill, and the Markdown body tells it what to do once activated. Getting these two parts right is the most important design decision in skill authoring.
Frontmatter
The frontmatter block is YAML enclosed in--- delimiters at the top of the file. Only two fields matter to Codex:
name (required)
The skill name. Must match the skill’s directory name exactly. Rules: lowercase letters, digits, and hyphens only; maximum 64 characters; no leading or trailing hyphens.
description (required)
The primary triggering mechanism. Codex reads the description of every installed skill on every turn to decide which skills are relevant. A weak description means the skill activates at the wrong time — or never.
Write the description to answer two questions:
- What does this skill do?
- When should Codex use it?
- Maximum 1024 characters
- No angle brackets (
<or>) - Should mention specific user request patterns, file types, or contexts
Body
The body is the Markdown content below the closing--- of the frontmatter. It is loaded into context only after the skill triggers. Write it for another instance of Codex, not for a human reader — concise, imperative, and focused on what the agent needs to know.
Writing Guidelines
- Use imperative/infinitive form: “Check whether the Vercel CLI is installed” not “You should check…”
- Keep under 500 lines: Approaching this limit is a sign that content should be split into reference files.
- Prefer examples over explanations: Codex is already very smart. Show a concrete command or code snippet rather than explaining what the command does in general terms.
- Reference bundled resources explicitly: For every
scripts/,references/, andassets/file, state clearly when Codex should use it.
The Four Structural Patterns
Choose the structure that best fits the skill’s purpose. These patterns can be mixed. Pattern 1: Workflow-Based — Best for sequential processes with clear decision points.Progressive Disclosure
Skills use a three-level loading system to manage context efficiently:- Metadata (
name+description) — Always in context (~100 words). Codex reads every installed skill’s metadata on every turn to decide which skills are relevant. - SKILL.md body — Loaded when the skill triggers. Target under 5,000 words and 500 lines. Content beyond this limit should live in reference files.
- Bundled resources — Loaded on demand as Codex determines they are needed. Scripts can also be executed directly without being loaded into the context window at all.
Keep the SKILL.md body under 500 lines. If you are approaching that limit, split content into
references/ files and add explicit pointers in SKILL.md describing when to read them.What Goes in SKILL.md vs. Reference Files
| Put in SKILL.md | Put in references/ |
|---|---|
| Core workflow steps | Detailed API documentation |
| Decision trees | Database schemas |
| Essential commands | Comprehensive guides |
| Navigation pointers to reference files | Examples and patterns |
| Triggering context (in description) | Long reference material |
Complete Example: vercel-deploy
The following is the real vercel-deploy skill — a well-structured, minimal SKILL.md that demonstrates the workflow-based pattern:
- The description includes verbatim user request examples (
"deploy my app","push this live") - The body uses imperative form throughout
- Steps are numbered and concrete — no abstract advice
- The fallback section references the bundled
scripts/deploy.shexplicitly - No redundant “when to use” section in the body (that belongs in the description)