Codex CLI Best Practice
Runnable Subagent, Skill and orchestration examples that move Codex CLI from vibe coding to agentic engineering.
- Source repo
- shanraisshan/codex-cli-best-practice
- Stars
- ★ 1k
- Last updated
- 5mo ago
- FARS reviewed
- Nov 04, 2026
- License
- MIT
- Primary language
- Python
- FA score
- 41/100 · Major gaps
At a glance
- Works with
- Platform-specificCodex
- You'll need
- Typical use
- A team adopting Codex CLI that wants a copyable .codex/config.toml baseline for profiles, sandbox, approval policy and MCP servers.
- Main limitation
- It is a practice-and-template repository, not a deployable agent product; value depends on the reader assembling the configuration themselves.
- Maintenance
- Commits in the last 6 monthslast commit 2026-06-04
- Source review
- 41/100 · Major gaps 1 safety controls not found
What does this agent do, and when should you use it?
This is a practice-and-template repository for OpenAI Codex CLI, not a packaged agent product. It documents Codex CLI's building blocks as browsable entries — slash commands, Subagents (.codex/agents/<name>.toml registered under [agents.<name>]), Skills (.agents/skills/<name>/SKILL.md), Plugins, Marketplace, Memories, MCP Servers, Config, Rules, AGENTS.md, Hooks, Speed, Code Review and Sessions — each linked to official docs plus an opinionated best-practice file. It also ships concrete implementation: a .codex/config.toml with profiles, sandbox, approval policy and [mcp_servers.*], plus a working Agent → Skill orchestration where a weather agent pulls temperature from Open-Meteo and invokes an SVG creator skill to emit a weather card. On top of that come 50 grouped tips, a comparison of six community development workflows converging on Research → Plan → Execute → Review → Ship, and cross-references to the author's Claude Code counterpart repo. Adopt it as a baseline for how your team configures Codex CLI; installing Codex CLI and paying for model usage remains your responsibility.
The repository carries Codex CLI configuration, role definitions and operating patterns. Subagents are declared in .codex/agents/<name>.toml under [agents.<name>], with global knobs max_threads, max_depth and job_max_runtime_seconds under [agents], and built-in roles default, worker and explorer. Skills live at .agents/skills/<name>/SKILL.md with required name + description metadata, progressive disclosure through scripts/, references/ and assets/, and an optional agents/openai.yaml; they fire explicitly via /skills or $skill-name, or implicitly by description match. .codex/config.toml holds profiles, sandbox, approval_policy, service_tier, [mcp_servers.*] entries (STDIO and Streamable HTTP, OAuth via codex mcp login) and [features] toggles such as memories and codex_hooks. .codex/rules/ defines Starlark prefix_rule() policies with allow/prompt/forbidden decisions, checkable with codex execpolicy check, while AGENTS.md supplies hierarchical project context from cwd to repo root capped at project_doc_max_bytes (32 KiB), overridable per user with AGENTS.override.md. The documented end-to-end flow: a user asks inside a codex session, the weather-agent role calls Open-Meteo for the temperature, then invokes the SVG creator skill to write the weather card output. Hook implementation is pointed at the separate shanraisshan/codex-cli-hooks repository.
- A team adopting Codex CLI that wants a copyable .codex/config.toml baseline for profiles, sandbox, approval policy and MCP servers.
- A developer who wants feature-specific subagents (frontend, backend, QA) instead of one generalist, modeled on the .codex/agents/*.toml role configs.
- Anyone packaging a repeatable task as a reusable skill and needing the progressive-disclosure layout of references/, scripts/ and assets/.
- Running an internal demo or onboarding session around the Agent → Skill pattern, using the weather-data-to-SVG-card example as the template.
- A platform or DevEx engineer who wants to constrain agent behavior with hooks, Starlark rules and a concise AGENTS.md (logging, security scanning, formatting, command allowlists).
- A researcher comparing development workflows — Superpowers, Spec Kit, gstack, Get Shit Done, oh-my-codex, Compound Engineering — against one reference table.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Config files
config.toml
How do you install or deploy this agent?
The repository is config plus documentation; the real installation target is Codex CLI. The README does not document how to install Codex CLI — it only states it is updated with v0.137.0 and links to the official docs, so that step is the missing piece and must be taken from OpenAI's own instructions. To obtain the repository content:
git clone https://github.com/shanraisshan/codex-cli-best-practice
cd codex-cli-best-practiceHooks require a feature flag, which the README documents as:
[features]
codex_hooks = trueCross-session memory likewise:
[features]
memories = trueMCP servers are declared under [mcp_servers.*] in config.toml and managed from the CLI:
codex mcp add
codex mcp list
codex mcp loginHow do you use this agent?
Start a Codex CLI interactive session inside the repository and run the documented orchestration prompt:
codex
> Fetch the current weather for Dubai in Celsius and create the SVG weather card output using the repo.Invoke skills and roles using the commands the repository names:
/skills
$skill-name
/agent
/plan
/review
/status
/mcpFor headless or CI usage the README points at codex exec; switch safety levels with profiles and an on-request approval policy; keep long-running exploration on a branch with /fork (or codex fork) and continue later with /resume (or codex resume).
Safety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Modifies local files; work on a clean Git branch or dedicated worktree.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
Inherits capabilities of connected MCP servers; audit third-party servers before enabling.
FARS trust-control audit
- dependency security — Pin versions and run a dependency audit (npm audit, pip-audit) before installing; prefer running it in a container.
What are this agent's strengths and limitations?
- Configuration is the deliverable: .codex/config.toml, .codex/agents/*.toml and .agents/skills/ ship in-repo, so you copy and adapt rather than interpret prose.
- Subagent design is specific down to parameters — [agents] max_threads, max_depth, job_max_runtime_seconds, built-in default/worker/explorer roles, parallel orchestration and CSV batch processing.
- A genuinely runnable Agent → Skill chain (Open-Meteo temperature → SVG weather card) serves as a template rather than a diagram.
- 50 grouped tips spanning Prompting, Planning, AGENTS.md, Agents, Skills, Hooks, Memories, Workflows, debugging and utilities, several attributed to named community sources.
- Clear separation between deterministic harness settings (sandbox, approval policy, model in config.toml) and behavioral prose in AGENTS.md — a distinction many teams get wrong.
- MIT licensed and deliberately paired with the author's Claude Code counterpart, useful for teams running a two-tool strategy.
- It is a practice-and-template repository, not a deployable agent product; value depends on the reader assembling the configuration themselves.
- Tightly bound to OpenAI Codex CLI with no equivalent implementation path for other agent runtimes.
- Prerequisites for Codex CLI itself — installation, account and model quota — are not documented, only linked out, so first-run requires extra research.
- Many capabilities are version- and flag-gated (hooks need codex_hooks, memories and marketplace are marked beta, session archiving needs v0.137.0+), so the guidance drifts; the README itself is pinned to v0.137.0.
- Codex CLI does not yet support .codex/commands/, so the full Command → Agent → Skill chain is impossible on this side and only partially aligned with the Claude Code version.
- Content mixes community tips, podcasts and social links with engineering guidance, so it is weakly evidenced as a normative standard — there are no tests or benchmarks.
How does this agent compare with similar options?
The repository explicitly contrasts itself with the author's claude-code-best-practice: Codex CLI has no custom command directory (.codex/commands/), so its orchestration stops at Agent → Skill while the Claude Code version reaches Command → Agent → Skill. For development workflows it compares Superpowers, GitHub Spec Kit, gstack, Get Shit Done, oh-my-codex and Compound Engineering, noting they all converge on the same Research → Plan → Execute → Review → Ship structure.
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| Codex CLI Best Practice This agent | 41 · Major gaps | — | ★ 1k | 5mo ago | Python | Codex |
| Claude Code: Everything You Need to Know | 79 · Good | CLIFree + model costs | ★ 3.7k | 8d ago | TypeScript | Claude Code |
| Claude Codex Settings | 61 · Some gaps | Agent plugin / skillFree + model costs | ★ 1.2k | today | Python | Codex · Claude Code |
| Code Abyss: Persona and Engineering Skills for Coding Agents | 60 · Some gaps | CLI | ★ 243 | 4mo ago | JavaScript | Codex · Claude Code |
How does FollowAgents rate this agent?
Why each dimension lost points
README offers documentation-level safety guidance (sandbox, approval policy, conservative/trusted profiles, no_memories_if_mcp_or_web_search), which supports least privilege and confirmation only as advice; actual config contents are not shown, so least_privilege/user_confirmation score 1. Data-flow and sensitive-data handling are only scattered hints (memory isolation from MCP/web search) with no systematic treatment, deducted. Dependency security has no manifest or audit evidence, scored 0. External effects and rollback only reference generic git revert/bisect, /fork, /resume rather than repo mechanisms, scored 1. Source attribution is comparatively clear with official doc links and community-source badges, scored 2.
Internal inconsistency: badge claims Codex CLI v0.137.0 dated 2026 while body references 0.115.0/0.119.0/0.121.0, making the timeline questionable, self_consistency 1. Dependency availability relies solely on external official docs and third-party repos with no pinning or verification, scored 1. No failure messages or error handling anywhere, scored 0.
Targets Codex CLI users and agentic engineering scenarios with adequate audience/scenario description, scored 2. Capability boundaries are explicit (custom commands unsupported, request_user_input not public), scored 2. Trigger precision is thin—only generic advice that skill description acts as a trigger, no concrete rules, scored 1. Environment fit covers only terminal tools (iTerm/Ghostty/tmux) with no cross-environment notes, scored 1.
Information architecture is well organized via concept table, workflow table, and tip sections, scored 2. Install notes are absent—only an interactive codex example, no installation steps, scored 1. Naming stability is moderate with many badges/tags and no versioning convention, scored 1. Examples and FAQ are rich (50 tips plus workflows), scored 2. Known limitations are explicitly stated (command pattern unavailable), scored 2. LICENSE is full MIT text, scored 3. Versioning/changelog relies only on badges and external release links with no local changelog, scored 1. Maintenance responsibility is not stated and publisher is unverified, scored 1.
Output usability is good with copyable prompts and workflows, scored 2. Marginal value is limited as content largely aggregates official docs and community tips with little original increment, scored 1. Cost-benefit is not weighed—advice like daily updates and multi-agent parallelism may raise cost without tradeoff discussion, scored 1.
Claim traceability is partial: most claims link official docs, but some version numbers and dates cannot be verified from the given files, scored 1. Cross-source corroboration relies on a single README plus external links with no independent corroboration, scored 1. Fact/inference separation is weak—star counts and version timelines are unlabeled or inferred, scored 1.
- Not found in source: dependency securityPin versions and run a dependency audit (npm audit, pip-audit) before installing; prefer running it in a container.
- Version numbers and dates in README (e.g., v0.137.0, 2026) cannot be verified from the provided files and may be internally inconsistent; cross-check against official releases before relying on them.
- The repository is a documentation/best-practice aggregation with no dependency manifest, install steps, or executable config contents, so actual runtime safety and dependency risk cannot be assessed.
- Publisher identity is unverified by FollowAgents and maintenance responsibility/update process is unclear; long-term availability should be treated cautiously.
- Some advice (daily updates, multi-agent parallelism, Fast Mode double credits) may increase cost, and README offers no cost tradeoff discussion.
FAQ
Can I just run this repository as an agent?
What does it cost?
Why do hooks or memories do nothing after I enable them?
Can I use this with a different model or a different coding CLI?
How long should AGENTS.md be, and what belongs in it?
Is Codex CLI Best Practice open source?
Is Codex CLI Best Practice safe to use?
Is Codex CLI Best Practice still maintained?
Who makes Codex CLI Best Practice?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.