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.
curl -O https://raw.githubusercontent.com/Kewton/CommandMate/main/.claude/commands/bug-fix.mdgit clone --depth 1 https://github.com/Kewton/CommandMateWrote 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.
[](https://agentmods.dev/commands/kewton/commandmate/bug-fix)<a href="https://agentmods.dev/commands/kewton/commandmate/bug-fix"><img src="https://agentmods.dev/badge/commands/kewton/commandmate/bug-fix/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.
<a href="https://agentmods.dev/commands/kewton/commandmate/bug-fix"><img src="https://agentmods.dev/badge/commands/kewton/commandmate/bug-fix.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00021 | $0.03187 |
| Opus 5.5 | $0.00008 | $0.01275 |
| Sonnet 5.5 | $0.00004 | $0.00637 |
| Haiku 4.5 | $0.00002 | $0.00319 |
Grade A, and why
bug-fix 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 21d 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 — 317 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PMバグ修正スキル
概要
不具合(バグ、エラー、予期しない動作)の調査から修正、テスト、報告まで完全自動化するプロジェクトマネージャースキルです。ユーザーは不具合の概要を伝えるだけで、原因調査→対策案提示→修正実施を自律的に実行します。
アーキテクチャ: サブエージェント方式を採用し、各フェーズを専門エージェントに委譲します。
使用方法
/bug-fix [不具合の概要]/bug-fix "APIエラーが発生"- 「一覧ページでエラーが表示される問題を調査してください」
実行内容
あなたはプロジェクトマネージャーとして、不具合対応を統括します。各フェーズは専門サブエージェントに委譲し、結果ファイルを確認しながら修正完了まで導いてください。
パラメータ
- bug_description: 不具合の概要(必須)
- error_logs: エラーログファイルパス(任意)
- severity: 重大度(critical/high/medium/low、デフォルト: high)
- related_issue: 関連Issue番号(任意)
実行フェーズ
Phase 0: 初期設定とTodoリスト作成
まず、TodoWriteツールで作業計画を作成してください:
- [ ] Phase 1: 不具合調査
- [ ] Phase 2: 対策案提示・ユーザーフィードバック
- [ ] Phase 3: 作業計画立案
- [ ] Phase 4: TDD修正実施
- [ ] Phase 5: 受入テスト
- [ ] Phase 6: 進捗報告
Phase 1: 不具合調査
1-1. 不具合情報の収集
ユーザーから以下の情報を収集(不足している場合は質問):
## 不具合情報
- **概要**: [ユーザー入力]
- **エラーメッセージ**: [あれば]
- **再現手順**: [あれば]
- **影響範囲**: [全ユーザー / 特定条件のユーザー]
- **環境情報**: [ブラウザ, OS, Node.js バージョン]
1-1b. bug Issue として起票するとき
不具合を bug Issue として起票するとき(gh issue create --label bug --body … でテンプレートを通らないときも)、本文の末尾に次の「分類」節を置く。
値は決まった語から選ぶ(.github/ISSUE_TEMPLATE/bug_report.md と同じ語。日次メトリクスの bug-flow がこの節を数える)。
## 分類
- 原因の PR: #<番号> / 不明 / なし(以前から)/ 上流(<CLI> <版>)
- 発見経路: uat / review / orchestrate / daily-use / automated
- 影響する経路: chat / terminal / cli / mobile / auto-yes / push / なし(内部)
- 各行は 1 つを選んで書き換える(例:
- 原因の PR: #3191、- 原因の PR: 上流(codex 0.50.0)、- 発見経路: uat)。 影響する経路だけは複数を,で区切って書ける(例:- 影響する経路: chat, mobile)。選択肢を残したままの行は「未記入」に数えられる - 影響する経路は取りこぼしを防ぐ欄。直す人は、挙げた経路すべてを確かめる
- 影響する経路が
なし(内部)(テスト・CI・開発用スキル・agent-health・orchestrate)なら、bugに加えてinternalラベルも付ける (gh issue create … --label bug --label internal)
1-2. ディレクトリ構造作成
BUG_ID=$(date +%Y%m%d_%H%M%S)
BASE_DIR="dev-reports/bug-fix/${BUG_ID}"
mkdir -p "$BASE_DIR"
1-3. 調査コンテキストファイル作成
ファイルパス: dev-reports/bug-fix/{bug_id}/investigation-context.json
{
"issue_description": "不具合の概要",
"error_logs": ["エラーログ1"],
"affected_files": ["src/lib/xxx.ts"],
"reproduction_steps": ["1. xxx", "2. yyy"],
"environment": {
"os": "macOS",
"node_version": "18.x",
"browser": "Chrome"
},
"severity_hint": "high"
}
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.
- 21d ago Changed · +26 lines da615969950b
- 23d ago Changed · +18 lines 2852edf9cbb1
- 1mo ago First seen · 273 lines · 21 tokens per session scan A 3de334afce07
bug-fix is a command published in the GitHub repository Kewton/CommandMate (44 stars, last pushed today), licensed MIT. It adds 21 tokens to every session and 3,187 once invoked, about $0.0001 per session on Opus 5.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
pair
AI pair programming — switch between Driver, Navigator, TDD, Review, and Debug modes.
bug
Reproduce then TDD-fix a ready-for-agent bug ticket in this checkout. Web bugs get a browser repro first.
apex-quick
Quick Flow for bounded fixes - the full APEX route with Brainstorm skipped and Plan compressed to one task; Analyze trio, delegated execution, eLicit, Verify, challenger and full sniper always run.
api-aqa-flow-execution-and-report-analysis
Phase 6 Execution & Report Analysis of api-aqa-flow (USER INTERACTION REQUIRED).
timeout-fix
A procedure for diagnosing and fixing tests that exceed their time limit by finding causes such as slow processing, hanging network calls, deadlocks, heavy setup, or leaked resources.
blast-radius
Find what a change could break beyond the diff before it ships, and prove the one fact it's safe because of by running real code instead of writing it up. Usage: /blast-radius.