CommandMate: Skill for Claude Code

.claude/skills/orchestrate-monitor/SKILL.md

orchestrate-monitor is a skill for Claude Code from Kewton/CommandMate. It costs 78 tokens per session (14,602 once invoked), scanned A, original, MIT.

A tested monitoring recipe for supervising parallel coding-agent workers, including state detection, intervention decisions, and completion checks. It includes Bash 3.2-compatible scripts and fixture-based tests, where fixtures are saved example outputs used to test the logic.

In plain words
What is it for?
Use it to poll worker sessions, classify their state, verify task completion and scope, run quality gates, and connect a worker identifier to its code checkout and task status.
Why use it?
It turns monitoring knowledge that might otherwise remain in an operator's memory into repeatable checks. The tests help prevent false reports such as declaring an unstarted worker complete.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; names the AskUserQuestion tool; positional $N argument.

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 →

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/skills/orchestrate-monitor/SKILL.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-monitor

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/kewton/commandmate/orchestrate-monitor"><img src="https://agentmods.dev/badge/skills/kewton/commandmate/orchestrate-monitor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 14,602 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 42
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 446
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium Excessive Agency · line 403
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
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.00078 $0.14602
Opus 5 $0.00039 $0.07301
Sonnet 5 $0.00016 $0.02920
Haiku 4.5 $0.00008 $0.01460

Measured 11d ago against content hash 215eed59e3de, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

orchestrate-monitor scanned grade A 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 11d ago.

The scan reads SKILL.md. This mod also ships 8 executable files (scripts/classify-state.sh, scripts/hooks-git.sh, scripts/hooks-task.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Makes network callslowCapability

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

19. **ループ変数に `path` 等の特殊名を使わない**:zsh/bash で `path` は `PATH` に tie され、curl/tmux が
.claude/skills/orchestrate-monitor/SKILL.md · 532 lines

How it starts

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

orchestrate-monitor

/orchestrate/pm-auto-issue2dev の並列運用)で実証済みのワーカー監視レシピを、 オペレータ/セッションメモリに滞留していた暗黙知から取り出し、テスト済みスクリプトにしたもの。 判定ロジック(生成中判定・STARTED ガード・prompt 分類・完了検証)は fixture ベースの単体テストで 固定されているので、プロンプトから再発明するのではなく、この中核を移植して使える。

なぜ Skill 化するか: 監視ノウハウは実運用の失敗から学ばれたが、バージョン管理外にあり再現・移転不能だった。 同種の誤報(未起動 idle の COMPLETE 誤報/検証ガード自身の偽陽性)が複数回再発したため、テストで封じる。

構成

.claude/skills/orchestrate-monitor/
├── SKILL.md
└── scripts/
    ├── monitor-lib.sh       # 共有ヘルパー(JSON scalar 抽出・ANSI 正規化・アンカー検出・違反カウント・介入先セッション導出)
    ├── classify-state.sh    # capture --json 1 ポーリング → 状態トークン
    ├── verify-completion.sh # タスク状態を一次ソースとする完了判定(+STARTED ガード、回帰#1)
    ├── verify-scope.sh      # 偽陽性しないスコープ検証(回帰#2)
    ├── quality-gate.sh      # exit code を実測する品質ゲート
    ├── monitor.sh           # オペレータ用監視ループ(temp ファイル状態)
    ├── hooks-git.sh         # 作業量フックの参考実装(worktree-id → 実 checkout の commit / 変更数)
    └── hooks-task.sh        # タスク状態フック(worktree-id → 実行契約の裁定済みステータス)

テスト: tests/unit/skills/orchestrate-monitor/。fixture は**実 capture --json を採取した生 payload (ANSI エスケープを含む)**で、fixture-fidelity.test.ts が ANSI の残存を CI で強制する (ANSI を剥がした fixture は「製品が出力しない形」を検証してしまう=回帰#3 の再生産)。 npm run test:unit に含まれ、bash -n 構文チェックも syntax.test.ts として同梱される。

使い方

# 1 つ以上の worktree-id を監督する(フラグ無しで正しいセッションへ介入する)
CM="npx commandmate@latest" \
  .claude/skills/orchestrate-monitor/scripts/monitor.sh \
  --interval 20 --idle-threshold 8 <worktree-id> [<worktree-id> ...]

# 既定インスタンス以外を見るときだけ <worktree-id>@<instance-id> で指定する
.claude/skills/orchestrate-monitor/scripts/monitor.sh w1 w2@codex-2

# 中核だけを個別に使う(Claude が監督中に呼ぶのはこちら)
commandmate capture <id> --json > poll.json
.claude/skills/orchestrate-monitor/scripts/classify-state.sh --json poll.json
#   -> NOT_RUNNING | RATE_LIMIT | GENERATING | PROMPT | IDLE

判定順(classify-state.sh)。順序自体がガードであり、各分岐は入力注入か抑止のどちらかを 引き起こすので、早すぎる発火は健全なセッションを壊す:

NOT_RUNNING → is_retrying(→GENERATING) → PROMPT → GENERATING → RATE_LIMIT → IDLE

Read the full file on GitHub · 532 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 11d ago First seen · 532 lines · 78 tokens per session scan A 215eed59e3de

Subscribe to this mod's changes

orchestrate-monitor is a skill published in the GitHub repository Kewton/CommandMate (40 stars, last pushed today), licensed MIT. It adds 78 tokens to every session and 14,602 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

verify

Drive CrowTelemetry's OTLP ingest end-to-end — boot the real receiver, POST OTLP JSON with curl, inspect the SQLite db.

corveil/crow · 30 tokens

crow-show-image

Surface an image you've generated (a diagram, chart, screenshot, or rendered figure) in Crow's Images panel so the user can see it inline. Use whenever you produce a visual artifact worth showing.

corveil/crow · 44 tokens

domux-communicate

Use when you (an agent in one domux worktree) need to hand work to, message, or read the output of the Claude agent running in ANOTHER worktree. Covers the canonical peer handoff — "I built X on branch Y, please pull it in" — plus discovering which agents are running. Wraps domux peek / domux send / domux read.

pranav7/domux · 89 tokens

crow-batch-workspace

Set up multiple Crow workspaces in parallel, delegating to crow-workspace's setup.sh for each and firing them simultaneously to cut total setup time. Use when the user invokes /crow-batch-workspace or asks to set up several Crow workspaces at once.

corveil/crow · 59 tokens

crow-review-pr

Perform a comprehensive code and security review on a GitHub pull request, then post the findings as a PR review. Use when the user invokes /crow-review-pr or asks to review a pull request through Crow.

corveil/crow · 46 tokens

domux-start

Use when starting or kicking off a new task in a tmux+domux workbench — sets up the workspace before any code: resolves the git worktree root, branches off fresh origin/main, labels the domux session so the human can find it in the switcher, then begins the task. Invoke at the start of task-shaped requests in a…

pranav7/domux · 0 tokens