Codex CLI Best Practice

Runnable Subagent, Skill and orchestration examples that move Codex CLI from vibe coding to agentic engineering.

Stars
★ 1k
Last updated
5mo ago
FARS reviewed
Nov 04, 2026
License
MIT
Primary language
Python

At a glance

Works with
Platform-specificCodex
You'll need
Codex CLIOpenAI account or API keyShell / CLINetwork accessLocal filesystemMCP Server
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

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.

  1. A team adopting Codex CLI that wants a copyable .codex/config.toml baseline for profiles, sandbox, approval policy and MCP servers.
  2. A developer who wants feature-specific subagents (frontend, backend, QA) instead of one generalist, modeled on the .codex/agents/*.toml role configs.
  3. Anyone packaging a repeatable task as a reusable skill and needing the progressive-disclosure layout of references/, scripts/ and assets/.
  4. Running an internal demo or onboarding session around the Agent → Skill pattern, using the weather-data-to-SVG-card example as the template.
  5. 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).
  6. 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-practice

Hooks require a feature flag, which the README documents as:

[features]
codex_hooks = true

Cross-session memory likewise:

[features]
memories = true

MCP servers are declared under [mcp_servers.*] in config.toml and managed from the CLI:

codex mcp add
codex mcp list
codex mcp login

How 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
/mcp

For 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)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Local filesystem read/write

Modifies local files; work on a clean Git branch or dedicated worktree.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

External MCP tool bridge

Inherits capabilities of connected MCP servers; audit third-party servers before enabling.

FARS trust-control audit

Not found in source — apply before daily use
  • 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?

Pros
  • 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.
Limitations
  • 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?

FollowAgents source review · FARS-2.1
Major gaps
41/ 100 5-point scale 2.1 / 5
Trust 10/29
Reliability 3/14
Adaptability 9/18
Convention 10/18
Effectiveness 6/13
Verifiability 3/8
Why each dimension lost points
Trust10 / 29 · 1.7/5

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.

Reliability3 / 14 · 1.1/5

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.

Adaptability9 / 18 · 2.5/5

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.

Convention10 / 18 · 2.8/5

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.

Effectiveness6 / 13 · 2.3/5

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.

Verifiability3 / 8 · 1.9/5

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.

Risks and how to mitigate them
  • 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.
Evidence confidence: Low Reviewed Nov 04, 2026 Reviewed revision b79f473a1886
Review evidence README.mdLICENSE
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/codex-cli-best-practice.svg)](https://followagents.com/en/agents/codex-cli-best-practice)
<a href="https://followagents.com/en/agents/codex-cli-best-practice"><img src="https://followagents.com/badge/codex-cli-best-practice.svg" alt="FARS review"></a>

FAQ

Can I just run this repository as an agent?
No. It is a set of Codex CLI configs, role definitions, skill packages and docs; it only takes effect once you install Codex CLI and load these files in your own project.
What does it cost?
The repository is free under MIT. Cost comes from the OpenAI account and model usage behind Codex CLI — the README also notes Fast Mode on gpt-5.4 runs 1.5x faster at 2x credits.
Why do hooks or memories do nothing after I enable them?
Both require explicit flags in [features] of config.toml (codex_hooks = true, memories = true), and marketplace and memories are marked beta, so a recent CLI version is needed.
Can I use this with a different model or a different coding CLI?
The agents, skills, config.toml layout and hooks are all built around Codex CLI's directory conventions and commands. Porting to another runtime means rewriting them; no adapter layer is provided.
How long should AGENTS.md be, and what belongs in it?
Keep it concise — 150 lines is a useful heuristic, the real limit is the 32 KiB project_doc_max_bytes cap. Focus on setup, build and test commands; put sandbox and approval rules in config.toml and personal preferences in AGENTS.override.md.
Is Codex CLI Best Practice open source?
Yes. The source code is on GitHub (shanraisshan/codex-cli-best-practice) under the MIT licence.
Is Codex CLI Best Practice safe to use?
FollowAgents' FARS review (Nov 04, 2026) scored Codex CLI Best Practice 10/29 on trust and safety. The review did not find these safety controls in the source: dependency security. Before giving it real accounts or data: Pin versions and run a dependency audit (npm audit, pip-audit) before installing; prefer running it in a container.
Is Codex CLI Best Practice still maintained?
Development has slowed: the latest commit on GitHub is from 2026-06-04, within the last six months but not the last 30 days.
Who makes Codex CLI Best Practice?
Codex CLI Best Practice is published on GitHub by the account shanraisshan. FollowAgents has not verified which person or company is behind that account.
Was this page helpful?
View on GitHub ↗ Install ↓

Host ecosystems

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts