codex-delegation

codex-delegation is a skill for Claude Code, Codex from zebbern/agent-collab. It costs 74 tokens per session (1,253 once invoked), scanned A, original, Apache-2.0.

A set of instructions for asking a separate Codex process to handle substantial coding work or provide an independent review in the background.

In plain words
What is it for?
Delegating security or architecture reviews, adversarial checks, broad implementations, and independent second opinions on meaningful code changes.
Why use it?
It gives you another pass on risky changes or lets implementation proceed while other work continues.

Skill for Claude CodeCodex

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the codex plugin — 4 skills, 11 commands, 1 agent, 3 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/zebbern/agent-collab/codex-delegation
Any agent
npx skills add zebbern/agent-collab --skill codex-delegation
Clone the repo
git clone --depth 1 https://github.com/zebbern/agent-collab

Made for: Claude Code, Codex.

Or install codex, the plugin that ships this one along with the rest of its 4 skills, 11 commands, 1 agent, 3 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for codex-delegation

README.md
[![agentmods](https://agentmods.dev/badge/skills/zebbern/agent-collab/codex-delegation.svg)](https://agentmods.dev/skills/zebbern/agent-collab/codex-delegation)
Your own site
<a href="https://agentmods.dev/skills/zebbern/agent-collab/codex-delegation"><img src="https://agentmods.dev/badge/skills/zebbern/agent-collab/codex-delegation.svg" alt="Measured on agentmods" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,253 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00074 $0.01253
Opus 5 $0.00037 $0.00626
Sonnet 5 $0.00015 $0.00251
Haiku 4.5 $0.00007 $0.00125

Measured 4d ago against content hash d39d77ea89d6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

codex-delegation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/codex/skills/codex-delegation/SKILL.md · 88 lines

How it starts

The opening of the file, as written. The whole thing — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Codex Delegation

This skill is the policy and the loop for delegating work to Codex without a /codex:* command. Presenting output stays governed by the codex-result-handling skill; prompt shape stays governed by the gpt-5-4-prompting skill. Do not duplicate either — defer to them.

When to delegate — and when not

  • Delegate when an independent deep pass adds real value: a second opinion on a risky change, security or architecture analysis, an adversarial review of a substantive diff, or an implementation that can run in parallel while the session continues on something else.
  • Keep trivial work local. A rename, a one-file edit, a question Claude can answer directly — spawning a background agent there is overhead, not help.
  • Bench evidence, 2026-08-08 (docs/bench-pilot-2026-08-08.md): on the pilot's one comparable cell — a well-localized single-file bugfix with a reproducible symptom — a Codex-delegation arm matched solo Claude's fix rate exactly (3/3 both arms) while costing ~30% more wall time. n=3, one task shape: a direction, not a law. For fixes of that measured shape, default to solo unless the change carries a genuine risk or second-opinion dimension; broader bugfix classes keep the guidance above unchanged until more cells replicate.
  • Never delegate when the user explicitly asked Claude to do the work personally.
  • Run one delegated job of a class at a time (one task, one review). Before firing a new one, run status --json and confirm nothing of the same class is still active.

Disclosure

  • Announce every delegation in one short line when starting it — what is being delegated and that it is going to Codex. Never silently spawn CLI work.

The loop: fire, await, collect

Fire — start the job in the background:

node "${CLAUDE_PLUGIN_ROOT}/scripts/codex-companion.mjs" task --background [--write] [--profile <deep|fast>] [--effort <tier>] "<prompt>"
  • The output line started in the background as <jobId> carries the job id. Record it.
  • Add --write only when Codex is supposed to edit files; leave it off for analysis and second opinions.
  • --profile <deep|fast> is accepted on task (and its rescue forwarder) only; review and adversarial-review reject it.
  • This fire → await → collect loop is for task only. Reviews detach differently — see below.

Read the full file on GitHub · 88 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 88 lines · 74 tokens per session scan A d39d77ea89d6

Subscribe to this mod's changes

codex-delegation is a skill published in the GitHub repository zebbern/agent-collab (32 stars, last pushed 19d ago), licensed Apache-2.0. It adds 74 tokens to every session and 1,253 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

turborepo-monorepo

Configure pipelines, set up local/remote caching, and run scoped tasks in a Turborepo monorepo. Use when you say: 'enable remote caching', 'optimize pipeline inputs/outputs', or 'filter builds to affected packages'.

monkilabs/opencastle · 58 tokens

vitest-testing

Vitest unit and integration testing patterns, commands, mocking (vi.mock), and coverage. Use when writing .test.ts files, configuring the test runner, or adding coverage thresholds.

monkilabs/opencastle · 40 tokens

vercel-deployment

Vercel deployment workflows, environment management, domain configuration, and build troubleshooting. Use when deploying, checking deployment status, reviewing build logs, or managing environments.

monkilabs/opencastle · 37 tokens

agent-hooks

Four lifecycle hooks every agent runs: on-session-start scans LESSONS-LEARNED.md, resumes checkpoints; on-pre-delegate verifies tracker issues, file partitions; on-post-delegate runs fast-review, CI checks; on-session-end runs the health checks, writes logs. Use when starting a new session, running pre-flight checks…

monkilabs/opencastle · 122 tokens

decomposition

Resolves task dependencies, generates machine-actionable delegation specs, structures phased subtask plans for multi-agent work. Use when writing delegation specs, resolving task dependencies, building phased subtask plans for multi-agent work, assigning work to sub-agents, or partitioning a feature into…

monkilabs/opencastle · 62 tokens

jira-management

Create and update Jira issues, epics, and sprints; manage backlog and sprint transitions. Use when you say: 'create a ticket', 'open a story', 'link an epic', 'start a sprint', or 'search the backlog'.

monkilabs/opencastle · 53 tokens