A Claude Code skill for handing scoped tasks to non-Claude models and getting usable results back. Covers model selection by task type, spec discipline, stateless dispatch, agentic web-research dispatch, concurrency, and escalation.
| Field | Value |
|---|---|
| What | Two Python CLIs, dispatch.py and dispatch_web.py, plus SKILL.md guidance for Claude teams that dispatch bounded tasks to non-Claude models. |
| For | Claude Code team leaders and maintainers who need self-contained delegation specs, model-tier matching, raw-output review, and optional live web research. |
| Type | standalone-software |
| Status | experimental |
Claude agent teams (Lane 1) are powerful but expensive at volume. Many subtasks — bulk coding, drafts, high-volume classification, web research — can run on cheaper or specialized models without sacrificing quality. The dispatch skill provides the craft layer for doing this correctly: picking the right model tier, writing a tight self-contained spec, running the tool, and knowing when to escalate instead of accepting raw output.
Stateless mode (dispatch.py) — sends one chat-completion with no tools. The model answers from training. Use for coding, classification, drafts, analysis of content you provide. Fast and simple.
Web-browsing mode (dispatch_web.py) — runs a bounded agent loop with hosted web_search / web_fetch tools. The model actually browses: searches, fetches pages to confirm they resolve, drops 404s, and only cites verified URLs. Use when the answer depends on the live web or you need link verification.
| Task type | Model tier |
|---|---|
| Agentic/terminal coding, multi-step CLI work | Capable agentic coding model |
| Hardest frontier reasoning | Keep on Claude (Lane 1) |
| Bulk / high-volume coding | Coding-specialized OSS model |
| Non-code bulk, drafts, pre-screening | General-purpose OSS model |
| Deliverable prose that ships | Primary Claude agent — never offloaded |
Quality first, cost second. The cheap pool is for tasks where quality variation is tolerable.
Every dispatch requires a self-contained spec:
- Task goal + non-goals
- Relevant file paths / inputs / constraints
- Exact output contract (format, length, success criteria)
- Escalation notes for taste / policy / client-facing / irreversible decisions
Vague dispatch → wrong output. If the model would need hidden context, put it in the spec.
- Copy
SKILL.mdto~/.claude/skills/dispatch/SKILL.md. - Copy
dispatch.py(and optionallydispatch_web.py) to a stable directory. Both are reference templates — adapt the CONFIGURATION section before use. - Open
dispatch.pyand register your model IDs inHTTP_MODELS(keys = names you pass to--model; values = provider model IDs). SetDISPATCH_BASE_URLandDISPATCH_API_KEYin your environment to point at any OpenAI-compatible endpoint. - For a CLI-based coding tool, add entries to
CLI_MODELSand fill in therun_cli()stub (see the comment block in that function). - For web-browsing mode, register a tool-call-capable model in
dispatch_web.py'sCHAT_MODELSand wire up your search provider in_web_search()— the TODO comment shows Serper, Tavily, and SerpAPI options.
# Write a self-contained spec
cat > task.md <<'EOF'
Goal: Refactor the parse_invoice() function in src/invoices.py to handle multi-page PDFs.
Non-goals: Do not change the function signature or the caller in main.py.
Output: The updated parse_invoice() function body only, as a Python code block.
Verification: Must pass the existing tests in tests/test_invoices.py.
EOF
# Dispatch to a coding model
path/to/dispatch.py --model <your-coding-model> --spec task.md --cwd /path/to/repo# Web-research mode: find current verified URLs
echo "Find the 5 most active open-source Claude Code skill repositories. web_search then web_fetch each to confirm it resolves before listing." \
| path/to/dispatch_web.py --model <your-web-model> --spec -The dispatch tool returns raw model output. Code is gated where it lands — in your CI, code review, or integration step. Do not trust un-landed dispatched code blindly. Review or test before integrating.
- Taste, brand, or client-facing decisions
- Irreversible operations
- Results that fail downstream tests — surface, do not quietly resubmit
Each invocation is independent. Fire as many dispatches as the work genuinely needs — there is no shared queue or lock.
Maintainer and agent context lives in AGENTS.md.
Design decisions are recorded in docs/decisions.
The Claude skill behavior contract lives in SKILL.md.
This repo uses Semantic Versioning, Conventional Commits, and release-please Release PRs.
The latest released version is shown in the release badge at the top of this README. The badge updates automatically from GitHub Releases after a Release PR is approved and merged.
Release tags use the format vX.Y.Z.
Use Conventional Commits for commit messages and PR titles.
Do not create release tags manually. Do not edit CHANGELOG.md manually for ordinary releases.
This project is licensed under the terms in LICENSE.