codex-delegate
/codex-delegate
Delegate light/medium self-contained tasks (boilerplate, tests, docs, small refactors, single-feature edits, code review, research) to OpenAI Codex via headless `codex exec`. Use when a task is well-specified, bounded to a few files, and does not need this conversation's context. Skip for architecture, subtle bugs, or anything needing back-and-forth. Follow the delegate-skills level (low, medium, ultra) given in session context.
- Author
- joezhuo2 ↗
- Repository
- delegate-skills ↗
- Licence
- MIT
- Last repository change
- 11.11.2026
Assessment and security
- Files in this package
- 3
- Scripts
- 2
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 11.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
- 2 scripts in this package. Review them before installing, as Claude may execute them.
Scripts: codex-gate.ps1, codex-run.ps1
What it does and when to use it
Delegate light/medium self-contained tasks (boilerplate, tests, docs, small refactors, single-feature edits, code review, research) to OpenAI Codex via headless `codex exec`. Use when a task is well-specified, bounded to a few files, and does not need this conversation's context. Skip for architecture, subtle bugs, or anything needing back-and-forth. Follow the delegate-skills level (low, medium, ultra) given in session context.
Original author description
Delegate light/medium self-contained tasks (boilerplate, tests, docs, small refactors, single-feature edits, code review, research) to OpenAI Codex via headless `codex exec`. Use when a task is well-specified, bounded to a few files, and does not need this conversation's context. Skip for architecture, subtle bugs, or anything needing back-and-forth. Follow the delegate-skills level (low, medium, ultra) given in session context.
How it works
- Delegation level
- When to delegate
- Gate (automatic)
- Model choice (Claude decides, always medium effort)
- How
- Prompt template
- After Codex returns (mandatory)
- Rules
SKILL.md preview
--- name: codex-delegate description: Delegate light/medium self-contained tasks (boilerplate, tests, docs, small refactors, single-feature edits, code review, research) to OpenAI Codex via headless `codex exec`. Use when a task is well-specified, bounded to a few files, and does not need this conversation's context. Skip for architecture, subtle bugs, or anything needing back-and-forth. Follow the delegate-skills level (low, medium, ultra) given in session context. --- # codex-delegate Offload bounded work to Codex. Claude stays orchestrator and reviewer. ## Delegation level Set with `/delegate low|medium|ultra` (default `medium`); a SessionStart hook prints the saved level into each session. - `low`: delegate only when the user explicitly asks. - `medium`: delegate when the task fits the rules below. - `ultra`: prefer delegating over doing the work yourself; while the `claude` part is enabled, choose between this worker and a Claude subagent per task (see `claude-delegate`), otherwise prefer this worker over Claude subagents. Delegate anything a worker can do; keep orchestration, review and work no worker can do. Fall back only when gates block or the worker fails. ## When to delegate Delegate when ALL hold: - Spec fits in one self-contained prompt (no need for this chat's history). - Touches roughly 1-5 files. - Verifiable by a command (tests, build, lint) or by reading the diff. - Not security-sensitive, not architecture, not a subtle/concurrency bug. Good fits: test suites, boilerplate, docs/README, mechanical refactors, small features with clear spec, second-opinion review, codebase Q&A. Keep in Claude: design decisions, ambiguous requirements, cross-repo changes, debugging that needs iteration. ## Gate (automatic) `codex-run.ps1` runs `codex-gate.ps1` first. It blocks (exit 3, `GATE_BLOCKED: <why>`) unless the Codex login is on the **plus** plan and neither the 5h nor weekly window is >= 95% used (read from the newest `~/.codex/sessions` rate_limits entry; a window past its reset counts as 0%). On block: do the task yourself or with a normal subagent. Do not retry in a loop. Check without running: `& "<skill dir>\codex-gate.ps1"`. ## Model choice (Claude decides, always medium effort) - `gpt-6.1-sol` (default): routine work: tests, boilerplate, docs, mechanical refactors, small clear features, reviews. - `gpt-6-astra`: harder medium work: several interacting files, some ambiguity, tricky logic. Costs more usage; if the task needs more than this, keep it in Claude. Pass with `-Model gpt-6-astra`. ## How Run the wrapper (PowerShell). The scripts sit next to this SKILL.md; use this skill's base directory as `<skill dir>`: ```powershell & "<skill dir>\codex-run.ps1" -Prompt "<task>" -Cwd "<project dir>" [-Write] [-Model gpt-6.1-sol|gpt-6-astra] [-TimeoutSec 600] ``` - Default is read-only sandbox (review, research, analysis). - `-Write` = `workspace-write` sandbox: Codex may edit files inside `-Cwd` only. - Long jobs: run with `run_in_background` and wait for the notification. - Output = Codex's final message. On failure prints `CODEX_FAILED` / `CODEX_TIMEOUT` plus stderr tail. ## Prompt template Codex has no access to this conversation. Include: 1. Goal (one sentence). 2. Exact files/dirs in scope, and what NOT to touch. 3. Conventions to follow (point at an example file). 4. Done criteria + verify command (e.g. `npm test`). 5. "Do not commit. Report changed files and anything unverified." ## After Codex returns (mandatory) 1. `git diff` / `git status` in the project. Read the diff. 2. Re-run the verify command yourself. Do not trust Codex's "tests pass." 3. Fix small issues directly; for big misses, re-delegate with sharper prompt or take over. 4. Tell the user what Codex did and what you verified. ## Rules - Never delegate with secrets in the prompt. - Never pass `--dangerously-bypass-approvals-and-sandbox`; wrapper never uses it. - Codex edits are uncommitted; Claude owns commits. - One Codex job per file set at a time; no parallel writers on same files. - If `codex.exe` missing: `~/.codex/.sandbox-bin/codex.exe` ships with the Codex desktop app; reinstall the app.
Files in this package (3)
- SKILL.md 4 KB
- codex-gate.ps1 2 KB
- codex-run.ps1 2 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · joezhuo2/delegate-skills | 100 | MIT |
| FrancoStino/opencode-skills-collection | 100 | MIT |
| kachofugetsu09/akashic-agent | 100 | MIT |
| wenyuchiou/codex-delegate | 100 | MIT |
| sickn33/agentic-awesome-skills | 100 | MIT |
| kcng0/cc-codex-run | 100 | MIT |
| amelnagdy/delegate-skills | 100 | MIT |
| smk-labs/claude-plugins | 100 | MIT |
| Song-Sungyoub/claude-codex-delegate | 95 | MIT |
Database snapshot: 13.11.2026 · package version 63fc951f64f4 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100qwen-delegate
Delegate a self-contained task to Qwen Code CLI as an extra worker beside normal subagents. Use when a task is well-specified, bounded, and can run headless (implementation, tests, docs, reviews, research), and Qwen Code is installed and signed in. Follow the delegate-skills… - 100gemini-delegate
Delegate a self-contained task to Google Gemini CLI as an extra worker beside normal subagents. Use when a task is well-specified, bounded, and can run headless (implementation, tests, docs, reviews, research), and the Gemini CLI is installed and signed in. Follow the… - 100codex
Use the local Codex CLI as an independent second agent. Two branches — (1) proactively run `codex review` for a second opinion after completing a substantive change, before presenting it as done or committing; (2) delegate a well-defined implementation task via `codex exec`,… - 100local-codex
Launches and manages the local OpenAI Codex CLI as a non-interactive coding sub-agent via ChatGPT OAuth, never API keys. Use to delegate coding tasks to Codex, run codex exec, generate or refactor code, or get a Codex code review; phrases like 'codex', 'run codex', 'codex exec', 'delegate to codex'. - 95codex-exec
Run OpenAI Codex CLI non-interactively to execute tasks, generate code, or get a second opinion. Use this skill whenever the user says "run codex", "ask codex", "codex exec", "have codex do", "send to codex", "pipe to codex", or wants to delegate a task to Codex for a second… - 100codex-cli
Use when an agent needs to delegate a task to the OpenAI Codex CLI from another agent environment such as Claude Code, OpenClaw, or similar. Covers checking whether Codex CLI is installed, running one-off Codex prompts with `codex exec`, resuming sessions, collecting outputs,…