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.
npx agentmods add commands/ching-kuo/claude-codex/plan-codexgit clone --depth 1 https://github.com/ching-kuo/claude-codexWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00013 | $0.00717 |
| Opus 5 | $0.00006 | $0.00358 |
| Sonnet 5 | $0.00003 | $0.00143 |
| Haiku 4.5 | $0.00001 | $0.00072 |
Grade A, and why
plan-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.
How it starts
The opening of the file, as written. The whole thing — 74 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Deprecated: This command has been converted to a skill (
/plan-codex). The skill version is recommended for new usage and supports eval-based testing. This command is retained for backward compatibility (model pinning, tool restrictions).
Plan-Codex — Claude Plans, Codex Audits
$ARGUMENTS
Core Protocols
- Code Sovereignty: Codex has zero filesystem write access during planning — all file operations by Claude only
- Stop-Loss: Do not proceed to next phase until current phase output is validated
- Language: Use English when calling tools/models; communicate with user in their language
- Planning Only: Never modify production code during this command
Execution Workflow
Phase 1: Plan Creation
Launch a Task agent (subagent_type: "Plan") with the task description. The Plan agent will research the codebase and return a structured implementation plan.
If requirements are ambiguous before launching the planner, ask clarifying questions first.
Save the returned plan to .claude/plan/<feature-name>.md.
Phase 2: Codex Audit Loop (max 3 iterations)
Read ~/.claude/prompts/codex/analyzer.md and inject as developer-instructions.
Call mcp__codex__codex (iteration 1):
- prompt: "Read the plan file at
.claude/plan/<feature-name>.mdand audit it for correctness, completeness, security, and edge cases. Reply APPROVED if solid, or list specific issues to fix." - sandbox: "read-only"
- approval-policy: "never"
- developer-instructions: {content of ~/.claude/prompts/codex/analyzer.md} + "\nBe concise. Output result only, no reasoning process."
Save the returned threadId.
Parse response:
- Contains "APPROVED" → update
.claude/plan/<feature-name>.mdwith final version, go to Phase 3 - Contains issues → address every issue, revise plan, update
.claude/plan/<feature-name>.md
Call mcp__codex__codex-reply (iterations 2-3):
- threadId: {saved threadId}
- prompt: "The plan has been revised to address your feedback. Re-read the plan file at
.claude/plan/<feature-name>.mdand audit it again for correctness, completeness, security, and edge cases. Reply APPROVED if solid, or list specific issues to fix."
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.
- 2d ago First seen · 74 lines · 13 tokens per session scan A d77c3f513959
plan-codex is a command published in the GitHub repository ching-kuo/claude-codex (23 stars, last pushed 5mo ago), licensed MIT. It adds 13 tokens to every session and 717 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.
Other commands, from other repositories
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
constitution
Create or update the project constitution from interactive or provided principle inputs.