concepts/customization.md +18 −12
7- **Project guidance (`AGENTS.md`)** for persistent instructions7- **Project guidance (`AGENTS.md`)** for persistent instructions
8- **Skills** for reusable workflows and domain expertise8- **Skills** for reusable workflows and domain expertise
9- **[MCP](https://developers.openai.com/codex/mcp)** for access to external tools and shared systems9- **[MCP](https://developers.openai.com/codex/mcp)** for access to external tools and shared systems
1010- **[Multi-agents](https://developers.openai.com/codex/concepts/multi-agents)** for delegating work to specialized sub-agents- **[Subagents](https://developers.openai.com/codex/concepts/subagents)** for delegating work to specialized subagents
11 11
12These are complementary, not competing. `AGENTS.md` shapes behavior, skills package repeatable processes, and [MCP](https://developers.openai.com/codex/mcp) connects Codex to systems outside the local workspace.12These are complementary, not competing. `AGENTS.md` shapes behavior, skills package repeatable processes, and [MCP](https://developers.openai.com/codex/mcp) connects Codex to systems outside the local workspace.
13 13
19 19
20- Build and test commands20- Build and test commands
21- Review expectations21- Review expectations
2222- Repo-specific conventions- repo-specific conventions
23- Directory-specific instructions23- Directory-specific instructions
24 24
25When the agent makes incorrect assumptions about your codebase, correct them in `AGENTS.md` and ask the agent to update `AGENTS.md` so the fix persists. Treat it as a feedback loop.25When the agent makes incorrect assumptions about your codebase, correct them in `AGENTS.md` and ask the agent to update `AGENTS.md` so the fix persists. Treat it as a feedback loop.
44 - AGENTS.md Global (for you as a developer)44 - AGENTS.md Global (for you as a developer)
45- repo-root/45- repo-root/
46 46
4747 - AGENTS.md Repo-specific (for your team) - AGENTS.md repo-specific (for your team)
48 48
49[Custom instructions with AGENTS.md](https://developers.openai.com/codex/guides/agents-md)49[Custom instructions with AGENTS.md](https://developers.openai.com/codex/guides/agents-md)
50 50
54Skills are often the best fit for reusable workflows because they support richer instructions, scripts, and references while staying reusable across tasks.54Skills are often the best fit for reusable workflows because they support richer instructions, scripts, and references while staying reusable across tasks.
55Skills are loaded and visible to the agent (at least their metadata), so Codex can discover and choose them implicitly. This keeps rich workflows available without bloating context up front.55Skills are loaded and visible to the agent (at least their metadata), so Codex can discover and choose them implicitly. This keeps rich workflows available without bloating context up front.
56 56
57Use skill folders to author and iterate on workflows locally. If a plugin
58already exists for the workflow, install it first to reuse a proven setup. When
59you want to distribute your own workflow across teams or bundle it with app
60integrations, package it as a [plugin](https://developers.openai.com/codex/plugins/build). Skills remain the
61authoring format; plugins are the installable distribution unit.
62
57A skill is typically a `SKILL.md` file plus optional scripts, references, and assets.63A skill is typically a `SKILL.md` file plus optional scripts, references, and assets.
58 64
59- my-skill/65- my-skill/
89 95
90| Layer | Global | Repo |96| Layer | Global | Repo |
91| :----- | :--------------------- | :--------------------------------------------- |97| :----- | :--------------------- | :--------------------------------------------- |
9298| AGENTS | `~/.codex/AGENTS.md` | `AGENTS.md` in repo root or nested dirs || AGENTS | `~/.codex/AGENTS.md` | `AGENTS.md` in repo root or nested directories |
93| Skills | `$HOME/.agents/skills` | `.agents/skills` in repo |99| Skills | `$HOME/.agents/skills` | `.agents/skills` in repo |
94 100
95Codex uses progressive disclosure for skills:101Codex uses progressive disclosure for skills:
105## MCP111## MCP
106 112
107MCP (Model Context Protocol) is the standard way to connect Codex to external tools and context providers.113MCP (Model Context Protocol) is the standard way to connect Codex to external tools and context providers.
108114It’s especially useful for remotely hosted systems such as Figma, Linear, Jira, GitHub, or internal knowledge services your team depends on.It's especially useful for remotely hosted systems such as Figma, Linear, GitHub, or internal knowledge services your team depends on.
109 115
110Use MCP when Codex needs capabilities that live outside the local repo, such as issue trackers, design tools, browsers, or shared documentation systems.116Use MCP when Codex needs capabilities that live outside the local repo, such as issue trackers, design tools, browsers, or shared documentation systems.
111 117
112118A useful mental model:One way to think about it:
113 119
114- **Host**: Codex120- **Host**: Codex
115- **Client**: the MCP connection inside Codex121- **Client**: the MCP connection inside Codex
129 135
130[Model Context Protocol](https://developers.openai.com/codex/mcp)136[Model Context Protocol](https://developers.openai.com/codex/mcp)
131 137
132138## Multi-agents## Subagents
133 139
134140You can create different agents with different roles and prompt them to use tools differently. For example, one agent might run specific testing commands and configurations, while another has MCP servers that fetch production logs for debugging. Each sub-agent stays focused and uses the right tools for its job.You can create different agents with different roles and prompt them to use tools differently. For example, one agent might run specific testing commands and configurations, while another has MCP servers that fetch production logs for debugging. Each subagent stays focused and uses the right tools for its job.
135 141
136142[Multi-agents concepts](https://developers.openai.com/codex/concepts/multi-agents)[Subagent concepts](https://developers.openai.com/codex/concepts/subagents)
137 143
138## Skills + MCP together144## Skills + MCP together
139 145
145Build in this order:151Build in this order:
146 152
1471. [Custom instructions with AGENTS.md](https://developers.openai.com/codex/guides/agents-md) so Codex follows your repo conventions. Add pre-commit hooks and linters to enforce those rules.1531. [Custom instructions with AGENTS.md](https://developers.openai.com/codex/guides/agents-md) so Codex follows your repo conventions. Add pre-commit hooks and linters to enforce those rules.
1481542. [Skills](https://developers.openai.com/codex/skills) so you never have the same conversation twice. Skills can include a `scripts/` directory with CLI scripts or pair with [MCP](https://developers.openai.com/codex/mcp) for external systems.2. Install a [plugin](https://developers.openai.com/codex/plugins) when a reusable workflow already exists. Otherwise, create a [skill](https://developers.openai.com/codex/skills) and package it as a plugin when you want to share it.
1491553. [MCP](https://developers.openai.com/codex/mcp) when workflows need external systems (Linear, JIRA, docs servers, design tools).3. [MCP](https://developers.openai.com/codex/mcp) when workflows need external systems (Linear, GitHub, docs servers, design tools).
1501564. [Multi-agents](https://developers.openai.com/codex/multi-agent) when you’re ready to delegate noisy or specialized tasks to sub-agents.4. [Subagents](https://developers.openai.com/codex/subagents) when you're ready to delegate noisy or specialized tasks to subagents.