Codex CLI (clawcode)
SkillProductivityDelegate coding tasks to the OpenAI Codex CLI for features, refactoring, PR reviews, and batch fixes. Requires the codex CLI and typically a git repository.
Available today. Use it from your connected AI after setup.
No other account needed.
Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
Then ask your AI: use the Codex CLI (clawcode) skill
What this skill tells your AI
The instructions your AI receives, as published by deepelementlab/clawcode in clawcode/plugin/builtin_plugins/clawcode-skills/skills/codex/SKILL.md and read by ahel’s review.
Use OpenAI Codex as an external coding agent when the user wants Codex specifically.
Do not confuse these entry points (they are not interchangeable):
| Entry | Role |
|---|---|
/codex-cli (TUI slash) | One-shot probe or command via codex_cli_bridge: merged stdout/stderr, not a PTY session and not multi-turn TUI control. Default args often --version. |
bash | One-shot shell in agent turns, e.g. codex exec '…'. |
terminal + process (Agent tools) | Multi-turn driving of Codex: terminal with background=true (and pty=true on POSIX with clawcode[terminal-pty]), then process for poll / submit / kill. Codex expects a git repo; for scratch dirs use mktemp -d && git init. Windows local PTY is limited—full TUI automation use WSL/Linux. |
Optional: pip install 'clawcode[terminal-pty]' for ptyprocess on POSIX.
Prerequisites
- Install Codex:
npm install -g @openai/codex(command namecodexonPATH). - Configure OpenAI credentials per Codex docs (API key / auth).
- Git repository — many Codex flows refuse to run outside a repo; use a temp dir +
git initfor greenfield scratch.
When to use
- User asks for Codex or
codexexplicitly. - You need a bounded task: prefer
codex exec '...'via bash in the project workspace. - Quick install check:
/codex-cliafter/claw(defaultcodex --version); same terminal stack as/claude-cli//opencode-cli.
clawcode-specific capabilities
| Goal | What to use |
|---|---|
| Quick probe | /codex-cli only—single run, not multi-run TUI. |
| One-shot exec | bash or terminal foreground: codex exec 'task' with working_directory in a git repo. |
| Long / background | terminal (background=true, pty=true where supported) + process. Optional check_interval on terminal for TUI completion notifications (see CLAW_SUPPORT_MAP.md). |
One-shot examples (foreground)
terminal(command="codex exec 'Add dark mode toggle to settings'", workdir="~/project", pty=true)
Scratch with new repo:
terminal(command="cd $(mktemp -d) && git init && codex exec 'Build a snake game in Python'", pty=true)
Background mode
terminal(command="codex exec --full-auto 'Refactor the auth module'", workdir="~/project", background=true, pty=true)
process(action="poll", session_id="<id>")
process(action="log", session_id="<id>")
process(action="submit", session_id="<id>", data="yes")
process(action="kill", session_id="<id>")
Key flags (Codex upstream)
| Flag | Effect |
|---|---|
exec "prompt" | One-shot run, exits when done |
--full-auto | Sandboxed; auto-approves file changes in workspace |
--yolo | No sandbox (dangerous; use with care) |
Rules
- Prefer
pty=truefor interactive Codex sessions on POSIX; without PTY many CLIs misbehave. - Respect git repo requirements; document when you create a throwaway repo.
/codex-clidoes not replaceterminal/processfor long interactive work.
Signals
- GitHub stars
- 163
- Forks
- 50
- Last commit
- May 2026
ahel review
K1binfo
installs-packages
Automated review, not a security audit. Ruleset v1+k2.
Advanced
- Item type
- skill
- Key
codex-deepelementlab- Source
- github.com/deepelementlab/clawcode