plugins/cli-agents/skills/codex-cli-agent/SKILL.md
Codex CLI sub-agent for dispatching tasks to OpenAI-compatible models via the `codex` binary. Use for code-focused tasks routed to GPT-5 Codex or any OpenAI-compatible endpoint. Part of the run_agent.py multi-LLM task router — cli=codex target.
npx skillsauth add richfrem/agent-plugins-skills codex-cli-agentInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Dispatches bounded tasks to the Codex CLI (codex binary). Uses the run_agent.py task router with cli=codex.
[!IMPORTANT] Default model:
gpt-5-codex. RequiresOPENAI_API_KEYin environment. Thecodexbinary must be on PATH.
run_agent.pypython ./scripts/run_agent.py \
<PERSONA_FILE> <INPUT_FILE> <OUTPUT_FILE> "<INSTRUCTION>" \
--cli codex --model gpt-5-codex
The prompt is piped to codex exec via stdin — not passed as a positional arg — to avoid OS ARG_MAX limits and process listing exposure.
python ./scripts/run_agent.py \
agents/refactor-expert.md \
target.py \
refactor.md \
"Refactor this function and explain the top 3 changes." \
--cli codex
python ./scripts/run_agent.py \
agents/security-auditor.md \
target.py \
security.md \
"Find vulnerabilities. Rate severity: CRITICAL / MODERATE / MINOR." \
--cli codex --model gpt-4o
| Use Case | Why codex |
|----------|-----------|
| Code review / refactor | GPT-5 Codex is code-optimized |
| OpenAI endpoint routing | Use any OPENAI_BASE_URL-compatible target |
| Isolated sub-task to GPT-5 | No main agent context bleed |
agents/)| Persona | Use For |
|---------|---------|
| security-auditor.md | Red team, vulnerability scanning |
| refactor-expert.md | Code optimization, DRY, readability |
| architect-review.md | System design, modularity |
echo "Say hello in one sentence." | codex exec --model gpt-5-codex -
python ./scripts/run_agent.py agents/refactor-expert.md target.py output.md "Summarize this file." --cli codex
echo $OPENAI_API_KEY # must be set
which codex # must be on PATH
codex --version
codex exec --help # verify exec subcommand and available flags
testing
Skill for creating and managing isolated git worktrees (`.worktrees/issue-NNN`) for issue execution branches. USE ONLY when setting up or cleaning up isolated git worktrees for specific issue execution. DO NOT USE for managing local task files (use `task-agent`) or escalating tasks to issues (use `github-issue-backlog-agent`).
data-ai
Skill for orchestrating the end-to-end GitHub issue lifecycle flow: Issue -> Worktree -> Implementation -> PR Creation -> Resolution Closure. USE ONLY when running or dry-running full lifecycle orchestration for resolving an issue with a PR. DO NOT USE for isolated worktree management only (use `issue-worktree-agent`) or logging issues (use `github-issue-agent`).
tools
Automatically ranks GitHub issues (P0-P3) based on friction tier, frequency, and blockages, synchronizing priority labels and GitHub Projects v2 custom fields.
testing
Bridge skill for escalating ephemeral local task scratchpad items (`tasks/*.md`) into durable, taxonomy-validated, evidence-rich GitHub Issues. USE ONLY when promoting a single-session local task into durable repository backlog. DO NOT USE for managing local kanban boards (use `task-agent` instead) or directly querying/commenting on issues (use `github-issue-agent` instead).