cli-dispatch CLAUDE.md

Project instructions for cli-dispatch, a Claude Code plugin that delegates tasks to other coding-agent command-line tools. They explain the repository, its commands, hooks, skills, and testing practices.

In plain words
What is it for?
Use them when modifying cli-dispatch, running individual tests, checking shell scripts, or understanding how its external worker commands are organised.
Why use it?
They give coding agents the project-specific context needed to work safely in a repository without a package build step.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/rbinar/cli-dispatch/claude-md
Clone the repo
git clone --depth 1 https://github.com/rbinar/cli-dispatch
Per session 4,941 This file is loaded in full into every session.
When invoked 4,941 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.04941 $0.04941
Opus 5 $0.02471 $0.02471
Sonnet 5 $0.00988 $0.00988
Haiku 4.5 $0.00494 $0.00494

Measured 2d ago against content hash 7acfb584b690, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cli-dispatch CLAUDE.md scanned grade A with 0 findings 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 2d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 272 lines

How it starts

The opening of the file, as written. The whole thing — 272 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

What this repo is

cli-dispatch is a Claude Code plugin (not an npm package — there is no package.json, no build step, no bundler). It ships slash commands, a SessionStart hook, a skill, and standalone CLI scripts that let Claude Code delegate work to five external "worker" CLIs — DeepSeek (via claude pointed at DeepSeek's API), Antigravity/Gemini (agy), OpenAI Codex (codex), OpenCode (opencode, via OpenRouter), and GitHub Copilot (copilot) — since Claude Code's built-in subagent tool only supports Anthropic models. It ships no subagent definitions: the five agents/*-runner.md babysitters were deleted in 4.0.0 (see "The deterministic runner + escalation path" below).

Everything the plugin installs lives under plugins/cli-dispatch/:

  • commands/*.md — slash commands (/cli-dispatch:*). Each is markdown with a fenced bash (and sometimes PowerShell) block that Claude Code executes directly — there is no compiled command layer. Read-only commands should instead pre-execute an extracted script via a leading !`bash "${CLAUDE_PLUGIN_ROOT}/scripts/<name>.sh"` line: embedded shell is paid twice (once as the markdown's input tokens, again as output when the model re-emits it verbatim as a Bash tool call), while a ! line runs before the model sees anything and injects only the output. status, doctor, balance and clean-schedule are converted; the rest are not yet. Two traps: ${CLAUDE_PLUGIN_ROOT} is interpolated into the ! command string but not exported into the subprocess, so a script that needs it must take it as an argument (this silently killed status's staleness check in 4.9.0); and a mutating command must never pre-execute its mutation — clean-schedule pre-executes a read-only status probe and leaves install/uninstall to a deliberate follow-up call.
  • scripts/ — the actual installed CLIs. Per-backend: ds-agent, ag-agent, cx-agent, oc-agent, cp-agent + their *-stream siblings and *-worktree-run.sh runners. Backend-agnostic: cli-dispatch-run (the deterministic runner — the delegation path), cli-dispatch-wait, cli-dispatch-clean, cli-dispatch-gain, cli-dispatch-dashboard, and cli-dispatch-statusline.sh (the [CD] statusline fragment — bash-only by design, glob-loaded from the plugin cache rather than installed to ~/.local/bin). The pre-execution scripts (cli-dispatch-status.sh + its .ps1 twin, cli-dispatch-doctor.sh, cli-dispatch-balance.sh, cli-dispatch-clean-schedule.sh) likewise run from the plugin cache and are not installed, so they can never go stale relative to the plugin — do not add them to install.sh. Bash/PowerShell wrappers around Node engines (*-stream-parse.mjs parsers, verdict-writer.mjs, gain-report.mjs, drift-report.mjs, dashboard-server.mjs, cli-dispatch-clean.mjs). install.sh/install.ps1 copy these into ~/.local/bin (wrappers) and ~/.local/share/cli-dispatch/ (engines + shared libs).
  • hooks/hooks.json — the SessionStart hook registration. Wires scripts/policy-inject.mjs to all five matchers (startup/resume/clear/compact/fork); compact and fork matter because compaction drops the injected policy from a long session's context (#118).
  • skills/ds-delegate/SKILL.md — the ds-delegate skill.

Read the full file on GitHub · 272 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. 2d ago First seen · 272 lines · 4,941 tokens per session scan A 7acfb584b690

Subscribe to this mod's changes

cli-dispatch CLAUDE.md is an instructions file published in the GitHub repository rbinar/cli-dispatch (5 stars, last pushed 14d ago), licensed MIT. It adds 4,941 tokens to every session, about $0.0247 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.