Vibe Coding for Production
OpenAI Codex

Instructions, skills, plugins, and subagents

Customize Codex with AGENTS.md, skills, plugins, MCP servers, subagents, and code review.

Codex customization has distinct layers. Choose the smallest layer that solves the problem:

NeedMechanism
Repository conventionsAGENTS.md
Reusable workflowSkill
Installable team distributionPlugin
External tools or systemsMCP
Focused delegated workSubagent

See Customization.

AGENTS.md

Codex reads AGENTS.md for durable repository instructions. Keep build/test commands, architecture boundaries, and team conventions there. More specific files closer to the working directory can refine broader repository guidance.

The same file can be imported by Claude Code, so you do not need two competing sets of project rules. See The /init command and AGENTS.md.

Skills

Codex skills use the open Agent Skills format: a folder with SKILL.md plus optional scripts and references.

Repository skills:

.agents/skills/<skill-name>/SKILL.md

User skills:

~/.agents/skills/<skill-name>/SKILL.md

Codex can select a skill from its description or you can invoke one explicitly:

$skill-name perform the release-readiness check

See Agent Skills. Skills are the authoring format; plugins are the installable distribution unit and can bundle skills, app mappings, MCP configuration, and presentation metadata.

MCP

Codex shares MCP configuration across its app, CLI, and IDE surfaces. A local stdio example:

codex mcp add context7 -- npx -y @upstash/context7-mcp

For an OAuth-enabled server:

codex mcp login <server-name>

The codex mcp management command may be labelled Experimental even though MCP use is supported; check MCP and feature maturity.

Subagents

Subagents are enabled by default and are best for bounded, noisy, or parallel tasks. Ask for them explicitly:

Use separate subagents to inspect API validation, database migrations, and test
coverage. Do not edit; return one merged risk list.

Current defaults allow up to six concurrent threads and one level of nesting, configurable in config.toml. See Subagents.

Review

Use /review for a separate read-only local review:

/review

For GitHub, @codex review requests a review and automatic review can be configured for connected repositories. Put review-specific expectations in AGENTS.md; see GitHub integration.

On this page