pi-dispatch

pi-dispatch is a skill for Claude Code from musingfox/cc-plugins. It costs 117 tokens per session (3,016 once invoked), scanned B, original, MIT.

A dispatch skill for sending work to background pi workers through named commands such as starting, checking, watching, and stopping a worker. It requires workers to record a one-line completed or blocked result in a file.

In plain words
What is it for?
Use it to run delegated tasks in isolated workspaces, poll their progress, and route completed or blocked work to the next step.
Why use it?
It provides a defined way to delegate work and check its result without extracting a verdict from a worker's conversation log.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: reads .claude/ paths; mentions subagents; names the AskUserQuestion tool.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the pi-dispatch plugin — 1 skill, 1 agent shipped together

Good fit Use it to run delegated tasks in isolated workspaces, poll their progress, and route completed or blocked work to the next step.

Compare 6 skills from other repositories ↓
Install

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.

Claude Code
/plugin marketplace add musingfox/cc-plugins
Claude Code
/plugin install pi-dispatch

Made for: Claude Code.

Or install pi-dispatch, the plugin that ships this one along with the rest of its 1 skill, 1 agent.

Wrote 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.

agentmods badge for pi-dispatch

README.md
[![agentmods](https://agentmods.dev/badge/skills/musingfox/cc-plugins/pi-dispatch/github.svg)](https://agentmods.dev/skills/musingfox/cc-plugins/pi-dispatch)
Your own site
<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.

agentmods 80×15 button for pi-dispatch

Your own site · 80×15
<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>
Per session 117 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,016 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00117 $0.03016
Opus 5.5 $0.00047 $0.01206
Sonnet 5.5 $0.00023 $0.00603
Haiku 4.5 $0.00012 $0.00302

Measured 25d ago against content hash 6362df57ae4c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 25d 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
pi-dispatch/skills/pi-dispatch/SKILL.md · 218 lines

How it starts

The opening of the file, as written. The whole thing — 218 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 reads this whole file and runs the verbs itself.

How main uses this

  1. 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; only PI_CWD makes 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 with PI_CWD="$PWD". Every create flag 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>. After start, write the worker's RUNDIR into <rundir file> (start prints it as RUNDIR=…; pipe through sed -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.

  2. Run ${CLAUDE_PLUGIN_ROOT}/scripts/pi-agent.sh start per task, arm one background watch (below), and run each worker's acceptance check when it settles.

  3. Terminal status lines persist in the RUNDIR and replay on re-poll; raw stream is kept as pi.stream.jsonl, distilled final text as result.md.

  4. stop NAME once a worker's result is consumed. The registry never self-prunes, and every watch re-prints each of ITS named terminal agents on its first sweep.

  5. watch requires the names because the registry is machine-wide: an unscoped watch would report on — and quota-abort — another dispatch's workers. ls is the global view.

  6. When a batch ends on QUOTA or QUOTA-WINDOW (see the provider wall below), hand the SAME brief to a Claude seat on the same worktree: do it yourself, or dispatch it as a muster run. One shot: if that fails too, the task is failed.

Read the full file on GitHub · 218 lines

Changes

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.

  1. 25d ago Changed · -4 lines · -20 tokens per session 6362df57ae4c
  2. 1mo ago Changed · +26 lines · +2 tokens per session 94e1bc045724
  3. 2mo ago Changed · +16 lines scan A → B d47f68d9f329
  4. 2mo ago Changed · +14 lines 63f90a82b3bb
  5. 2mo ago Changed · +7 lines 7a9110f3cd1b
  6. 2mo ago Changed · -18 lines a82e2cd464fe
  7. 2mo ago Changed · +12 lines fc8d88b390f8
  8. 2mo ago Changed · +7 lines · +64 tokens per session d96db956597f
  9. 2mo ago First seen · 158 lines · 71 tokens per session scan A b4e3ebfcc085

Subscribe to this mod's changes

pi-dispatch is a skill published in the GitHub repository musingfox/cc-plugins (2 stars, last pushed 4d ago), licensed MIT. It adds 117 tokens to every session and 3,016 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.

Related

pi-dispatch compared with skills from other repositories

pi-dispatch next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
pi-dispatchmusingfox/cc-pluginsSkill24d agoMITB117Claude Code
imagegenopenai/codexSkill137ktodayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill101ktodayApache-2.0A19Claude Code
browser-automationopenclaw/openclawSkill395ktodayMITA36Claude Code
systematic-debuggingobra/superpowersSkill331k2d agoMITA21Claude Code
free-llm-apismnfst/awesome-free-llm-apisSkill14kyesterdayCC0-1.0A113Claude Code, Codex
next-cache-components-adoptionvercel/next.jsSkill144kyesterdayMITA95Claude Code