codex-cli
What it does
This skill shows the AI how to run Codex in non-interactive mode as a helper for coding, analysis, or review. It is for developers who want another model to carry out or check a task.
When to use it
- βWhen you want to delegate a coding or refactoring task to Codex and get the result back.
- βWhen you want a second model to review your changes and point out problems.
- βWhen you want to run a long, repetitive coding job while you keep planning the work.
Skill link
https://github.com/kortix-ai/suna/blob/dev/.agents/skills/codex-cli/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βHand this refactor to Codex and tell me what it changed so I can check it.β
5 new skills a week. 1 minute to read.
How it works
The AI writes a clear task, runs codex exec in a chosen folder with a sandbox setting, saves the final message to a file, and then checks the changed files and tests itself.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
The golden rule: Codex's self-report is a claim, not the truth. Always capture its output, then independently verify the artifacts yourself (read the files, re-run the tests) before treating the task as done.
Verified available on this machine: codex-cli 0.137.0, logged in via ChatGPT
(no API key needed). Confirm with codex login status.
</overview>
codex exec \
--cd <workdir> \
--sandbox <read-only|workspace-write|danger-full-access> \
-o /tmp/codex_<rand>.txt \
"your metaprompt here" 2>>/tmp/codex_<rand>.log
- Prompt as the final arg, OR pipe via stdin:
echo "$PROMPT" | codex exec -(good for long/generated prompts). If both are given, stdin is appended. -o, --output-last-message <file>β writes ONLY Codex's final message to a file. This is your clean capture; read it back, don't scrape the TUI stream.2>>/tmp/...logβ Codex streams progress/reasoning to stderr; the final message goes to stdout. Redirect stderr to a log so it doesn't bloat your context. Generate the suffix withopenssl rand -hex 4.--cd <dir>β Codex's working root. Scope it to the relevant subdir (e.g.apps/api), not the whole monorepo, so it stays focused.--skip-git-repo-checkβ only needed when running outside a git repo.</the-core-command>
read-only(default) β Codex can read/grep/run read-only commands but cannot edit files or hit the network. Use for review, analysis, planning, "find the bug", second opinions.workspace-writeβ can edit files in--cd(and--add-dirpaths) and run commands, but no network by default. Use for real implementation/refactors.danger-full-accessβ no sandbox at all. Avoid; only for throwaway/ephemeral dirs you fully control.
Approvals: in exec mode Codex does not prompt for approvals. For a fully
autonomous run with no gating at all, add
--dangerously-bypass-approvals-and-sandbox. This is powerful β only use it when
the user has explicitly authorized autonomous edits AND the --cd is scoped, or
when running in an already-sandboxed/throwaway dir. When unsure, ask the user
which sandbox tier before running with write access.
</sandbox-tiers>
codex exec resume --last "now also update the tests" # most recent session
codex exec resume <session-id> "..." # a specific one
The session id is printed at the start of each exec run. Use resume for
multi-turn delegation (draft β refine β fix) instead of re-sending all context.
</session-resume>
FAQ
Does Codex get full access to my computer?
No. It works within a sandbox level set for each run, such as read-only or workspace-write.
Do I need an OpenAI API key?
The skill says a ChatGPT login is enough, and it can be checked with the codex login status command.
Should I trust Codex's report?
No. The skill says its self-report is a claim, so the AI should verify the files and re-run tests itself.
Details
Original description by the author
Drive OpenAI's Codex CLI (`codex exec`) as a non-interactive coding sub-agent from inside Claude Code. Load WHENEVER you want to delegate a coding/analysis/refactor task to Codex, get a second opinion / adversarial review from another model, fan out parallel agents across files or worktrees, or run a long mechanical job while you stay the planner. Covers the exact `codex exec` flags, sandbox tiers, output capture, JSON/schema modes, session resume, parallel fan-out, and the mandatory "delegate β capture β independently verify, never trust the self-report" supervision loop.
repo: kortix-ai/suna
Popularity
- GitHub stars
- 20k
- Ranking position
- #10371
- License
- β
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
claude-code
20kLets your agent hand a coding, review, or planning task to Anthropic's Claude Code CLI and capture the result so it can be checked.
commit-dis
20kLets your agent save only the changes made in this chat as one commit on your current Git branch, without pushing or creating a new branch.
composio
20kHelps your agent use Composio to connect apps like Gmail, Slack, GitHub, and Notion, for your own agent or for a product you build.
e2e
20kTeaches your agent to write end-to-end tests that drive a web or mobile app with plain-language goals and exact checks.
Similar skills
add-model-provider
394kLets your agent connect a new AI model provider to OpenClaw using safe setup commands, keep API keys out of plain text, and run a live test.
acp-router
394kHelps your agent send a task to a coding assistant such as Claude Code or Cursor through OpenClaw, so the work runs in that tool.
browser-automation
394kTeaches your agent to control web pages step by step, including logins, tabs, and recovery when a page stops responding.