agent-routing
Decide which model, effort level, and cascade shape each subagent gets, and how to keep improvement loops safe…
Fans Claude work out over the Anthropic API from surfaces with no native subagents, chiefly claude.ai chat and projects, with parallel calls with a shared cached context, streaming, long-lived conversation threads with cached history, and named agent pools; also delegates to
$ npx -y skills add oaustegard/claude-skills --skill orchestrating-chat-agents --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/orchestrating-chat-agentsContext preview
The summary Claude sees to decide when to auto-load this skill.
Fans Claude work out over the Anthropic API from surfaces with no native subagents, chiefly claude.ai chat and projects, with parallel calls with a shared cached context, streaming, long-lived conversation threads with cached history, and named agent pools; also delegates to
name: orchestrating-chat-agents description: Fans Claude work out over the Anthropic API from surfaces with no native subagents, chiefly claude.ai chat and projects, with parallel calls with a shared cached context, streaming, long-lived conversation threads with cached history, and named agent pools; also delegates to Gemini through the Cloudflare AI Gateway on any surface. Use for multi-perspective analysis, a panel of reviewers, or task decomposition from claude.ai, or for Python code that calls several Claude instances concurrently over the API. metadata: version: 1.0.0
Fan-out has three possible engines. Which exist depends on where you are running. **Pick the engine before writing any orchestration code.**
| Engine | claude.ai | Cowork | Claude Code / CCotw | |---|:---:|:---:|:---:| | Native subagents (`Agent` / `Task` / `Workflow`) | ✗ | ✓ | ✓ | | Gemini via CF AI Gateway (`invoking-gemini`) | ✓ | ✓ | ✓ | | This skill's httpx fan-out (raw Anthropic API) | ✓ | last resort | last resort |
**Primary discriminator — check the tool list, not the filesystem.** If an `Agent`, `Task`, or `Workflow` tool is callable, native subagents exist. That single fact decides the row. Everything below is elaboration.
**Use them. Do not hand-roll from this skill.** The managed runtime gives 16-concurrent / 1000-agent ceilings, an approval gate, adversarial cross-review, and in-session resume — all of which this skill would reimplement worse. Route model and effort per **`agent-routing`** (calibrated on 300 measured Haiku calls); do not re-derive that here.
Which native mechanism to use (Agent tool, Workflow, or headless `claude -p` children launched from one background command) is **`dispatching-subagents`**. In Claude Code the `claude` binary authenticates through the host, so a headless fan-out needs no API key either.
Cowork adds one option Claude Code doesn't: subagents can be **declared** rather than spawned ad hoc, as `agents/*.md` in a plugin — frontmatter `name`, `description`, `model`, `effort`, `maxTurns`, `tools`, `disallowedTools`, `skills`, `memory`, `background`, `isolation: worktree`. They appear as `plugin-name:agent-name`. Note `hooks`, `mcpServers`, and `permissionMode` are refused in plugin agents for security, so a declared agent inherits the session's MCP connections and cannot bring its own.
Reach back into this skill on those surfaces only for what the runtime lacks: stall detection, or a long-lived `ConversationThread`. **Inter-agent messaging is NOT on that list** — the runtime ships `SendMessage` and `ListAgents`, and `AgentPool` reimplements them worse.
Inter-agent messaging between native subagents (`SendMessage`, `ListAgents`) and its measured traps are in `dispatching-subagents/references/native-messaging.md`.
Two engines, and **Gemini is the default** — see `subagent-delegation-protocol` in ops. Use this skill's httpx fan-out when you specifically want Claude-family output, multi-turn threads with cached history, or inter-agent messaging.
Even where native subagents exist, Gemini is the right call for mechanical-but-large work (extractions, ports, boilerplate, schema transforms) and for a genuinely independent second opinion in a judge panel — a different model family fails differently, which is the whole point of a panel.
Call mechanics live in **`invoking-gemini`**; do not duplicate them here. Three things that bite:
resolves to 3.5 until that plugin's model table regenerates.
`medium`. Set `minimal` for mechanical generation or the model silently spends its output budget reasoning — symptom is an empty or truncated response.
the gateway rather than Google directly.
**Review is not delegable.** Diff security- and protocol-critical paths line-by-line against source, run syntax/lint checks, live-test whatever is network-testable. Delegated output ships only after your own review, regardless of which model produced it or which engine ran it.
Cross-model review tools (`challenge`, `verify_patch`) keep their own model config, often deliberately a Claude. This routing does not silently repoint them.
Formerly `orchestrating-agents` (renamed 2026-10-11, because the old name drew parallel-dispatch requests that belong to `dispatching-subagents`).
This skill enables programmatic API invocations for advanced workflows including parallel processing, task delegation, and multi-agent analysis using the Anthropic API.
import sys
sys.path.append('/mnt/skills/user/orchestrating-chat-agents/scripts')
from claude_client import invoke_claude
response = invoke_claude(
prompt="Analyze this code for security vulnerabilities: ...",
model="claude-sonnet-5-5"
)
print(response)Default model is `claude-sonnet-5-5` ($2/$10 per MTok); `claude-opus-5-5` ($4/$20) for open-ended work and `claude-haiku-5-5` ($0.10/$0.50, prompts up to 100K tokens, 1M context) for cheap first-pass calls. These models reject non-default sampling parameters, so `temperature` / `top_p` / `top_k` are accepted by the wrappers but only sent to legacy (4.x / 3.x) model ids. They also think adaptively; the wrappers return the joined `text` blocks, never `content[0]`.
from claude_client import invoke_parallel
prompts = [
{
"prompt": "Analyze from security perspective: ...",
"system": "You are a security expert"
},
{
"prompt": "AnaA collection of Claude skills distributed as a Claude Code plugin marketplace. Skills are primarily designed for the Claude.ai PaaS skill compute environment; mileage will vary if used as Claude Code Agent Skills.
Decide which model, effort level, and cascade shape each subagent gets, and how to keep improvement loops safe…
Cross-context adversarial review for deliverables before shipping. Use when producing blog posts, technical recommendations,…
Convenes expert panels for problem-solving. Use when user mentions panel, experts, multiple perspectives, MECE, DMAIC, RAPID, Six…
Routes, triages, flags and rates a piece of text with a probability for every option: which department or queue a ticket goes to,…
Delegates work to a subagent or spawned session by writing only the task, while a PreToolUse hook pages the parent transcript…
Chooses how to launch subagents from Claude Code (the Agent tool, a Workflow script, or headless claude -p children) and runs a…