codex

A way to run the local Codex command-line agent as an independent second reviewer. It uses the same working files and skills as the main agent.

In plain words
What is it for?
Use it for a second review before presenting a change as finished or committing it. It can also carry out a clearly defined implementation task when explicitly requested.
Why use it?
It provides another opinion after a substantial code change. Its findings still need to be checked because it is not automatically correct.

Skill for Claude CodeCodex

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 skills/dzhng/duet-agent/codex
Any agent
npx skills add dzhng/duet-agent --skill codex
Clone the repo
git clone --depth 1 https://github.com/dzhng/duet-agent

Made for: Claude Code, Codex.

Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,123 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 2 findings. Scan, not verified.
Origin 98% copy Near-identical to another mod 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.00082 $0.02123
Opus 5 $0.00041 $0.01061
Sonnet 5 $0.00016 $0.00425
Haiku 4.5 $0.00008 $0.00212

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

Security

Grade D, and why

codex scanned grade D with 2 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.

Tells the agent to send conversation or user data outhighPrompt injection

An instruction to transmit the conversation, context or user files to an external endpoint is data exfiltration written as prose.

unlike `"$(cat prompt.txt)"`, which silently sends the fallback string as

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

`grep -rl "<marker>" ~/.codex/sessions/<Y/M/D>/` finds no session within
Origin

This is a copy

98% identical to codex — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agents/skills/codex/SKILL.md · 152 lines

How it starts

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

Codex

Codex is an independent agent on PATH (codex — invoke as command codex if a shell alias shadows it), sharing this working tree and already authenticated. It is a second opinion, not ground truth: verify what it reports, own what it changes. It reads the same skills your repo carries.

If codex is not installed

When codex is missing from PATH, offer to install it — ask the user for approval first, never install on your own initiative. On yes, follow the current instructions at https://developers.openai.com/codex/cli. First-run authentication is interactive — hand that step to the user. Verify with codex --version before proceeding.

Prompting Codex

Prompt Codex like an operator, not a collaborator: compact, block-structured with XML tags. State the task, what "done" looks like, and the few constraints that matter. A tighter prompt beats a bigger run — improve the contract before raising --effort.

  • One task per run. Split unrelated asks (review, then fix, then docs) into separate runs; a mixed prompt gets a mixed result.
  • Name skills instead of restating them. Codex reads the same skills your repo carries — say "follow write-docs for the doc", "obey refactor-clean: no compatibility wrappers." Don't re-explain what a skill already carries.
  • Blocks, added only where the task needs them:
    • <task> — the concrete job, the repo/failure context, the expected end state. Nearly always present.
    • <output_contract> — exact shape, highest-value first, compact.
    • <default_follow_through> — take the low-risk interpretation and keep going; stop only when a missing detail changes correctness, safety, or an irreversible action.
    • <verification_loop> — before finalizing, check the result against the requirements and the changed files; revise rather than ship the first draft. Any risky fix.
    • <grounding> — ground every claim in code or tool output; label inferences as inferences. Review and research.
    • <action_safety> — keep the diff tightly scoped; no drive-by refactors. Write tasks.
  • Anti-patterns: vague framing ("take a look"), no output contract ("report back"), "think harder" in place of a contract, mixing jobs in one run, and demanding certainty the evidence can't support.

Read the full file on GitHub · 152 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 · 152 lines · 82 tokens per session scan D b815780ba1d5

Subscribe to this mod's changes

codex is a skill published in the GitHub repository dzhng/duet-agent (42 stars, last pushed 3d ago), licensed Apache-2.0. It adds 82 tokens to every session and 2,123 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it D with 2 findings (tells the agent to send conversation or user data out, reads agent configuration directories). It is 98% identical to codex, differing in 2 lines, and is treated as a copy.

Related

Other skills, from other repositories