🛠️ Multiエージェントタスク統括
複数のAIエージェントに仕事を割り振る際
📺 まず動画で見る(YouTube)
▶ 【衝撃】最強のAIエージェント「Claude Code」の最新機能・使い方・プログラミングをAIで効率化する超実践術を解説! ↗
※ jpskill.com 編集部が参考用に選んだ動画です。動画の内容と Skill の挙動は厳密には一致しないことがあります。
📜 元の英語説明(参考)
Route tasks to specialized AI agents with anti-duplication, quality gates, and 30-minute heartbeat monitoring
🇯🇵 日本人クリエイター向け解説
複数のAIエージェントに仕事を割り振る際
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o multi-agent-task-orchestrator.zip https://jpskill.com/download/3187.zip && unzip -o multi-agent-task-orchestrator.zip && rm multi-agent-task-orchestrator.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/3187.zip -OutFile "$d\multi-agent-task-orchestrator.zip"; Expand-Archive "$d\multi-agent-task-orchestrator.zip" -DestinationPath $d -Force; ri "$d\multi-agent-task-orchestrator.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
multi-agent-task-orchestrator.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
multi-agent-task-orchestratorフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-17
- 取得日時
- 2026-05-17
- 同梱ファイル
- 1
💬 こう話しかけるだけ — サンプルプロンプト
- › Multi Agent Task Orchestrator を使って、最小構成のサンプルコードを示して
- › Multi Agent Task Orchestrator の主な使い方と注意点を教えて
- › Multi Agent Task Orchestrator を既存プロジェクトに組み込む方法を教えて
これをClaude Code に貼るだけで、このSkillが自動発動します。
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
[Skill 名] multi-agent-task-orchestrator
マルチエージェントタスクオーケストレーター
概要
単一のオーケストレーターを通じて複数のAIエージェントを調整するための、本番環境でテスト済みのパターンです。エージェントが独立して(そして衝突しながら)作業するのではなく、1つのオーケストレーターがタスクを分解し、専門家へルーティングし、重複作業を防ぎ、完了とマークする前に結果を検証します。6ヶ月間で10,000以上のタスクで実証済みです。
このスキルを使用するタイミング
- 複雑なタスクで連携する必要がある3つ以上の専門エージェントがいる場合に使用します。
- エージェントが重複した作業や競合する作業を行っている場合に使用します。
- 誰が何をいつ行ったかを示す監査証跡が必要な場合に使用します。
- エージェントの出力品質が一貫せず、検証ゲートが必要な場合に使用します。
仕組み
ステップ1:オーケストレーターのアイデンティティを定義する
オーケストレーターは、自分が何であるか、何でないかを知る必要があります。これにより、委任する代わりに自分で作業することを防ぎます。
あなたはタスクオーケストレーターです。あなたは決して専門的な作業を自分で行いません。
あなたはタスクを分解し、適切なエージェントに委任し、競合を防ぎ、
完了とマークする前に品質を検証します。
あなたがそうでないもの:
- コードライターではありません — コードエージェントに委任します
- 研究者ではありません — 研究エージェントに委任します
- テスターではありません — テストエージェントに委任します
この「NOT-ブロック」パターンにより、本番環境でのタスクドリフトが約35%削減されます。
ステップ2:タスクレジストリを構築する
作業を割り当てる前に、誰かがすでにこのタスクを行っているかどうかを確認します。
import sqlite3
from difflib import SequenceMatcher
def check_duplicate(description, threshold=0.55):
conn = sqlite3.connect("task_registry.db")
c = conn.cursor()
c.execute("SELECT id, description, agent, status FROM tasks WHERE status IN ('pending', 'in_progress')")
for row in c.fetchall():
ratio = SequenceMatcher(None, description.lower(), row[1].lower()).ratio()
if ratio >= threshold:
return {"id": row[0], "description": row[1], "agent": row[2]}
return None
ステップ3:タスクを専門家へルーティングする
キーワードスコアリングを使用して、タスクを最適なエージェントに一致させます。
AGENTS = {
"code-architect": ["code", "implement", "function", "bug", "fix", "refactor", "api"],
"security-reviewer": ["security", "vulnerability", "audit", "cve", "injection"],
"researcher": ["research", "compare", "analyze", "benchmark", "evaluate"],
"doc-writer": ["document", "readme", "explain", "tutorial", "guide"],
"test-engineer": ["test", "coverage", "unittest", "pytest", "spec"],
}
def route_task(description):
scores = {}
for agent, keywords in AGENTS.items():
scores[agent] = sum(1 for kw in keywords if kw in description.lower())
return max(scores, key=scores.get) if max(scores.values()) > 0 else "code-architect"
ステップ4:品質ゲートを強制する
エージェントの出力は「主張」です。テストの出力は「証拠」です。
エージェントが完了を報告した後:
1. ファイルは実際に変更されましたか? (git diff --stat)
2. テストはパスしますか? (npm test / pytest)
3. シークレットは導入されましたか? (APIキー、トークンをgrepで検索)
4. ビルドは成功しましたか? (npm run build)
5. 意図したファイルのみが変更されましたか? (スコープチェック)
すべてのチェックがパスした後にのみ完了とマークします。
ステップ5:30分ごとのハートビートを実行する
30分ごとに尋ねます:
1. 「過去30分間に何を委任しましたか?」
2. 何もなければ → タスクバックログを開き、次のタスクを割り当てます
3. アイドル状態のエージェントをチェックします(割り当てられたタスクで30分以上メッセージがない場合)
4. アイドル状態のエージェントを再起動するか、そのタスクを再割り当てします
例
例1:コードタスクの委任
[ORCHESTRATOR -> code-architect] タスク: /api/users にレート制限を追加する
スコープ: src/middleware/rate-limit.ts のみ
検証: npm test -- --grep "rate-limit"
期限: 30分
例2:重複の処理
ユーザーが「ログインバグを修正してください」と尋ねる
レジストリチェック: タスク #47「認証バグを修正する」はsecurity-reviewerによってIN_PROGRESSです
決定: スキップ — 類似のタスクがすでに割り当てられています (78%一致)
アクション: 既存のタスクをユーザーに通知し、完了を待ちます
ベストプラクティス
- すべてのエージェントに対して常にNOT-ブロックを定義します(彼らが拒否しなければならないこと)
- タスクレジストリにはSQLiteを使用します(軽量でサーバー不要)
- 重複防止のため、類似度しきい値を55%に設定します(低いと誤検知が多すぎます)
- 証拠に基づいた品質ゲートを要求します(エージェントの主張だけでなく)
- すべての委任をログに記録します:タスクID、エージェント、スコープ、期限、検証コマンド
よくある落とし穴
-
問題: オーケストレーターが委任する代わりに自分で作業を始める 解決策: 明示的なNOT-ブロックと役割の境界を追加する
-
問題: 2つのエージェントが同時に同じファイルを変更する 解決策: ファイルレベルのロックとキューシステムを備えたタスクレジストリ
-
問題: エージェントが実際の変更なしに「完了」を主張する 解決策: 完了を受け入れる前にgit diffをチェックする品質ゲート
-
問題: タスクが滞留して進まない 解決策: 30分ごとのハートビートで古い割り当てを検出し、再割り当てする
関連スキル
@code-review- 委任後のコード変更をレビューするため@test-driven-development- エージェント出力の品質を確保するため@project-management- マルチエージェントプロジェクトの進捗を追跡するため
制限事項
- このスキルは、タスクが上記のスコープと明確に一致する場合にのみ使用してください。
- 出力を環境固有の検証、テスト、または専門家によるレビューの代替として扱わないでください。
- 必要な入力、権限、安全境界、または成功基準が不足している場合は、停止して明確化を求めてください。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Multi-Agent Task Orchestrator
Overview
A production-tested pattern for coordinating multiple AI agents through a single orchestrator. Instead of letting agents work independently (and conflict), one orchestrator decomposes tasks, routes them to specialists, prevents duplicate work, and verifies results before marking anything done. Battle-tested across 10,000+ tasks over 6 months.
When to Use This Skill
- Use when you have 3+ specialized agents that need to coordinate on complex tasks
- Use when agents are doing duplicate or conflicting work
- Use when you need audit trails showing who did what and when
- Use when agent output quality is inconsistent and needs verification gates
How It Works
Step 1: Define the Orchestrator Identity
The orchestrator must know what it IS and what it IS NOT. This prevents it from doing work instead of delegating:
You are the Task Orchestrator. You NEVER do specialized work yourself.
You decompose tasks, delegate to the right agent, prevent conflicts,
and verify quality before marking anything done.
WHAT YOU ARE NOT:
- NOT a code writer — delegate to code agents
- NOT a researcher — delegate to research agents
- NOT a tester — delegate to test agents
This "NOT-block" pattern reduces task drift by ~35% in production.
Step 2: Build a Task Registry
Before assigning work, check if anyone is already doing this task:
import sqlite3
from difflib import SequenceMatcher
def check_duplicate(description, threshold=0.55):
conn = sqlite3.connect("task_registry.db")
c = conn.cursor()
c.execute("SELECT id, description, agent, status FROM tasks WHERE status IN ('pending', 'in_progress')")
for row in c.fetchall():
ratio = SequenceMatcher(None, description.lower(), row[1].lower()).ratio()
if ratio >= threshold:
return {"id": row[0], "description": row[1], "agent": row[2]}
return None
Step 3: Route Tasks to Specialists
Use keyword scoring to match tasks to the best agent:
AGENTS = {
"code-architect": ["code", "implement", "function", "bug", "fix", "refactor", "api"],
"security-reviewer": ["security", "vulnerability", "audit", "cve", "injection"],
"researcher": ["research", "compare", "analyze", "benchmark", "evaluate"],
"doc-writer": ["document", "readme", "explain", "tutorial", "guide"],
"test-engineer": ["test", "coverage", "unittest", "pytest", "spec"],
}
def route_task(description):
scores = {}
for agent, keywords in AGENTS.items():
scores[agent] = sum(1 for kw in keywords if kw in description.lower())
return max(scores, key=scores.get) if max(scores.values()) > 0 else "code-architect"
Step 4: Enforce Quality Gates
Agent output is a CLAIM. Test output is EVIDENCE.
After agent reports completion:
1. Were files actually modified? (git diff --stat)
2. Do tests pass? (npm test / pytest)
3. Were secrets introduced? (grep for API keys, tokens)
4. Did the build succeed? (npm run build)
5. Were only intended files touched? (scope check)
Mark done ONLY after ALL checks pass.
Step 5: Run 30-Minute Heartbeats
Every 30 minutes, ask:
1. "What have I DELEGATED in the last 30 minutes?"
2. If nothing → open the task backlog and assign the next task
3. Check for idle agents (no message in >30min on assigned task)
4. Relance idle agents or reassign their tasks
Examples
Example 1: Delegating a Code Task
[ORCHESTRATOR -> code-architect] TASK: Add rate limiting to /api/users
SCOPE: src/middleware/rate-limit.ts only
VERIFICATION: npm test -- --grep "rate-limit"
DEADLINE: 30 minutes
Example 2: Handling a Duplicate
User asks: "Fix the login bug"
Registry check: Task #47 "Fix authentication bug" is IN_PROGRESS by security-reviewer
Decision: SKIP — similar task already assigned (78% match)
Action: Notify user of existing task, wait for completion
Best Practices
- Always define NOT-blocks for every agent (what they must refuse to do)
- Use SQLite for the task registry (lightweight, no server needed)
- Set similarity threshold at 55% for anti-duplication (lower = too many false positives)
- Require evidence-based quality gates (not just agent claims)
- Log every delegation with: task ID, agent, scope, deadline, verification command
Common Pitfalls
-
Problem: Orchestrator starts doing work instead of delegating Solution: Add explicit NOT-blocks and role boundaries
-
Problem: Two agents modify the same file simultaneously Solution: Task registry with file-level locking and queue system
-
Problem: Agent claims "done" without actual changes Solution: Quality gate checks git diff before accepting completion
-
Problem: Tasks pile up without progress Solution: 30-minute heartbeat catches stale assignments and reassigns
Related Skills
@code-review- For reviewing code changes after delegation@test-driven-development- For ensuring quality in agent output@project-management- For tracking multi-agent project progress
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.