devbd1/skills · Archived

codex-cli-delegate

Delegate bounded work from another agent to the local Codex CLI.

First seen May 28, 2026

Installation

$ npx skills add devbd1/skills --skill codex-cli-delegate

Summary

  • Delegate bounded work from another agent to the local Codex CLI.
  • Use when the user or orchestrating agent asks to delegate work to Codex CLI, split workload across AI subscriptions, get a Codex second opinion, run Codex for planning, code review, research, large-context analysis, or explicit worktree-based implementation delegation.

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from devbd1/skills.

npx skills add devbd1/skills

Browse all from devbd1/skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 15
License MIT
Default branch main
Open issues 0
Status Archived

Skill metadata

Parsed from SKILL.md frontmatter.

LicenseMIT
Declared agents codex

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 3,678 B
  • docs SUMMARY.md 360 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 3 installs

SKILL.md

Codex CLI Delegate

Use Codex CLI as a secondary worker for another local agent. The orchestrating agent remains responsible for reviewing Codex output before acting on it.

Install

npx skills add DevBD1/skills --skill codex-cli-delegate

Default Rules

  • Prefer bounded non-interactive delegation through codex exec.
  • Default to read-only mode: codex --ask-for-approval never exec --sandbox read-only.
  • Resolve the wrapper relative to the installed skill directory, then run scripts/codex_delegate.py.
  • Do not use or pass through Codex's dangerous approval and sandbox bypass flag.
  • Do not treat Codex output as source of truth. Verify claims against files, commands, docs, or tests.
  • Do not let Codex make changes unless the user explicitly asks for implementation delegation.
  • For implementation delegation, require an isolated worktree and exact scope, allowed files, expected output, and validation commands in the prompt.

Task Routing

The wrapper accepts --task-class heavy|medium|simple as routing metadata. Pass --model only when the orchestrator has a specific Codex model preference; otherwise Codex uses its local config.

Task class Use for
heavy hard planning, architecture, complex debugging, difficult reviews, large-context analysis
medium normal coding tasks, medium analysis, web research, routine reviews
simple quick checks, small rewrites, simple summaries, trivial second opinions

Prefer medium when unsure.

Helper Script

Use the bundled wrapper for repeatable read-only calls:

python3 <skill-dir>/scripts/codex_delegate.py \
  --task-class medium \
  --prompt "Review this plan for missing risks."

Pipe context through stdin when useful:

git diff --staged | python3 <skill-dir>/scripts/codex_delegate.py \
  --task-class medium \
  --prompt "Review this diff. Return findings with file, line, risk, and fix."

The wrapper calls Codex roughly as:

codex --ask-for-approval never exec --sandbox read-only --output-last-message <tmp> "<prompt>"

For orchestrators, the wrapper returns JSON:

{
  "response": "Codex response text",
  "task_class": "medium",
  "mode": "plan",
  "cwd": "/path/to/workspace",
  "command": ["codex", "exec", "..."],
  "output_file": "/tmp/codex-delegate-..."
}

Implementation Delegation

Use implementation mode only when the user explicitly asks another agent to delegate code changes to Codex. The orchestrator should create or choose the isolated worktree before calling the wrapper.

python3 <skill-dir>/scripts/codex_delegate.py \
  --mode auto_edit \
  --worktree task-name \
  --cwd /path/to/worktree \
  --prompt "Implement only X in files A and B. Then run command Y and report the result."

In auto_edit mode, the wrapper uses:

codex --ask-for-approval never exec --sandbox workspace-write --output-last-message <tmp>

The orchestrator must inspect the diff and run validation after Codex completes.

Smoke Tests

codex --version
PYTHONPYCACHEPREFIX=/private/tmp/codex-delegate-pycache python3 -m py_compile <skill-dir>/scripts/codex_delegate.py
python3 <skill-dir>/scripts/codex_delegate.py --prompt "Return OK only." --timeout 120