Creating Custom Skills
Introduction
Welcome back to Mastering Advanced AI Tooling in Codex! We're now at lesson 3, making steady progress through the course. In our previous lessons, we explored how to configure Codex through config.toml and how to safely enable web search capabilities with appropriate security controls.
Today, we're going to learn something powerful and practical: how to create custom Skills that automate repetitive workflows. Skills let us encode our team's review standards, testing practices, and quality checks directly into Codex, turning it from a general assistant into a specialized tool that understands our project's specific needs. By the end of this lesson, we'll build a complete code-review Skill that performs thorough code reviews with consistent structure and depth.
Understanding Built-in Commands and Skills
Codex comes with several built-in slash commands like /review (review your working tree), /model (switch models), and /approvals (manage tool approvals). These are part of Codex itself—you use them but don't define new ones.
When you need custom, reusable workflows that encode team-specific expertise, you create Skills. A Skill is a specialized capability stored in a SKILL.md file that Codex can invoke when relevant or when explicitly called. Think of Skills as recipes for AI interactions: each encapsulates a clear role definition (what expertise Codex should apply), a specific task (what we want accomplished), constraints on behavior (what to focus on or avoid), and an output format (how to present results).
For our code review workflow, we have two options:
Option A (Simpler): Use the built-in /review command and rely on AGENTS.md to define what "good review" means for this project. This works well when your review standards provide context that should apply to all interactions.
Option B (More Control): Create a code-review Skill that implements your exact review rubric as an explicit, invokable workflow. This is better when you want a specialized review process distinct from general Codex behavior.
We'll build Option B since it demonstrates how to create team-shared workflows that capture detailed expertise.
Where Skills Live
Skills can be defined in two locations depending on scope:
Repository-level Skills go in .codex/skills/<skill-name>/SKILL.md at the root of the repository. These are team-shared capabilities that capture project-specific workflows: how this codebase should be reviewed, tested, or documented. Every team member working on the repository gets these Skills automatically.
User-level Skills go in ~/.codex/skills/<skill-name>/SKILL.md. These are personal workflow tools that may not apply to everyone: your specific IDE preferences, your individual productivity patterns, or experimental workflows you're testing before proposing to the team.
For our code-review Skill, we'll define it as a repository-level Skill since code review standards should be consistent across the team. This ensures that whether Alice or Bob invokes the Skill, they both apply the same rigor and produce comparable results.
