What are Skills?
Skills are modular, self-contained folders that extend Codex’s capabilities by providing specialized knowledge, workflows, and tools. Think of them as “onboarding guides” for specific domains or tasks—they transform Codex from a general-purpose agent into a specialized agent equipped with procedural knowledge.What Skills Provide
Skills can include:- Specialized workflows - Multi-step procedures for specific domains
- Tool integrations - Instructions for working with specific file formats or APIs
- Domain expertise - Company-specific knowledge, schemas, business logic
- Bundled resources - Scripts, references, and assets for complex and repetitive tasks
How Skills Work
Skills use a three-level progressive disclosure system to manage context efficiently:Metadata (name + description)
Always loaded in context (~100 words). This helps Codex determine when to use the skill.
SKILL.md body
Loaded when the skill triggers (less than 5k words). Contains instructions and workflows.
Skill Structure
Every skill follows this structure:SKILL.md (Required)
The main skill file consists of:- Frontmatter (YAML): Contains
nameanddescriptionfields. These are critical—Codex reads them to determine when to use the skill. - Body (Markdown): Instructions and guidance for using the skill. Only loaded after the skill triggers.
The description in the frontmatter is the primary triggering mechanism. Include both what the skill does and specific triggers/contexts for when to use it.
Bundled Resources (Optional)
Scripts
Executable code for tasks requiring deterministic reliability. Token efficient and may be executed without loading into context.Example:
scripts/rotate_pdf.py for PDF rotationReferences
Documentation loaded as needed to inform Codex’s process. Keeps SKILL.md lean.Example:
references/api_docs.md for API specificationsAssets
Files used in output, not loaded into context.Example:
assets/logo.png for brand assetsInstalling Skills
Skills are stored in$CODEX_HOME/skills/ (typically ~/.codex/skills/).
System Skills (Built-in)
Codex comes with built-in system skills that are automatically installed to$CODEX_HOME/skills/.system/ on startup. These include:
- skill-creator: Guide for creating effective skills
- skill-installer: Install skills from GitHub repositories
Installing Additional Skills
Use the built-inskill-installer skill to install additional skills:
After installing a new skill, restart Codex to pick it up.
Creating a Skill
Codex includes a built-inskill-creator skill that guides you through the skill creation process.
Quick Start
Describe your skill
Tell Codex what you want the skill to do and provide examples:“I want to create a skill for rotating and editing PDF files. Users should be able to say things like ‘rotate this PDF 90 degrees’ or ‘extract text from this PDF’.”
Let Codex create it
Codex will:
- Plan the reusable skill contents (scripts, references, assets)
- Initialize the skill directory with proper structure
- Generate SKILL.md with frontmatter and instructions
- Create any necessary helper scripts
Skill Creation Process
The skill-creator follows this workflow:- Understand the skill - Gather concrete examples of how the skill will be used
- Plan reusable contents - Identify scripts, references, and assets needed
- Initialize the skill - Run
init_skill.pyto create the structure - Edit the skill - Implement resources and write SKILL.md
- Validate the skill - Run
quick_validate.pyto check for issues - Iterate - Test on real tasks and improve based on feedback
Skill Design Principles
Concise is Key
The context window is a public good. Skills share it with everything else Codex needs: system prompt, conversation history, other skills’ metadata, and the actual user request. Prefer concise examples over verbose explanations.Progressive Disclosure
Keep SKILL.md under 500 lines. When approaching this limit, split content into separate files:Set Appropriate Degrees of Freedom
Match the level of specificity to the task’s fragility:- High freedom (text instructions): Multiple approaches are valid, decisions depend on context
- Medium freedom (pseudocode/parameterized scripts): Preferred pattern exists, some variation acceptable
- Low freedom (specific scripts): Operations are fragile, consistency is critical
Using Skills
Automatic Triggering
Codex automatically loads skills based on the context of your request. The skill’sdescription in the frontmatter determines when it triggers.
Manual Loading
You can explicitly load a skill using the/use command:
Managing Skills
Disabling Project Docs
Skills can be disabled using:Skills Location
Skills are installed to:- User skills:
$CODEX_HOME/skills/(typically~/.codex/skills/) - System skills:
$CODEX_HOME/skills/.system/(auto-installed)
Examples
Example: PDF Editor Skill
A skill for PDF operations:scripts/rotate_pdf.py- Rotate PDF pagesscripts/merge_pdfs.py- Merge multiple PDFsreferences/pdf_operations.md- Advanced PDF manipulation guide
Example: BigQuery Skill
A skill for querying a company database:references/schema.md- Database schema documentationreferences/finance.md- Finance and revenue metricsreferences/product.md- Product usage metrics
Best Practices
Keep skills focused
Keep skills focused
Each skill should have a clear, single purpose. Don’t create mega-skills that try to do everything.
Test your scripts
Test your scripts
Always test bundled scripts by running them to ensure they work correctly. Scripts should be deterministic and reliable.
Avoid duplication
Avoid duplication
Information should live in either SKILL.md or reference files, not both. Prefer reference files for detailed information.
Include only essential files
Include only essential files
Don’t create README.md, CHANGELOG.md, or other auxiliary documentation. Skills should only contain information needed for the AI agent to do the job.
Use clear naming
Use clear naming
Use lowercase letters, digits, and hyphens only. Prefer short, verb-led phrases that describe the action (e.g.,
rotate-pdf, not pdf-rotation-tool).Next Steps
Create Your First Skill
Follow the step-by-step guide to create a custom skill
Browse Available Skills
Explore curated skills in the official skills repository