jpskill.com
🛠️ 開発・MCP コミュニティ

bug-hunt-swarm

複数のAIエージェントが並行してバグや不具合の原因を調査し、問題の根本原因を特定したり、発生源を追跡したり、障害を診断したりする際に役立つSkill。

📜 元の英語説明(参考)

Parallel read-only multi-agent root-cause investigation for bugs and regressions. Use when: investigating bugs, finding root causes, tracing regressions, or diagnosing failures with multi-agent swarm.

🇯🇵 日本人クリエイター向け解説

一言でいうと

複数のAIエージェントが並行してバグや不具合の原因を調査し、問題の根本原因を特定したり、発生源を追跡したり、障害を診断したりする際に役立つSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o bug-hunt-swarm.zip https://jpskill.com/download/14706.zip && unzip -o bug-hunt-swarm.zip && rm bug-hunt-swarm.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/14706.zip -OutFile "$d\bug-hunt-swarm.zip"; Expand-Archive "$d\bug-hunt-swarm.zip" -DestinationPath $d -Force; ri "$d\bug-hunt-swarm.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して bug-hunt-swarm.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → bug-hunt-swarm フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Bug Hunt Swarm

4つの読み取り専用のサブエージェントを並行して使用してバグを調査し、その後、メインエージェントに考えられる原因をランク付けさせ、問題を証明または修正するための最も迅速な方法を推奨します。このスキルは診断を最優先します。このワークフローの一部として、ファイルの編集や修正の実装は行わないでください。

ステップ 1: バグパケットの作成

まず、最小限の有用な調査パケットを収集します。

  1. 症状
  2. 期待される動作
  3. 実際の動作
  4. 再現手順(既知の場合)
  5. 影響範囲
  6. ログ、スタックトレース、失敗したテスト、スクリーンショット、最近の差分、環境の詳細など、関連する証拠

次のソース順を優先します。

  1. ユーザーによる直接的な説明
  2. ユーザーから提供された明示的なファイル、スタックトレース、ログ、テスト、またはスクリーンショット
  3. バグが回帰のように見える場合の、現在の git の変更または最近のリポジトリ履歴
  4. 障害が発生している周辺の最小限の関連するコードパスまたはサブシステム

バグレポートの仕様が不十分な場合は、最小限の問題ステートメントを推測し、まだ不明な点を述べます。

サブエージェントを起動する前に、最も近いプロジェクトの指示と、影響を受ける領域に関連するドキュメントを読んでください。例:

  • AGENTS.md
  • リポジトリのワークフローに関するドキュメント
  • 影響を受けるサブシステムのアーキテクチャ、状態、ルーティング、スキーマ、またはランタイムに関するドキュメント

ステップ 2: 調査範囲の限定

スウォームのための短い調査概要を作成します。

  1. 何が壊れているように見えるか
  2. まだ証明されていないことは何か
  3. システムのどの部分が最も関与している可能性が高いか
  4. どのような証拠がすでに存在するか
  5. どのような証拠が確認としてカウントされるか

必要に応じて、読み取り専用の証拠収集を使用します。

  • rggit diffgit loggit show
  • ログ、クラッシュトレース、および設定の読み取り
  • 既存のテスト実行または最小限の安全な再現コマンド

このスキルの一部として、ファイルの編集、新しいインストルメンテーションの挿入、または修正の実装は行わないでください。

ステップ 3: 4つの読み取り専用の調査員を並行して起動

問題が大きく、並行調査が役立つほど曖昧な場合は、4つのサブエージェントを起動します。ごくわずかで明らかな問題の場合は、代わりにローカルで調査してもかまいません。

すべてのサブエージェントについて:

  • 同じバグパケットと調査概要を与える
  • サブエージェントが読み取り専用であることを明記する
  • サブエージェントにファイルの編集、apply_patch の実行、変更のステージング、コミット、またはその他の状態を変更するアクションを実行させない
  • 簡潔な調査出力のみを要求する
  • 仮説、裏付けとなる証拠、不足している証拠、最小限の証明ステップ、および信頼度を要求する
  • サブエージェントに、一般的なコード品質のフィードバック、ニトピッキング、または証拠のない推測的な推測を避けるように指示する
  • サブエージェントに、調査結果をメインエージェントのみに送信するように指示する

次の4つの調査ロールを使用します。

サブエージェント 1: 再現と範囲の調査

正確な障害の形状とその境界を明確にします。

以下を確認します。

  1. 最も狭い信頼できるトリガー
  2. バグが現れたり消えたりする条件
  3. 障害境界での期待される動作と実際の動作
  4. 影響がローカル、クロスセクション、決定的、または不安定であるかどうか

このサブエージェントは読み取り専用です。ファイルの編集、パッチの適用、またはその他のワークスペースの変更は行わないでください。

推奨されるサブエージェントの役割: reviewer

サブエージェント 2: コードパスと障害シームの調査

最も可能性の高い実行パスをトレースし、動作が分岐するシームを特定します。

以下を確認します。

  1. 状態遷移、ライフサイクルエッジ、または順序付けの問題
  2. 呼び出し元と呼び出し先の間の不一致の仮定
  3. データフローまたはコントロールフローの破損
  4. 障害の最も可能性の高い原因となる最小のコード領域

このサブエージェントは読み取り専用です。ファイルの編集、パッチの適用、またはその他のワークスペースの変更は行わないでください。

推奨されるサブエージェントの役割: 広範なトレースには explorer、より強力なローカル推論パスがより役立つ場合は reviewer

サブエージェント 3: 最近の変更と回帰の調査

近くの履歴または変更されたコントラクトで、可能性の高いリグレッサを探します。

以下を確認します。

  1. 症状と相関する最近の差分
  2. 設定、フラグ、依存関係、スキーマ、または移行のドリフト
  3. 複数のエントリポイントを一緒に変更する必要があった部分的な更新
  4. バグレポートのタイミングに適合する動作の変更

このサブエージェントは読み取り専用です。ファイルの編集、パッチの適用、またはその他のワークスペースの変更は行わないでください。

推奨されるサブエージェントの役割: reviewer

サブエージェント 4: 証明計画と可観測性の調査

主要な仮説を確認または拒否するための最も迅速な方法を決定します。

以下を確認します。

  1. 失敗するはずの最小限の既存のテストまたは再現
  2. 最も有用な現在のログ、トレース、メトリック、またはアサーション
  3. 迅速に信頼を高めることができる最小限の非変更コマンド
  4. 不足している証拠と、広範なチャーンなしでそれを収集する方法

このサブエージェントは読み取り専用です。ファイルの編集、パッチの適用、またはその他のワークスペースの変更は行わないでください。

推奨されるサブエージェントの役割: reviewer

真の原因を見つける可能性を大幅に向上させる仮説のみを報告してください。6つの曖昧な推測を返すよりも、2つの証拠に裏付けられた理論を返す方が優れています。

ステップ 4: ランク付けされた仮説の合成

メインエージェントは合成を所有します。サブエージェントの出力を最終出力ではなく、生の調査入力として扱います。

仮説をマージしてランク付けします。

  • 重複を組み合わせる
  • 弱い推測を破棄する
  • 優雅さよりも証拠を優先する
  • 単なる寄与要因から可能性の高い根本原因を分離する
  • 代替理論は、それらが依然として妥当な場合にのみ保持する

生き残った仮説を次の形状に正規化します。

  1. 仮説
  2. 裏付けとなる証拠
  3. 不足している証拠または矛盾する証拠
  4. 最小限の証明ステップ
  5. 信頼度: 高、中、または低

証拠が実際のランキングを行うには弱すぎる場合は、そう直接述べ、代わりに主要な未解決の質問を提示します。

ステップ 5: 明確な診断パスの出力

結果を次の順序で提示します。

  1. 最も可能性の高い根本原因
  2. 妥当な代替原因(ある場合)
  3. 最速の証明ステップ
  4. 推奨される修正パス
  5. 未解決の質問またはブロッカー

修正がまだ明確でない場合は、診断が完了したふりをする代わりに、次の証明ステップを推奨します。

役立つ場合は、アクションを次のようにグループ化します。

  • prove now
  • `
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Bug Hunt Swarm

Investigate a bug with four read-only sub-agents in parallel, then have the main agent rank the likely causes and recommend the fastest path to prove or fix the issue. This skill is diagnosis-first: do not edit files or implement fixes as part of this workflow.

Step 1: Build the Bug Packet

Start by collecting the smallest useful investigation packet:

  1. Symptom
  2. Expected behavior
  3. Actual behavior
  4. Reproduction steps, if known
  5. Scope of impact
  6. Relevant evidence, such as logs, stack traces, failing tests, screenshots, recent diffs, or environment details

Prefer this source order:

  1. Direct user description
  2. Explicit files, stack traces, logs, tests, or screenshots provided by the user
  3. Current git changes or recent repo history when the bug appears regression-like
  4. The smallest relevant code path or subsystem surrounding the failure

If the bug report is underspecified, infer a minimal problem statement and say what is still unknown.

Before launching sub-agents, read the closest project instructions and relevant docs for the touched area, such as:

  • AGENTS.md
  • repo workflow docs
  • architecture, state, routing, schema, or runtime docs for the affected subsystem

Step 2: Bound the Investigation

Write a short investigation brief for the swarm:

  1. What appears broken
  2. What is not yet proven
  3. What part of the system is most likely involved
  4. What evidence already exists
  5. What kind of proof would count as confirmation

Use read-only evidence gathering where useful:

  • rg, git diff, git log, git show
  • reading logs, crash traces, and config
  • existing test runs or the smallest safe reproduction command

Do not edit files, inject new instrumentation, or implement fixes as part of this skill.

Step 3: Launch Four Read-Only Investigators in Parallel

Launch four sub-agents when the problem is large or ambiguous enough that parallel investigation helps. For a tiny and obvious issue, it is acceptable to investigate locally instead.

For every sub-agent:

  • give the same bug packet and investigation brief
  • state that the sub-agent is read-only
  • do not let the sub-agent edit files, run apply_patch, stage changes, commit, or perform any other state-mutating action
  • ask for concise investigation output only
  • ask for: hypothesis, supporting evidence, missing evidence, smallest proof step, and confidence
  • tell the sub-agent to avoid generic code quality feedback, nits, or speculative guesses without evidence
  • tell the sub-agent to send findings back to the main agent only

Use these four investigation roles.

Sub-Agent 1: Reproduction and Scope Investigation

Clarify the exact failure shape and its boundaries.

Check for:

  1. The narrowest reliable trigger
  2. Conditions that make the bug appear or disappear
  3. Expected versus actual behavior at the failure boundary
  4. Whether the impact is local, cross-cutting, deterministic, or flaky

This sub-agent is read-only. It must not edit files, apply patches, or make any other workspace changes.

Recommended sub-agent role: reviewer

Sub-Agent 2: Code Path and Failure Seam Investigation

Trace the most likely execution path and identify the seam where behavior diverges.

Check for:

  1. State transitions, lifecycle edges, or ordering problems
  2. Mismatched assumptions between caller and callee
  3. Data-flow or control-flow breaks
  4. The smallest code region most likely responsible for the failure

This sub-agent is read-only. It must not edit files, apply patches, or make any other workspace changes.

Recommended sub-agent role: explorer for broad tracing, or reviewer when a stronger local reasoning pass is more useful

Sub-Agent 3: Recent Change and Regression Investigation

Look for likely regressors in nearby history or changed contracts.

Check for:

  1. Recent diffs that correlate with the symptom
  2. Config, flag, dependency, schema, or migration drift
  3. Partial updates where several entry points should have changed together
  4. Behavior changes that fit the timing of the bug report

This sub-agent is read-only. It must not edit files, apply patches, or make any other workspace changes.

Recommended sub-agent role: reviewer

Sub-Agent 4: Proof Plan and Observability Investigation

Determine the fastest way to confirm or reject the leading hypotheses.

Check for:

  1. The smallest existing test or reproduction that should fail
  2. The most useful current logs, traces, metrics, or assertions
  3. A minimal non-mutating command that could raise confidence quickly
  4. What evidence is missing and how to collect it without broad churn

This sub-agent is read-only. It must not edit files, apply patches, or make any other workspace changes.

Recommended sub-agent role: reviewer

Report only hypotheses that materially improve the odds of finding the real cause. It is better to return two evidence-backed theories than six vague guesses.

Step 4: Synthesize Ranked Hypotheses

The main agent owns synthesis. Treat sub-agent output as raw investigation input, not final output.

Merge and rank the hypotheses:

  • combine duplicates
  • discard weak speculation
  • prefer evidence over elegance
  • separate likely root causes from mere contributing factors
  • keep alternate theories only when they remain plausible

Normalize the surviving hypotheses into this shape:

  1. Hypothesis
  2. Supporting evidence
  3. Missing or conflicting evidence
  4. Smallest proof step
  5. Confidence: high, medium, or low

If the evidence is too weak for a real ranking, say so directly and present the leading open questions instead.

Step 5: Output a Clear Diagnosis Path

Present the result in this order:

  1. Most likely root cause
  2. Plausible alternate causes, if any
  3. Fastest proof step
  4. Recommended fix path
  5. Open questions or blockers

When the fix is not yet clear, recommend the next proving step instead of pretending the diagnosis is complete.

When helpful, group actions into:

  • prove now
  • fix next
  • follow up later

Do not implement fixes as part of this skill. The output is a read-only diagnosis with a prioritized path forward.