| name | codex-delegate |
| description | Delegate small, isolated coding tasks to Codex. Use for boilerplate generation, utility functions, DTO/type files, and simple unit tests. Do not use for security-sensitive logic, broad refactors, or changes that require deep project-wide context. |
| version | 0.2.0 |
Codex Delegate Skill
Purpose
Use Codex as an execution delegate for low-risk, independent coding tasks while Claude handles planning, review, and integration decisions.
Use This Skill When
- The task can be scoped to one file or a small independent file set.
- The spec is concrete and testable.
- Existing architecture changes are not required.
Do Not Use This Skill When
- The task touches auth, crypto, permissions, secrets, or security boundaries.
- Multiple existing modules need coordinated refactoring.
- The task requires deep behavioral analysis across the codebase.
Delegation Rules
- Include explicit target file paths in the prompt.
- Prefer the CLI wrapper first:
bash "${CLAUDE_PLUGIN_ROOT}/scripts/codex_exec.sh" --task "<task>" --workdir "$(pwd)"
- Use SDK path only when session continuity is required:
npm --prefix "${CLAUDE_PLUGIN_ROOT}" exec -- ts-node --transpile-only "${CLAUDE_PLUGIN_ROOT}/scripts/codex_sdk_run.ts" --task "<task>" --workdir "$(pwd)"
- After delegation, inspect:
- JSON result (
ok, thread_id, response, usage)
git diff --stat and git diff
- test status
Retry Protocol
- If verification fails, retry with the same thread first:
bash "${CLAUDE_PLUGIN_ROOT}/scripts/codex_exec.sh" --thread-id "<thread_id>" --task "<fix instruction>" --workdir "$(pwd)"
- Only if no thread id exists, use:
bash "${CLAUDE_PLUGIN_ROOT}/scripts/codex_exec.sh" --resume-last --task "<fix instruction>" --workdir "$(pwd)"
- Retry at most 2 times, then switch to direct Claude editing.