Creating a skill is the process of packaging specialized knowledge, workflows, and tools into a reusable directory that Codex can discover and apply automatically. TheDocumentation 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-creator system skill guides this process end-to-end. The six-step workflow below — from understanding what the skill needs to iterating based on real usage — ensures you build something lean, reliable, and effective.
Degrees of Freedom
One of the most important design decisions in a skill is how much latitude you give Codex to improvise. Match the level of specificity to how fragile or variable the task is.High Freedom
Text-based instructions. Use when multiple approaches are valid, decisions depend on context, or heuristics guide the approach. Codex explores many routes — like navigating an open field.
Medium Freedom
Pseudocode or scripts with parameters. Use when a preferred pattern exists but some variation is acceptable, or when configuration affects behavior.
Low Freedom
Specific scripts, few parameters. Use when operations are fragile and error-prone, consistency is critical, or a specific sequence must be followed exactly. Like a narrow bridge — guardrails keep things on track.
The Six-Step Process
Understand with Concrete Examples
Before writing a single line, build a clear picture of how the skill will actually be used. Good skills are designed around real workflows, not abstract ideas.Ask yourself — or your users — targeted questions:
- “What functionality should this skill support?”
- “Can you give examples of how this skill would be used?”
- “What would a user say that should trigger this skill?”
- “What does Codex struggle with today that this skill would fix?”
Plan Reusable Contents
Turn each concrete example into a list of reusable resources. For each example, ask:
- How would Codex execute this from scratch?
- What would make it faster, more reliable, or more consistent the tenth time?
pdf-editor skill:- Example request: “Rotate pages 2-4 of this PDF 90 degrees”
- From scratch: write Python to manipulate the PDF — same code every time
- Resource:
scripts/rotate_pdf.py→ bundles the logic so it never needs to be rewritten
big-query skill:- Example request: “How many users have logged in today?”
- From scratch: discover the schema, find the right table — every time
- Resource:
references/schema.md→ documents table schemas and relationships once
frontend-webapp-builder skill:- Example request: “Build me a todo app in React”
- From scratch: write the same HTML/React boilerplate every time
- Resource:
assets/hello-world/→ stores the boilerplate directory as a template
scripts/ to write, which references/ to create (possibly asking the user to provide docs), and which assets/ to bundle.Initialize the Skill
Run With resource directories:With resource directories and example placeholder files:With UI metadata for What the script generates:If you used
init_skill.py to scaffold the skill directory. The script generates a SKILL.md template with proper frontmatter and TODO placeholders, creates agents/openai.yaml, and optionally creates resource directories.Basic usage:agents/openai.yaml:--examples, replace or delete the placeholder files. Only keep the resource directories that the skill actually needs.Only run
init_skill.py for new skills. If the skill directory already exists, skip this step and proceed to editing.Edit the Skill
Start with the bundled resources, then write SKILL.md. Remember: you are writing for another Codex instance, not a human. Include information that would be beneficial and non-obvious to an AI agent executing these tasks.Implement bundled resources first:Then write the body: step-by-step instructions using imperative form, concrete commands with code blocks, and explicit references to each bundled resource file — stating clearly when Codex should load or execute each one.
- Write and test all
scripts/files. Run each script to verify there are no bugs and the output is correct. For large sets of similar scripts, test a representative sample. - Create
references/files. For documentation the user needs to provide (brand assets, internal schemas), request the content before proceeding. - Add
assets/files. These are files that will be used in the output — templates, boilerplate, icons.
description first — this is the primary trigger mechanism. Include specific user request patterns, file types, and contexts. All “when to use” information belongs in the description, not in the body.Validate the Skill
Run the validation script to catch structural issues before the skill is used:What the script checks:Fix any reported issues and re-run until validation passes.
SKILL.mdexists and starts with valid YAML frontmatter (---)- Frontmatter is a valid YAML dictionary
nameanddescriptionfields are present- No unexpected keys in frontmatter (allowed:
name,description,license,allowed-tools,metadata) namematches the naming rules: lowercase letters, digits, hyphens only; no leading/trailing hyphens; no consecutive hyphens; max 64 charactersdescriptiondoes not contain angle brackets and is under 1024 characters
Iterate Based on Real Usage
After the skill is installed and in use, it will surface friction points that weren’t visible during authoring. Common improvements:
- Tighten the
descriptionif the skill triggers at the wrong time (or not at all) - Add missing reference files when Codex has to rediscover domain knowledge each run
- Simplify SKILL.md body sections that aren’t being used
- Add scripts for steps that are repeatedly rewritten from scratch
Skill Naming Quick Reference
| Rule | Example |
|---|---|
| Lowercase, digits, hyphens only | gh-address-comments ✅ |
| Verb-led phrase | rotate-pdf, deploy-app ✅ |
| Namespace by tool | gh-address-comments, vercel-deploy ✅ |
| Max 64 characters | Any name ≤ 64 chars ✅ |
| No uppercase, spaces, underscores | GH_Address, vercel deploy ❌ |
| No leading/trailing hyphens | -my-skill- ❌ |
| No consecutive hyphens | my--skill ❌ |
init_skill.py script normalizes names automatically — spaces become hyphens, uppercase becomes lowercase — and prints a note if normalization changed your input.