concepts/customization.md +55 −24
5In Codex, customization comes from a few layers that work together:5In Codex, customization comes from a few layers that work together:
6 6
7- **Project guidance (`AGENTS.md`)** for persistent instructions7- **Project guidance (`AGENTS.md`)** for persistent instructions
8- **[Memories](https://developers.openai.com/codex/memories)** for useful context learned from prior work
8- **Skills** for reusable workflows and domain expertise9- **Skills** for reusable workflows and domain expertise
9- **[MCP](https://developers.openai.com/codex/mcp)** for access to external tools and shared systems10- **[MCP](https://developers.openai.com/codex/mcp)** for access to external tools and shared systems
1011- **[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 12
1213These 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.These are complementary, not competing. `AGENTS.md` shapes behavior, memories
14carry local context forward, skills package repeatable processes, and
15[MCP](https://developers.openai.com/codex/mcp) connects Codex to systems outside the local workspace.
13 16
14## AGENTS Guidance17## AGENTS Guidance
15 18
19 22
20- Build and test commands23- Build and test commands
21- Review expectations24- Review expectations
2225- Repo-specific conventions- repo-specific conventions
23- Directory-specific instructions26- Directory-specific instructions
24 27
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.28When 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.
39Codex can load guidance from multiple locations: a global file in your Codex home directory (for you as a developer) and repo-specific files that teams can check in. Files closer to the working directory take precedence.42Codex can load guidance from multiple locations: a global file in your Codex home directory (for you as a developer) and repo-specific files that teams can check in. Files closer to the working directory take precedence.
40Use the global file to shape how Codex communicates with you (for example, review style, verbosity, and defaults), and keep repo files focused on team and codebase rules.43Use the global file to shape how Codex communicates with you (for example, review style, verbosity, and defaults), and keep repo files focused on team and codebase rules.
41 44
4245- ~/.codex/<FileTree
4346 class="mt-4"
4447 - AGENTS.md Global (for you as a developer) tree={[
4548- repo-root/ {
4649 name: "~/.codex/",
4750 - AGENTS.md Repo-specific (for your team) open: true,
51 children: [
52 { name: "AGENTS.md", comment: "Global (for you as a developer)" },
53 ],
54 },
55 {
56 name: "repo-root/",
57 open: true,
58 children: [
59 { name: "AGENTS.md", comment: "repo-specific (for your team)" },
60 ],
61 },
62 ]}
63/>
48 64
49[Custom instructions with AGENTS.md](https://developers.openai.com/codex/guides/agents-md)65[Custom instructions with AGENTS.md](https://developers.openai.com/codex/guides/agents-md)
50 66
54Skills are often the best fit for reusable workflows because they support richer instructions, scripts, and references while staying reusable across tasks.70Skills 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.71Skills 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 72
5773A skill is typically a `SKILL.md` file plus optional scripts, references, and assets.Use skill folders to author and iterate on workflows locally. If a plugin
74already exists for the workflow, install it first to reuse a proven setup. When
75you want to distribute your own workflow across teams or bundle it with app
76integrations, package it as a [plugin](https://developers.openai.com/codex/plugins/build). Skills remain the
77authoring format; plugins are the installable distribution unit.
58 78
5979- my-skill/A skill is typically a `SKILL.md` file plus optional scripts, references, and assets.
60 80
6181 - SKILL.md Required: instructions + metadata<FileTree
6282 - scripts/ Optional: executable code class="mt-4"
6383 - references/ Optional: documentation tree={[
6484 - assets/ Optional: templates, resources {
85 name: "my-skill/",
86 open: true,
87 children: [
88 { name: "SKILL.md", comment: "Required: instructions + metadata" },
89 { name: "scripts/", comment: "Optional: executable code" },
90 { name: "references/", comment: "Optional: documentation" },
91 { name: "assets/", comment: "Optional: templates, resources" },
92 ],
93 },
94 ]}
95/>
65 96
66The skill directory can include a `scripts/` folder with CLI scripts that Codex invokes as part of the workflow (for example, seed data or run validations). When the workflow needs external systems (issue trackers, design tools, docs servers), pair the skill with [MCP](https://developers.openai.com/codex/mcp).97The skill directory can include a `scripts/` folder with CLI scripts that Codex invokes as part of the workflow (for example, seed data or run validations). When the workflow needs external systems (issue trackers, design tools, docs servers), pair the skill with [MCP](https://developers.openai.com/codex/mcp).
67 98
89 120
90| Layer | Global | Repo |121| Layer | Global | Repo |
91| :----- | :--------------------- | :--------------------------------------------- |122| :----- | :--------------------- | :--------------------------------------------- |
92123| 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 |124| Skills | `$HOME/.agents/skills` | `.agents/skills` in repo |
94 125
95Codex uses progressive disclosure for skills:126Codex uses progressive disclosure for skills:
105## MCP136## MCP
106 137
107MCP (Model Context Protocol) is the standard way to connect Codex to external tools and context providers.138MCP (Model Context Protocol) is the standard way to connect Codex to external tools and context providers.
108139It’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 140
110Use MCP when Codex needs capabilities that live outside the local repo, such as issue trackers, design tools, browsers, or shared documentation systems.141Use MCP when Codex needs capabilities that live outside the local repo, such as issue trackers, design tools, browsers, or shared documentation systems.
111 142
112143A useful mental model:One way to think about it:
113 144
114- **Host**: Codex145- **Host**: Codex
115- **Client**: the MCP connection inside Codex146- **Client**: the MCP connection inside Codex
129 160
130[Model Context Protocol](https://developers.openai.com/codex/mcp)161[Model Context Protocol](https://developers.openai.com/codex/mcp)
131 162
132163## Multi-agents## Subagents
133 164
134165You 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 166
136167[Multi-agents concepts](https://developers.openai.com/codex/concepts/multi-agents)[Subagent concepts](https://developers.openai.com/codex/concepts/subagents)
137 168
138## Skills + MCP together169## Skills + MCP together
139 170
145Build in this order:176Build in this order:
146 177
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.1781. [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.
1481792. [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.
1491803. [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).
1501814. [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.