codex

A setup command for using OpenAI Codex CLI, a terminal-based AI coding tool, with Marko projects. It adds project guidance, connected tools, and Marko skills for Codex.

In plain words
What is it for?
Use it to create or update AGENTS.md, register Marko's MCP server, and distribute Marko skills to Codex CLI.
Why use it?
It saves manual configuration and gives Codex instructions about Marko conventions and project structure. Your additions outside the generated guidance markers remain intact when the setup is run again.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/marko-php/marko/codex
Clone the repo
git clone --depth 1 https://github.com/marko-php/marko
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 731 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00027 $0.00731
Opus 5 $0.00014 $0.00365
Sonnet 5 $0.00005 $0.00146
Haiku 4.5 $0.00003 $0.00073

Measured 2d ago against content hash 9485c4d3889c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

codex scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/docs-markdown/docs/ai-assisted-development/agents/codex.md · 58 lines

How it starts

The opening of the file, as written. The whole thing — 58 lines — stays where its author put it; the contents beside it link to each section on GitHub.

OpenAI Codex CLI is OpenAI's agentic coding tool. devai:install configures it with an AGENTS.md project guidelines file, MCP server registration via the codex mcp add CLI, and Marko skills distributed to .agents/skills/.

Prerequisites

  • Codex CLI installed: npm install -g @openai/codex
  • Authenticated: codex auth login
  • marko/devai installed (see Installation)

What devai:install writes

Running marko devai:install with Codex detected produces the following:

AGENTS.md                          # Project guidelines for Codex
.agents/skills/                    # Marko skill files distributed for Codex

MCP registration is performed via the Codex CLI (codex mcp add) rather than by writing a config file.

AGENTS.md

The root AGENTS.md receives Marko project guidelines inside a <!-- BEGIN/END marko:devai --> marker block: created if absent, and on later runs only the marked region is refreshed, so anything you add outside the markers is preserved. Remove the markers to take full ownership — devai then leaves the file alone (see Editing generated files). It contains:

  • Marko module conventions and project structure overview
  • Available MCP tools and their descriptions
  • Project-specific guidelines from every installed package's resources/ai/guidelines.md

MCP registration

The installer calls codex mcp add <serverName> -- <command> [args] to register marko mcp:serve as an MCP server. Codex stores this registration in its own configuration; no .codex/mcp.json file is written by devai:install.

Skills

Marko skill bundles are written to .agents/skills/ so Codex can reference them during agentic tasks.

Manual verification

  1. Open a terminal in your project root.
  2. Run codex "What Marko MCP tools are available?" — Codex should list the registered tools from marko/mcp.
  3. Run codex "Search docs for routing" — the search_docs tool should return Marko documentation results.
  4. Verify AGENTS.md exists in the project root and .agents/skills/ contains skill files.

Read the full file on GitHub · 58 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 58 lines · 27 tokens per session scan A 9485c4d3889c

Subscribe to this mod's changes

codex is an agent published in the GitHub repository marko-php/marko (393 stars, last pushed 3d ago), licensed MIT. It adds 27 tokens to every session and 731 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.