Best for
- Do NOT use for: Architecture decisions, security review, documentation-heavy tasks.
nexus-substrate/nexus-agents/skills/codex-delegator/SKILL.md
Delegate code generation tasks to Codex CLI for optimal performance. Use when implementing features, generating tests, refactoring code, or making bulk code changes. Triggers on "delegate to codex", "route to codex", "use codex", "code generation".
Decision brief
Delegate code generation tasks to Codex CLI for optimal performance. Triggers on "delegate to codex", "route to codex", "use codex", "code generation".
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Declared | Source record | Install path and trigger |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/nexus-substrate/nexus-agents --skill "skills/codex-delegator"Inspect the Agent Skill "codex-delegator" from https://github.com/nexus-substrate/nexus-agents/blob/d7d6eeb0b286dd38ab8ede233a47d92326399097/skills/codex-delegator/SKILL.md at commit d7d6eeb0b286dd38ab8ede233a47d92326399097. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
[ ] Routing decision made via CompositeRouter.route() — no direct adapter instantiation
Review the “Real-World Performance (Tested 2026-01-18)” section in the pinned source before continuing.
Do NOT use for: Architecture decisions, security review, documentation-heavy tasks.
Use the delegatetomodel MCP tool for intelligent routing:
Use the delegatetomodel MCP tool for intelligent routing:
Permission review
No configured static risk pattern was detected
This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.
Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 91/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 18 | Source | Repository attention, not individual Skill quality |
| Compatibility | 1 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Full documentation:
| Metric | Value | Notes |
|---|---|---|
| Model version | gpt-5.2-codex | Latest research preview |
| Latency (simple) | 3-4 seconds | Single function generation |
| Latency (complex) | 5-6 seconds | Interface + class boilerplate |
| Token overhead | ~900-1050 per session | Fixed session initialization cost |
| Default sandbox | read-only | Safe for code generation |
| Code quality | Production-ready | Proper generics, types, error handling |
Codex excels at:
| Task Type | Examples |
|---|---|
| Code Generation | Implement functions, create classes, add features |
| Test Generation | Write unit tests, integration tests, test fixtures |
| Refactoring | Extract methods, rename variables, restructure |
| Code Completion | Complete partial implementations, fill in stubs |
| Bulk Code Changes | Apply patterns across multiple files |
Do NOT use for: Architecture decisions, security review, documentation-heavy tasks.
Use the delegate_to_model MCP tool for intelligent routing:
delegate_to_model(task: "Implement a binary search function in TypeScript")
The CompositeRouter automatically routes to Codex when:
For explicit Codex invocation, use codex exec for non-interactive mode:
# Basic code generation (non-interactive)
codex exec "Implement a binary search function in TypeScript"
# Via nexus-agents CLI
nexus-agents orchestrate "Implement sorting algorithm" --cli=codex
# Explicit model selection (default is gpt-5.2-codex)
codex exec -m gpt-5.2-codex "Implement a debounce function"
# Full autonomous mode (dangerous - writes files)
codex exec --full-auto "Add error handling to all functions in utils.ts"
Important: Use codex exec NOT codex -p. The -p flag is for interactive sessions.
Check routing decisions before execution:
nexus-agents routing-audit "Implement authentication middleware" --format=json
The router analyzes tasks using these signals:
| Signal | Boost Codex When |
|---|---|
codeGeneration | Keywords: implement, write, create |
reasoningSimple | No "design", "architect", "analyze" |
budgetSensitive | Keywords: quick, simple, straightforward |
technicalContext | References to APIs, frameworks, libs |
delegate_to_model(task: "Write Jest tests for the UserService class covering:
- createUser with valid input
- createUser with invalid email
- getUserById with existing user
- getUserById with non-existent user")
delegate_to_model(task: "Implement a rate limiter middleware for Express.js that:
- Uses sliding window algorithm
- Supports configurable limits per route
- Returns 429 status when limit exceeded")
delegate_to_model(task: "Refactor the payment processing module to:
- Extract validation logic into separate functions
- Replace callbacks with async/await
- Add TypeScript types for all parameters")
delegate_to_model(task: "Add JSDoc comments to all exported functions in src/utils/")
Task Input
|
v
TaskAnalyzer (profile task)
|
v
BudgetRouter (filter by constraints)
|
v
TopsisRouter (rank: quality 50%, cost 30%, latency 20%)
|
v
LinUCBBandit (contextual learning)
|
v
Codex selected if: high codeGeneration + low reasoningComplexity
| Capability | Score | Notes |
|---|---|---|
| Code Generation | 0.95 | Primary strength |
| Context Window | 400K | Large file support |
| Cost Efficiency | High | Lower than Claude for code tasks |
| Latency | 3-6s | Fast for focused code tasks |
tsc --noEmit on TypeScript before integrationIf Codex is unavailable:
# nexus-agents.yaml
routing:
enableTopsisRanking: true
enableLinUCBSelection: true
topsis:
qualityWeight: 0.5
costWeight: 0.3
latencyWeight: 0.2
# Check Codex availability
nexus-agents doctor
# View routing decision for task
nexus-agents routing-audit "task description" --verbose
# Show bandit learning stats
nexus-agents routing-audit "task" --bandit-stats
| Excuse | Counter |
|---|---|
| "Codex is fastest, always use it" | Codex is fastest for code generation. For research/docs, Gemini wins on context; for design, Claude wins. Match the CLI to the task type. |
| "I'll route everything through Codex" | Performance floors fire when one CLI is overweighted. Spread load per the routing system (CompositeRouter). |
| "Skip the model probe" | Required after init (#1402). Without it, you may try to use a model the CLI doesn't expose. |
| "Codex failed, retry with same params" | Transient retry already runs (#1531). If it failed twice, the failure is real — fall back to a different CLI per the routing chain. |
CompositeRouter.route() — no direct adapter instantiationFrequently asked questions
Delegate code generation tasks to Codex CLI for optimal performance. Triggers on "delegate to codex", "route to codex", "use codex", "code generation".
The source record exposes this install command: npx skills add https://github.com/nexus-substrate/nexus-agents --skill "skills/codex-delegator". Inspect the command and pinned source before running it.
The pinned source record declares support for: codex.
Alternatives
vasilyu1983/AI-Agents-public
Guides iOS testing with XCTest, XCUITest, Swift Testing, simctl, and xcresult. Use when choosing destinations, controlling flakes, or parsing test artifacts for native apps.
samber/cc-skills-golang
Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI, or debugging flaky/slow tests. For testify-specific APIs see `samber/cc-skills-golang@golang-stretchr-testify`; for measurement methodology see `samber/cc-skills-golang@golang-benchm
samber/cc-skills-golang
Troubleshoot Golang programs systematically - find and fix the root cause. Use when encountering bugs, crashes, deadlocks, or unexpected behavior in Go code. Covers debugging methodology, common Go pitfalls, test-driven debugging, pprof setup and capture, Delve debugger, race detection, GODEBUG tracing, and production debugging. Start here for any 'something is wrong' situation. Not for interpreting profiles or benchmarking (→ See `samber/cc-skills-golang@golang-benchmark` skill) or applying opt
samber/cc-skills-golang
Golang application framework using uber-go/fx — fx.New, fx.Provide, fx.Invoke, fx.Module, fx.Lifecycle hooks, fx.Annotate (name/group/As), fx.Decorate, fx.Supply, fx.Replace, fx.WithLogger, and signal-aware Run(). Apply when using or adopting uber-go/fx, when the codebase imports `go.uber.org/fx`, or when wiring services with fx.New. For raw DI without lifecycle, see `samber/cc-skills-golang@golang-uber-dig` skill.