Creating Your First Skill
Introduction
Welcome to Codex Skill Engineering! In the previous course, you learned how to configure Codex using config.toml - setting up your model preferences, managing context, and defining your project structure. Now we're taking it to the next level by teaching Codex specialized procedures called skills.
Skills help Codex behave consistently for repeatable tasks in your repository. Think of skills as teaching Codex domain-specific expertise that it can apply autonomously whenever the situation calls for it.
What Are Skills?
Skills are reusable, structured procedures written in Markdown that teach Codex how to perform specific tasks. Unlike the general configuration you set in config.toml, skills define task-specific behaviors - they're like expert recipes that Codex can follow when it detects certain patterns in your requests.
A skill defines:
- When to activate (trigger patterns)
- What role to assume (persona and expertise)
- What steps to follow (systematic procedure)
- What format to output (structure and constraints)
The key difference from what you've learned before: skills enable autonomous activation. Codex doesn't need to be told "use this skill" - it recognizes when a skill applies and invokes it automatically.
Skills vs Slash Commands
You might be wondering: "How is this different from using slash commands?" Here is the distinction:
Slash commands (like /edit or /test):
- Manually invoked by you
- User-directed - you choose when to use them
- General-purpose operations
Skills:
- Automatically triggered by Codex
- Intent-based - Codex detects when they're needed
- Specialized procedures for specific tasks
For example, if you type "How is this repo organized?", Codex can automatically recognize this matches a repository analysis skill and invoke it without you needing to run a manual command first. Skills make Codex proactive, not just reactive.
Where Skills Live
Skills are organized in your repository's .codex/ directory alongside your configuration:
Each skill gets its own directory with a SKILL.md file. This organization keeps skills modular, version-controllable, and easy to share across projects.
