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.
npx agentmods add commands/kewton/commandmate/cause-analysisgit clone --depth 1 https://github.com/Kewton/CommandMateWhat 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 | $0.00023 | $0.02118 |
| Opus 5 | $0.00012 | $0.01059 |
| Sonnet 5 | $0.00005 | $0.00424 |
| Haiku 4.5 | $0.00002 | $0.00212 |
Grade A, and why
cause-analysis 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.
How it starts
The opening of the file, as written. The whole thing — 213 lines — stays where its author put it; the contents beside it link to each section on GitHub.
根本原因分析(Cause Analysis)
概要
Issueに記載されている不具合事象を元に、他のコーディングエージェント(commandmatedev経由)を活用して根本原因を深く分析し、原因と対策案をIssue本文に追記します。
使用方法
/cause-analysis [Issue番号]
例:
/cause-analysis 571
/cause-analysis 576
前提条件
- developブランチ上で実行すること
- CommandMateサーバーが稼働していること
- 対象Issueが存在し、事象が記載されていること
- GitHubリポジトリ(https://github.com/Kewton/CommandMate)にアクセス可能
実行内容
あなたはシニアデバッグエンジニアとして、不具合の根本原因を分析します。
重要: commandmatedev で他のコーディングエージェントに分析を委譲する際は、必ず --agent オプションで claude 以外のエージェント(copilot, codex 等)を指定すること。オーケストレーター自身(claude)に送信してはならない。
Step 1: Issue情報の取得
ISSUE_NUM="$ARGUMENTS"
gh issue view "$ISSUE_NUM" --repo Kewton/CommandMate --json number,title,body,labels,comments
Issue本文から以下を抽出:
- 事象の要約
- 再現手順
- 影響範囲
- 関連するソースコード
Step 2: 事前調査(オーケストレーター側)
Issue本文に記載された関連ソースコードを確認し、分析の初期仮説を立てます。
以下の観点で初期仮説を整理:
| 観点 | 内容 |
|---|---|
| 直接原因 | コードのどの部分が事象を引き起こしているか |
| 根本原因の候補 | なぜその状態になるのか(設計問題、仕様漏れ、エッジケース等) |
| 影響パス | データフローのどの経路で問題が発生するか |
Step 3: 他エージェントによる深層分析
commandmatedevを使用して、develop worktreeの別エージェントに根本原因分析を依頼します。
WORKTREE_ID="mycodebranchdesk-develop"
ANALYSIS_PROMPT="Issue #${ISSUE_NUM} の根本原因分析を実施してください。
## Issue内容
$(gh issue view ${ISSUE_NUM} --repo Kewton/CommandMate --json body -q '.body')
## 分析要求
### Phase 1: 事象の再現パス特定
1. Issue記載の再現手順に基づき、コード上の実行パスを特定してください
2. 関連するソースファイルを読み取り、処理フローを追跡してください
3. 事象が発生する条件(トリガー条件)を具体的に特定してください
### Phase 2: 根本原因の特定
以下の観点で根本原因を分析してください:
- **直接原因**: どのコードが事象を直接引き起こしているか(ファイル名:行番号)
- **根本原因**: なぜそのコードがその状態になるのか
- **設計上の問題**: アーキテクチャや設計レベルで改善すべき点があるか
- **類似リスク**: 同じパターンが他の箇所にも存在するか
### Phase 3: 対策案の策定
以下の粒度で対策案を提示してください:
- **即座対策(Quick Fix)**: 最小限の変更で事象を解消する方法
- **恒久対策(Permanent Fix)**: 根本原因を解消する方法
- **予防策(Prevention)**: 再発を防ぐための設計改善・テスト追加"
# 必ず --agent copilot 等でclaude以外のエージェントを指定する
commandmatedev send "$WORKTREE_ID" "$ANALYSIS_PROMPT" --agent copilot --model claude-opus-4.6 --auto-yes --duration 1h
Step 4: 分析結果の待機と取得
commandmatedev wait "$WORKTREE_ID" --timeout 3600 --on-prompt agent
commandmatedev capture "$WORKTREE_ID" --agent copilot
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.
- 2d ago First seen · 213 lines · 23 tokens per session scan A fcf700db56b5
cause-analysis is a command published in the GitHub repository Kewton/CommandMate (39 stars, last pushed 2d ago), licensed MIT. It adds 23 tokens to every session and 2,118 once invoked, about $0.0001 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-30.
Other commands, from other repositories
crow-image
Show an image in Crow's Images panel — pass the file path as the argument.
release-notes
Draft release notes, recommend and apply a version bump, and update CHANGELOG.md for the next dormouse release by analyzing all merge commits and squash-merged PRs since the last release tag. Used as step 2 of the release checklist in docs/specs/deploy.md.
refresh-compare-pages
Freshly research, add, and refresh marketing compare pages, then open a descriptive PR.
build-docs
Build and serve the docs site locally with Jekyll.
release
Cut a domux release — tag HEAD, push, watch the GH Action.
review-session-log
Use when the user asks what a session did, wants to review session history, or needs to find errors in a session log.