Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

cli-codex

FreeNo executable scriptsNot checked

Codex CLI executor for OpenAI-backed coding, repo analysis, PR review, web research, and cross-model validation.

MichelKerkmeesterby MichelKerkmeester★ 40 GitHub stars

About this skill

Codex CLI Orchestrator - Cross-AI Task Delegation

CRITICAL — SELF-INVOCATION PROHIBITED

This skill dispatches to the OpenAI CLI binary (codex). If the agent currently reading this skill is itself running inside Codex (detection signals listed in the self-invocation guard in ROUTER.md), the skill MUST refuse to load and return the documented error message instead of generating any codex invocation.

A running CLI skill never dispatches itself. The cli-X skills are for cross-AI delegation only — never self-invocation.

Orchestrate OpenAI's Codex CLI for tasks that benefit from a second AI perspective, real-time web search, deep codebase analysis, built-in code review workflows, or parallel code generation.

Core Principle: Use Codex for what it does best. Delegate, validate, integrate. The calling AI stays the conductor.


1. WHEN TO USE

Activation Triggers

  • Cross-AI Validation — code review second perspective, security audit alternative analysis, bug detection, /review diff-aware workflow.
  • Web Research — current internet info via the top-level --search flag (codex --search exec …), latest library versions, API changes, community solutions.
  • Codebase Architecture Analysis — onboarding to unfamiliar codebases, cross-file dependency mapping, architecture docs from code.
  • Parallel Task Processing — offloading generation, simultaneous code generations, background docs/test generation.
  • Agent-Delegated Tasks — specialized profile matches (.codex/agents/*.toml), session management (resume, fork), multi-strategy planning.
  • Specialized Generation — explicit Codex requests, test suite generation, code translation, batch docs (JSDoc, README, API), visual input via --image/-i.

When NOT to Use

  • You ARE Codex already. If your runtime is Codex (detection signal: $CODEX_SESSION_ID or any CODEX_* env var set, codex in process ancestry, or ~/.codex/state/<id>/lock present), this skill refuses to load. Self-invocation creates a circular dispatch loop and burns tokens for no value.
  • Simple, quick tasks where CLI overhead is not worth it, or tasks needing an immediate response (rate limits may delay).
  • Context already loaded and understood by the current agent.
  • Interactive refinement requiring the full-screen TUI (use codex directly instead).
  • Tasks where Codex CLI is not installed.

2. SMART ROUTING

The cli-external-orchestration hub routes an OpenAI dispatch here: the prompt names Codex, the Codex CLI, codex exec or a web-research or second-opinion handoff, and the hub's cli-codex mode signal selects this packet. A session already running inside Codex never routes here; the self-invocation guard refuses it. The hub ROUTER.md names the two leaves a dispatch starts from. Inside this packet the ALWAYS tier loads first: references/cli-reference.md for the subcommands, flags and sandbox modes, and assets/prompt-quality-card.md for the fast-path prompt framework. Intent-mapped references load after those, one set per intent. Read ROUTER.md before selecting skill-local resources; open only the matched files. Keep every path inside this skill folder, and load a file only when it exists. When nothing matches, report UNKNOWN_FALLBACK with the checklist from the machine router instead of guessing.


3. HOW IT WORKS

Prerequisites

Install with npm i -g @openai/codex, or with brew install --cask codex. cli-codex authenticates through ChatGPT OAuth only. Run codex login and complete the browser flow, which requires a ChatGPT Plus/Pro/Business/Edu/Enterprise account. The skill does not use an OpenAI API key. The ALWAYS-loaded cli-reference.md holds the full install, auth, flag, sandbox, session and troubleshooting tables. This section keeps only the routing decisions and dispatch-critical gotchas.

Execution Ownership

This packet owns user-facing routing, the command -v codex availability probe, prompt construction, and the self-invocation guard. Research and review lineages delegate process construction and execution to the already-shipped deep-loop runtime at ../../system-deep-loop/runtime/scripts/fanout-run.cjs, using executor kind cli-codex. That runner accepts only the research and review loop types, so a single build or doc dispatch uses the child dispatch envelope in providers-and-models.md §5.

The runtime is the single Codex execution adapter. Do not add a packet-local wrapper, command builder, or spawn path. Direct codex exec snippets below are operator reference and manual-testing examples; research and review lineages use the shared runtime, and a one-shot dispatch uses the child envelope.

Provider Auth Pre-Flight (ChatGPT OAuth)

MANDATORY before any first dispatch in a session. cli-codex authenticates through ChatGPT OAuth only

Full SKILL.md on GitHub

Install cli-codex in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

Bash
Read
Glob
Grep

Bundled files

README.mdROUTER.mdassets/prompt-quality-card.mdassets/prompt-templates.mdbenchmark/reports/2026-08-08--manual-testing-playbook--agent-routing-2/README.mdbenchmark/reports/2026-08-08--manual-testing-playbook--agent-routing-2/failed-runs.mdbenchmark/reports/2026-08-08--manual-testing-playbook--agent-routing-2/findings-and-recommendations.mdbenchmark/reports/2026-08-08--manual-testing-playbook--agent-routing-2/results.csvbenchmark/reports/2026-08-08--manual-testing-playbook--agent-routing-2/skill-benchmark-report.jsonbenchmark/reports/2026-08-08--manual-testing-playbook--agent-routing-2/skill-benchmark-report.mdbenchmark/reports/2026-08-08--manual-testing-playbook--agent-routing-2/source.mdbenchmark/reports/2026-08-08--manual-testing-playbook--agent-routing-3/README.mdbenchmark/reports/2026-08-08--manual-testing-playbook--agent-routing-3/failed-runs.mdbenchmark/reports/2026-08-08--manual-testing-playbook--agent-routing-3/findings-and-recommendations.mdbenchmark/reports/2026-08-08--manual-testing-playbook--agent-routing-3/results.csvbenchmark/reports/2026-08-08--manual-testing-playbook--agent-routing-3/skill-benchmark-report.jsonbenchmark/reports/2026-08-08--manual-testing-playbook--agent-routing-3/skill-benchmark-report.mdbenchmark/reports/2026-08-08--manual-testing-playbook--agent-routing-3/source.mdbenchmark/reports/2026-08-08--manual-testing-playbook--agent-routing-4/README.mdbenchmark/reports/2026-08-08--manual-testing-playbook--agent-routing-4/failed-runs.mdbenchmark/reports/2026-08-08--manual-testing-playbook--agent-routing-4/findings-and-recommendations.mdbenchmark/reports/2026-08-08--manual-testing-playbook--agent-routing-4/results.csvbenchmark/reports/2026-08-08--manual-testing-playbook--agent-routing-4/skill-benchmark-report.jsonbenchmark/reports/2026-08-08--manual-testing-playbook--agent-routing-4/skill-benchmark-report.mdbenchmark/reports/2026-08-08--manual-testing-playbook--agent-routing-4/source.mdbenchmark/reports/2026-08-08--manual-testing-playbook--agent-routing/README.mdbenchmark/reports/2026-08-08--manual-testing-playbook--agent-routing/failed-runs.mdbenchmark/reports/2026-08-08--manual-testing-playbook--agent-routing/findings-and-recommendations.mdbenchmark/reports/2026-08-08--manual-testing-playbook--agent-routing/results.csvbenchmark/reports/2026-08-08--manual-testing-playbook--agent-routing/skill-benchmark-report.jsonbenchmark/reports/2026-08-08--manual-testing-playbook--agent-routing/skill-benchmark-report.mdbenchmark/reports/2026-08-08--manual-testing-playbook--agent-routing/source.mdbenchmark/reports/2026-08-08--manual-testing-playbook--built-in-tools/README.mdbenchmark/reports/2026-08-08--manual-testing-playbook--built-in-tools/failed-runs.mdbenchmark/reports/2026-08-08--manual-testing-playbook--built-in-tools/findings-and-recommendations.mdbenchmark/reports/2026-08-08--manual-testing-playbook--built-in-tools/results.csvbenchmark/reports/2026-08-08--manual-testing-playbook--built-in-tools/skill-benchmark-report.jsonbenchmark/reports/2026-08-08--manual-testing-playbook--built-in-tools/skill-benchmark-report.mdbenchmark/reports/2026-08-08--manual-testing-playbook--built-in-tools/source.mdbenchmark/reports/2026-08-08--manual-testing-playbook--cli-invocation/README.md

FAQ

What does the cli-codex skill do?

Codex CLI executor for OpenAI-backed coding, repo analysis, PR review, web research, and cross-model validation.

How do I install the cli-codex skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the cli-codex skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare cli-codex with