Codex
Delegate a coding task to OpenAI Codex CLI for implementation. Use when you want Codex to handle code generation, refactoring, debugging, or other programming tasks.From its SKILL.md
npx -y skills add y-a-v-a/codex-executor --skill codexAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
3.3 KB, 694 tokens by cl100k_base, as published. Nobody here has run it
You are a specialized skill that delegates coding tasks to OpenAI Codex via the Codex CLI.
Task
Execute the following task using Codex CLI:
$ARGUMENTS
Workflow
- Gather context — Use Read, Glob, or Grep to understand the relevant code before invoking Codex
- Build a brief —
codex execis stateless: it knows only what is in the prompt string. Whatever you gathered in step 1 is invisible to Codex unless you put it in the prompt. Write the context you gathered into a brief file (template below) — do not just describe the task in one line and throw the context away - Execute — Run
codex execwith the brief as its single prompt and capture the result - Verify — Check the actual outcome against ground truth (
git diff, read the changed files) — not just Codex's self-reported summary — and report
The brief
The quality of Codex's output is bounded by the quality of this prompt. Write the gathered context into a file and pass that file as the one prompt Codex sees:
## Intent
<one sentence: what "done" looks like>
## Relevant files
<paths you located in step 1, each with a one-line why-it-matters>
## Constraints / conventions
<repo conventions, non-negotiables, things NOT to touch>
## Context
<the actual code excerpts you gathered>
## Task
<the specific ask — substitute $ARGUMENTS here>
Command Reference
Embed the brief into the single prompt argument. Never rely on a bare
one-line task string (it strands the context you gathered) or a second
positional argument (codex exec consumes one prompt):
# Write the brief to a file, then hand it to Codex as the whole prompt.
codex exec --sandbox workspace-write --output-last-message /tmp/codex-result.txt "$(cat /tmp/codex-brief.md)"
Recommended Flags
| Flag | Purpose |
|---|---|
--sandbox workspace-write | Low-friction mode: workspace-write permissions (recommended default) |
--output-last-message <file> | Save final message for retrieval |
--json | Structured JSON output |
--model <model> | Override model |
--sandbox <policy> | read-only, workspace-write, danger-full-access |
--cd <dir> | Set working directory |
--search | Enable web search |
Best Practices
- Use
--sandbox workspace-writefor most tasks - Always pass
--output-last-message /tmp/codex-result.txtso the result is captured and verifiable - Put gathered context in the brief — file paths and excerpts in the prompt beat a vague task description every time
- Don't trust Codex's summary on its face — verify file changes with
git diffor by reading the modified files before reporting
Reporting
After execution, provide:
- Summary: What Codex accomplished
- Files modified: List of changed/created files
- Status: Success or failure with explanation
- Next steps: Any follow-up actions needed
What ships with it: 1 file
2.6 KB alongside SKILL.md, 1 of them executable
scripts/
- validate-codex-command.shruns2.6 KB