A claude code skill to delegate prompts to codex
# Add to your Claude Code skills
git clone https://github.com/skills-directory/skill-codexAskUserQuestion) which model to run (gpt-5.2-codex or gpt-5.2) AND which reasoning effort to use (xhigh, high, medium, or low) in a single prompt with two questions.--sandbox read-only unless edits or network access are necessary.-m, --model <MODEL>--config model_reasoning_effort="<xhigh|high|medium|low>"--sandbox <read-only|workspace-write|danger-full-access>--full-auto-C, --cd <DIR>--skip-git-repo-checkcodex exec --skip-git-repo-check resume --last via stdin. When resuming don't use any configuration flags unless explicitly requested by the user e.g. if he species the model or the reasoning effort when requesting to resume a session. Resume syntax: echo "your prompt here" | codex exec --skip-git-repo-check resume --last 2>/dev/null. All flags have to be inserted between exec and resume.2>/dev/null to all codex exec commands to suppress thinking tokens (stderr). Only show stderr if the user explicitly requests to see thinking tokens or if debugging is needed.| Use case | Sandbox mode | Key flags | | --- | --- | --- | | Read-only review or analysis | | | | Apply local edits | | | | Permit network or broad access | | | | Resume recent session | Inherited from original | (no flags allowed) | | Run from another directory | Match task needs | plus other flags |
Leave a star ⭐ if you like it 😘
Enable Claude Code to invoke the Codex CLI (codex exec and session resumes) for automated code analysis, refactoring, and editing workflows.
codex CLI installed and available on PATH.codex --version; resolve any errors before using the skill.Download this repo and store the skill in ~/.claude/skills/codex
git clone --depth 1 git@github.com:skills-directory/skill-codex.git /tmp/skills-temp && \
mkdir -p ~/.claude/skills && \
cp -r /tmp/skills-temp/ ~/.claude/skills/codex && \
rm -rf /tmp/skills-temp
By default, this skill suppresses thinking tokens (stderr output) using 2>/dev/null to avoid bloating Claude Code's context window. If you want to see the thinking tokens for debugging or insight into Codex's reasoning process, explicitly ask Claude to show them.
User prompt:
Use codex to analyze this repository and suggest improvements for my claude code skill.
Claude Code response: Claude will activate the Codex skill and:
gpt-5 or gpt-5-codex) unless already specified in your prompt.read-only--sandbox read-only 2>/dev/nullworkspace-write--sandbox workspace-write --full-auto 2>/dev/nulldanger-full-access--sandbox danger-full-access --full-auto 2>/dev/nullecho "prompt" \| codex exec --skip-git-repo-check resume --last 2>/dev/null-C <DIR>2>/dev/nullcodex command, immediately use AskUserQuestion to confirm next steps, collect clarifications, or decide whether to resume with codex exec resume --last.echo "new prompt" | codex exec resume --last 2>/dev/null. The resumed session automatically uses the same model, reasoning effort, and sandbox mode from the original session.codex --version or a codex exec command exits non-zero; request direction before retrying.--full-auto, --sandbox danger-full-access, --skip-git-repo-check) ask the user for permission using AskUserQuestion unless it was already given.AskUserQuestion.lowmediumhighread-only for analysis)codex exec -m gpt-5-codex \
--config model_reasoning_effort="high" \
--sandbox read-only \
--full-auto \
--skip-git-repo-check \
"Analyze this Claude Code skill repository comprehensively..." 2>/dev/null
Result: Claude will summarize the Codex analysis output, highlighting key suggestions and asking if you'd like to continue with follow-up actions.
See SKILL.md for complete operational instructions, CLI options, and workflow guidance.