mirror of
https://github.com/EveryInc/compound-engineering-plugin.git
synced 2026-06-26 12:23:01 +02:00
87ca621f34
Drop the personal Claude home sync command and remove custom writer support for native or deprecated targets. Keep install auto-detection for supported custom targets, document native marketplace paths, and add legacy cleanup coverage so stale CE artifacts from old installs can be backed up safely.
5.9 KiB
5.9 KiB
Codex Spec (Config, Prompts, Skills, Subagents, MCP)
Last verified: 2026-04-18
Primary sources
https://developers.openai.com/codex/config-basic
https://developers.openai.com/codex/config-advanced
https://developers.openai.com/codex/custom-prompts
https://developers.openai.com/codex/skills
https://developers.openai.com/codex/skills/create-skill
https://developers.openai.com/codex/subagents
https://developers.openai.com/codex/guides/agents-md
https://developers.openai.com/codex/mcp
Config location and precedence
- Codex reads local settings from
~/.codex/config.toml, shared by the CLI and IDE extension. citeturn2view0 - Configuration precedence is: CLI flags → profile values → root-level values in
config.toml→ built-in defaults. citeturn2view0 - Codex stores local state under
CODEX_HOME(defaults to~/.codex) and includesconfig.tomlthere. citeturn4view0
Profiles and providers
- Profiles are defined under
[profiles.<name>]and selected withcodex --profile <name>. citeturn4view0 - A top-level
profile = "<name>"sets the default profile; CLI flags can override it. citeturn4view0 - Profiles are experimental and not supported in the IDE extension. citeturn4view0
- Custom model providers can be defined with base URL, wire API, and optional headers, then referenced via
model_provider. citeturn4view0
Custom prompts (slash commands)
- Custom prompts are Markdown files stored under
~/.codex/prompts/. citeturn3view0 - Custom prompts require explicit invocation and aren’t shared through the repository; use skills to share or auto-invoke. citeturn3view0
- Prompts are invoked as
/prompts:<name>in the slash command UI. citeturn3view0 - Prompt front matter supports
description:andargument-hint:. citeturn3view0turn2view3 - Prompt arguments support
$1–$9,$ARGUMENTS, and named placeholders like$FILEprovided asKEY=value. citeturn2view3 - Codex ignores non-Markdown files in the prompts directory. citeturn2view3
AGENTS.md instructions
- Codex reads
AGENTS.mdfiles before doing any work and builds a combined instruction chain. citeturn3view1 - Discovery order: global (
~/.codex, usingAGENTS.override.mdthenAGENTS.md) then project directory traversal from repo root to CWD, with override > AGENTS > fallback names. citeturn3view1 - Codex concatenates files from root down; files closer to the working directory appear later and override earlier guidance. citeturn3view1
Skills (Agent Skills)
- A skill is a folder containing
SKILL.mdplus optionalscripts/,references/, andassets/. citeturn3view3turn3view4 SKILL.mduses YAML front matter and requiresnameanddescription. citeturn3view3turn3view4- Required fields are single-line with length limits (name ≤ 100 chars, description ≤ 500 chars). citeturn3view4
- At startup, Codex loads only each skill’s name/description; full content is injected when invoked. citeturn3view3turn3view4
- Skills can be repo-scoped in
.agents/skills/and are discovered from the current working directory up to the repository root. User-scoped skills live in~/.agents/skills/. citeturn1view1turn1view4 - Inference: some existing tooling and user setups still use
.codex/skills/and~/.codex/skills/as compatibility paths, but those locations are not documented in the current OpenAI Codex skills docs linked above. - Compound Engineering should avoid
~/.agents/skillsfor managed installs because that shared root can shadow Copilot's native plugin skills. Use the Codex-specific compatibility root~/.codex/skills/compound-engineering/<skill-name>/SKILL.mdfor CE Codex skills, and track generated files with a CE manifest. - Codex also supports admin-scoped skills in
/etc/codex/skillsplus built-in system skills bundled with Codex. citeturn1view4 - Skills can be invoked explicitly using
/skillsor$skill-name. citeturn3view3
Subagents and custom agents
- Codex subagent workflows are enabled by default in current releases.
- Codex only spawns subagents when explicitly asked.
- Custom agent files are standalone TOML files under
~/.codex/agents/for personal agents or.codex/agents/for project-scoped agents. - Each TOML file defines one custom agent. Required fields:
namedescriptiondeveloper_instructions
- Optional fields can include
nickname_candidates,model,model_reasoning_effort,sandbox_mode,mcp_servers, andskills.config. - The TOML
namefield is the source of truth; matching the filename to the agent name is only a convention. - Current CE output still converts Claude Markdown agents into generated Codex skills. A future Codex migration can convert them to flat custom-agent TOML files once orchestration references and cleanup semantics are updated together.
- If CE generates Codex custom agents, those files are Codex-only artifacts and belong under
~/.codex/agents, not~/.agents/skills. - For future generated TOML agents, use CE-prefixed agent names, preferably derived from the source category and agent name such as
ce-review-correctness-reviewerorce-research-repo-research-analyst. Current docs describe one direct TOML file per agent under~/.codex/agents; do not assume nested agent directories are discovered.
MCP (Model Context Protocol)
- MCP configuration lives in
~/.codex/config.tomland is shared by the CLI and IDE extension. citeturn3view2turn3view5 - Each server is configured under
[mcp_servers.<server-name>]. citeturn3view5 - STDIO servers support
command(required),args,env,env_vars, andcwd. citeturn3view5 - Streamable HTTP servers support
url(required),bearer_token_env_var,http_headers, andenv_http_headers. citeturn3view5