Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add musingfox/cc-plugins/plugin install pi-dispatchWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/musingfox/cc-plugins/pi-dispatch)<a href="https://agentmods.dev/skills/musingfox/cc-plugins/pi-dispatch"><img src="https://agentmods.dev/badge/skills/musingfox/cc-plugins/pi-dispatch/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/musingfox/cc-plugins/pi-dispatch"><img src="https://agentmods.dev/badge/skills/musingfox/cc-plugins/pi-dispatch.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00137 | $0.03151 |
| Opus 5.5 | $0.00055 | $0.01260 |
| Sonnet 5.5 | $0.00027 | $0.00630 |
| Haiku 4.5 | $0.00014 | $0.00315 |
Grade B, and why
pi-dispatch scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
4. Ask whether to keep it. On yes, edit `~/.claude/settings.json`: set How it starts
The opening of the file, as written. The whole thing — 222 lines — stays where its author put it; the contents beside it link to each section on GitHub.
pi-dispatch — offload usage
${CLAUDE_PLUGIN_ROOT}/scripts/pi-agent.sh is the name-addressed unified entry point over the pi
worker primitives. The registry is the filesystem: $PI_RUNS_DIR/agents/<NAME>
symlinks to the run's RUNDIR. Main (the orchestrator) reads this whole file; the
## Operator usage section at the end is what it embeds into a builder brief,
and the builder operates those verbs as a pure operator.
How main uses this
-
Decompose the work into self-contained briefs (one observable outcome each). For code-writing tasks, create one worktree per task, put its ABSOLUTE path in the brief, and launch with
PI_CWD=<worktree> ${CLAUDE_PLUGIN_ROOT}/scripts/pi-agent.sh start …. The brief tells the worker where to work; onlyPI_CWDmakes it start there, and it is what arms the worktree fence (git shim + write/edit extension). A fresh dispatch without it is refused (exit 2). To run a worker in the current directory on purpose, say so withPI_CWD="$PWD". Everycreateflag is required:${CLAUDE_PLUGIN_ROOT}/scripts/pi-worktree.sh create \ --repo_root <repo root> --branch_name <new branch> \ --base_ref <BASE_REF sha> --base_branch <branch to diff against> \ --work_path <worktree path> --diff_out <diff file> \ --cleanup_out <cleanup script> --rundir-file <rundir file>It prints the worktree path and appends a cleanup block to
<cleanup script>. Afterstart, write the worker's RUNDIR into<rundir file>(startprints it asRUNDIR=…; pipe throughsed -n 's/^RUNDIR=//p') so cleanup can kill a live worker; an empty file skips the kill. When the work is merged or dropped, run${CLAUDE_PLUGIN_ROOT}/scripts/pi-worktree.sh clean <cleanup script>: it saves the diff to<diff file>and removes the worktree. -
Embed the
## Operator usagesection — from its heading to the end of this file — verbatim, plus the per-task brief, into a builder dispatch. The builder runs${CLAUDE_PLUGIN_ROOT}/scripts/pi-agent.sh startper task and${CLAUDE_PLUGIN_ROOT}/scripts/pi-agent.sh watchas its main loop, and runs each worker's acceptance check when it settles. -
Terminal status lines persist in the RUNDIR and replay on re-poll; raw stream is kept as
pi.stream.jsonl, distilled final text asresult.md. -
stop NAMEonce a worker's result is consumed. The registry never self-prunes, and everywatchre-prints each of ITS named terminal agents on its first sweep. -
watchrequires the names because the registry is machine-wide: an unscoped watch would report on — and quota-abort — another dispatch's workers.lsis the global view. -
When a batch ends on
QUOTAorQUOTA-WINDOW(see the provider wall below), re-dispatch the SAME brief, minus the operator usage, to a Claude builder in self-do mode (${CLAUDE_PLUGIN_ROOT}/docs/main-orchestration.md§6) on the same worktree. One shot: if that fails too, the task is failed.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 10d ago Changed · +26 lines · +2 tokens per session 94e1bc045724
- 22d ago Changed · +16 lines scan A → B d47f68d9f329
- 26d ago Changed · +14 lines 63f90a82b3bb
- 1mo ago Changed · +7 lines 7a9110f3cd1b
- 1mo ago Changed · -18 lines a82e2cd464fe
- 1mo ago Changed · +12 lines fc8d88b390f8
- 1mo ago Changed · +7 lines · +64 tokens per session d96db956597f
- 1mo ago First seen · 158 lines · 71 tokens per session scan A b4e3ebfcc085
pi-dispatch is a skill published in the GitHub repository musingfox/cc-plugins (2 stars, last pushed yesterday), licensed MIT. It adds 137 tokens to every session and 3,151 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.
Other skills, from other repositories
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…
insight-error-page
Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…