model-dispatch

Dispatches prompts to external agent CLIs with per-CLI invocation, isolation, and resume handling.

1|Updated Jul 3, 2026
One-click install
npx skills add https://github.com/nejcm/agents --skill model-dispatch-nejcm
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: model-dispatch
Source: https://github.com/nejcm/agents/tree/main/skills/model-dispatch
Command: npx skills add https://github.com/nejcm/agents --skill model-dispatch-nejcm

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Shelling out from one AI coding assistant to another agent CLI (Codex, Claude Code, Cursor Agent, OpenCode) is error-prone: flags differ per CLI, model ids change without notice, stdin stalls hang runs, and sessions get resumed by accident. This Skill provides verified invocation patterns so cross-CLI delegation works correctly. ## Core Features & Use Cases - Per-CLI invocation references: Detailed guides for codex exec, Cursor agent -p, claude -p, and opencode run, covering preconditions, model/effort mapping, isolation, resume, and structured output. - Invocation contract: Universal rules such as prompt-last with empty stdin, explicit session-id resume, artifact hygiene, and never inventing model ids or flags. - Long-run supervision: Guidance for capturing PIDs, polling cadence, exit-status collection, and usage-limit handling. - Use Case: From Claude Code, delegate a read-only code review to Codex with a specific model and reasoning effort, capture the JSON artifact, then resume the same session to apply fixes. ## Quick Start Ask the agent to dispatch a review task to another installed agent CLI such as Codex or Cursor Agent using a specific model and effort level.

Frequently Asked Questions about model-dispatch

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I call another AI agent CLI from my coding assistant?▼

Identify your host CLI, confirm the target binary exists with command -v, then follow the per-CLI reference for codex exec, agent -p, claude -p, or opencode run. Pass the prompt as the final argument with stdin redirected from /dev/null.

How to pass model and effort when dispatching to Codex CLI?▼

Codex takes the model as -m <model> and effort as a config override, -c "model_reasoning_effort=<level>". Discover valid model ids from the installed CLI's help rather than assuming them.

Can I resume a previous agent CLI session for fixes?▼

Yes, each CLI supports resume by explicit session id: claude --resume, agent --resume with a chat id, opencode --session, and codex exec resume. Prefer explicit ids over 'continue last' so concurrent runs are not resumed by accident.

Why does my CLI dispatch hang waiting for input?▼

The CLI is likely waiting on stdin. Always pass the prompt as the final positional argument and redirect empty stdin with < /dev/null, since piped or absent stdin can stall the process.

When should I not shell out to another agent CLI?▼

Never shell out to your own host's CLI, since that recurses; use the host's native subagent mechanism instead. Also avoid dispatch when the target binary is missing or unauthenticated.