CommandMate: Command for Claude Code

.claude/commands/orchestrate.md

orchestrate is a command for Claude Code from Kewton/CommandMate. It costs 36 tokens per session (34,291 once invoked), scanned B, original, MIT.

A coordinator for developing several GitHub Issues at the same time, from preparation and design through implementation, pull-request merging, user acceptance testing, and fixes. A worktree is a separate working folder for a Git branch, and UAT means checking that the finished change works for its users.

In plain words
What is it for?
Use it to run selected phases or the full workflow for two or more issues, with each issue developed in its own feature branch and worktree.
Why use it?
It organizes the handoffs and completion checks across parallel changes so each issue follows a defined development process.

Command for Claude Code

Written for Claude Code: SessionStart hook event. Also seen: model in frontmatter; reads .claude/ paths; names the TodoWrite tool.

This is Kewton/CommandMate's own configuration. It tells Claude Code how to work on CommandMate itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything CommandMate configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node scripts/orchestrate/run-log.mjs append --run-dir "workspace/orchestration/runs/$DATE" --issues "$RUN_ISSUES" \.

Reuse

Borrowing it

Nothing to install: this file belongs to Kewton/CommandMate. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Kewton/CommandMate/main/.claude/commands/orchestrate.md
Clone the repo
git clone --depth 1 https://github.com/Kewton/CommandMate

Made for: Claude Code.

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 orchestrate

README.md
[![agentmods](https://agentmods.dev/badge/commands/kewton/commandmate/orchestrate/github.svg)](https://agentmods.dev/commands/kewton/commandmate/orchestrate)
Your own site
<a href="https://agentmods.dev/commands/kewton/commandmate/orchestrate"><img src="https://agentmods.dev/badge/commands/kewton/commandmate/orchestrate/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 orchestrate

Your own site · 80×15
<a href="https://agentmods.dev/commands/kewton/commandmate/orchestrate"><img src="https://agentmods.dev/badge/commands/kewton/commandmate/orchestrate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 34,291 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. 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.00036 $0.34291
Opus 5.5 $0.00014 $0.13716
Sonnet 5.5 $0.00007 $0.06858
Haiku 4.5 $0.00004 $0.03429

Measured yesterday against content hash 816f5523a319, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

orchestrate scanned grade B with 2 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 yesterday.

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.

- **ワーカーに `/model` を送らない。** Enter が `~/.claude/settings.json` のグローバル既定を書き換える(#1495 / #2297)

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s -X POST http://localhost:3000/api/repositories/sync
.claude/commands/orchestrate.md · 1,431 lines

How it starts

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

並列Issueオーケストレーション

概要

developブランチをオーケストレーターとして、複数Issueの並列開発からUAT合格までの全ライフサイクルを統括します。各Issueはfeatureブランチのworktreeで並列に開発され、commandmatedev CLIで制御します。

原則: オーケストレーターはコードに触れない。制御と判断のみ。

必ず守ること

実測・根拠は docs/orchestrate/ へ。本体には規則を 1 行だけ書く。 根拠は「根拠: docs/orchestrate/.md#<見出し>」の行で指し、 run のたびには読まない手順(exit code ごとの対処・担当の切り替え・monitor)は、本体に「いつ・どの文書を読むか」を書いて docs/orchestrate/ に置く。 本体のバイト数の上限は scripts/check-orchestrate-size.mjs が持つ(CI の orchestrate-size)。超えたら、実測・根拠を docs/orchestrate/ へ移す。 下は、本文に散らばった必須・禁止の規則を 1 行ずつ集めたもの。括弧は元の見出しで、規則は元の場所にも残っている。

  • オーケストレーターはコードに触れない。制御と判断のみ(概要)
  • develop ブランチ上で実行する。契約系フラグ(--contract / --verify)が使えることを最初に確かめる(前提条件)
  • 送り先は --instance で指定し、send / wait / capture / respond で同じ値を渡す(Phase 0)
  • ワーカーに /model を送らない。Claude のモデルは起動時に .claude/settings.local.json で決める(Phase 0)
  • 迷ったら難(opus)にする。迷ったら Claude に回す(1-2b)
  • worktree の npm install では --include=dev を省かない(2-2)
  • requireCommit: true を外さない(2-4)
  • 同じブランチに契約を積むときは、scope.allow を前の契約の allow との和集合にする(2-4)
  • .sh を触る Issue では gates に lint-sh を足す(2-4)
  • CHANGELOG.md と docs/module-reference.md を scope.allow に入れない。ワーカーには断片を書かせる(2-4-1)
  • 整理と、振る舞いの変更を同じ PR に入れない。整理の契約の scope.allow に tests/** を入れない(2-4-3)
  • tmux・セッションに触れる Issue は、2-5 の 4 項目を契約に転記する(2-5)
  • 実機でエージェント CLI・サーバーを動かす Issue は、隔離の項目を契約に転記する(2-6)
  • 2.5 の分析の依頼は契約を使わない(素の send)(2.5-1)
  • assign.tsv / tasks.tsv を stdin で読まない(fd 3 から読む)(3-1)
  • send が exit 99 なら、待つ前に画面を見る(3-1)
  • send の stdout はパイプで切らずファイルに落とし、送信後に started=1 を確かめる(3-1)
  • monitor の COMPLETE 判定をマージ可否の裁定に使わない。裁定は wait --verify の exit code(3-2)
  • wait には --instance "$AGENT" と --on-prompt human を付ける(3-3)
  • 裁定が作業の終わりのものだと確かめてから Auto-Yes を切る。合格の記録は再利用しない(3-3)
  • Antigravity 担当は、完了の合図(IMPL_COMPLETED)を確かめてから裁定する(3-3)
  • 不合格は先にワーカー起因かを判定する。再指示は同一 worktree につき最大 2 回(3-4)
  • 再指示の後の裁定は wait → verify --task の 2 段で行う(3-4)
  • ワーカーに「lint/tsc/test を実行して結果を報告して」と送らない(5-1)
  • 未処置の指摘(5-3)が残っている PR はマージしない(5-3)
  • 検証の順番待ちの間に、オーケストレーターが worktree にコミットしない(5-3)
  • 同時 CI は 3〜4 本。1 本に落とすのも失敗である(6-1)
  • MERGEABLE を組み合わせがコンパイルできる証拠にしない。refresh → tsc + 影響テストを通してからマージする(6-2)
  • PR の pull_request run を手でキャンセルしない(6-2)
  • bucket に fail / cancel が 1 つでもあればマージしない。判定はスクリプトで行う(6-3)
  • 断片が無い PR・check が exit 0 にならない PR はマージしない(6-4)
  • 起票の前に同じ不具合の開いている Issue を探す。起票はユーザーの了承を得てから行う(8-3)

Read the full file on GitHub · 1,431 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. yesterday Changed · +3 lines 816f5523a319
  2. 2d ago Changed · +2 lines 037e3b4acd76
  3. 14d ago Changed · +3 lines a6dd6cb34973
  4. 17d ago Changed · +1 lines 6372375a9735
  5. 18d ago Changed · -275 lines scan D → B ae51e99c78e6
  6. 21d ago Changed · +228 lines 1503ac22f877
  7. 23d ago Changed · +18 lines 6bf1437256c4
  8. 24d ago Changed · +22 lines 18288d119acc
  9. 27d ago Changed · +88 lines b99706e4b769
  10. 1mo ago First seen · 1,341 lines · 36 tokens per session scan D 69a32cd7a228

Subscribe to this mod's changes

orchestrate is a command published in the GitHub repository Kewton/CommandMate (44 stars, last pushed today), licensed MIT. It adds 36 tokens to every session and 34,291 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it B with 2 findings (reads agent configuration directories, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.