mapreduce
The MapReduce skill enables parallel task execution across multiple AI providers or agent instances, followed by intelligent consolidation of results. This produces higher-quality outputs by levera...
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o mapreduce.zip https://jpskill.com/download/18033.zip && unzip -o mapreduce.zip && rm mapreduce.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/18033.zip -OutFile "$d\mapreduce.zip"; Expand-Archive "$d\mapreduce.zip" -DestinationPath $d -Force; ri "$d\mapreduce.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
mapreduce.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
mapreduceフォルダができる - 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-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
MapReduce Skill
Skill ID: mapreduce 目的: 複数のプロバイダー/エージェントにタスクを分散し、結果を統合します カテゴリ: オーケストレーション
概要
MapReduce skill は、複数の AI プロバイダーまたはエージェントインスタンスにまたがる並列タスク実行を可能にし、その後、結果をインテリジェントに統合します。これにより、多様なモデルの強みを活用し、発見を相互検証することで、より高品質なアウトプットを生成します。
アーキテクチャ
┌─────────────────────────────────────────────────────────────────────────┐
│ MAIN THREAD (Orchestrator) │
│ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ PHASE 1: MAP (Parallel Fan-Out) │ │
│ │ │ │
│ │ Task(worker-1) ──→ output-1.md │ │
│ │ Task(worker-2) ──→ output-2.md │ │
│ │ Task(worker-3) ──→ output-3.md │ │
│ │ bash(codex) ──→ output-codex.md │ │
│ │ bash(gemini) ──→ output-gemini.md │ │
│ └─────────────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ PHASE 2: COLLECT (Timeout-Based) │ │
│ │ │ │
│ │ TaskOutput(worker-1, timeout=120s) │ │
│ │ TaskOutput(worker-2, timeout=120s) │ │
│ │ TaskOutput(worker-3, timeout=120s) │ │
│ │ Verify: output-codex.md, output-gemini.md exist │ │
│ └─────────────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ PHASE 3: REDUCE (Consolidation) │ │
│ │ │ │
│ │ Task(reducer) ──→ reads all outputs ──→ consolidated.md │ │
│ └─────────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────┘
主要な制約
サブエージェントは他のサブエージェントを生成できません。 すべてのオーケストレーションはメインスレッドで行われます。ワーカーとリデューサーは、ファイルに対して動作するサブエージェントです。
ユースケース
1. 並列プランニング
異なる戦略的バイアスを持つ複数のプロバイダーにプランニングタスクを分散します。
Workers:
- planner-conservative: 低リスク、実績のあるパターン
- planner-aggressive: 早送り、最新のパターン
- planner-security: セキュリティ第一のアプローチ
Reducer: plan-reducer
Output: specs/ROADMAP.md
参照: cookbook/parallel-planning.md
2. 複数実装
複数のモデルで同じ機能を生成し、最適なものを選択します。
Workers:
- impl-claude: Claude の実装
- impl-codex: OpenAI の実装
- impl-gemini: Gemini の実装
Reducer: code-reducer
Output: src/feature/implementation.ts
参照: cookbook/multi-impl.md
3. デバッグコンセンサス
バグに関する複数の診断を取得し、検証して最適な修正を選択します。
Workers:
- debug-claude: Claude の診断
- debug-codex: Codex の診断
- debug-gemini: Gemini の診断
Reducer: debug-reducer
Output: 適用された修正 + ドキュメント
参照: cookbook/debug-consensus.md
利用可能なリデューサー
| リデューサー | エージェントパス | 目的 |
|---|---|---|
plan-reducer |
agents/orchestration/reducers/plan-reducer.md |
プランの統合 |
code-reducer |
agents/orchestration/reducers/code-reducer.md |
コードの比較/マージ |
debug-reducer |
agents/orchestration/reducers/debug-reducer.md |
修正の検証 |
プロバイダーの統合
Claude サブエージェント (Task ツール経由)
Task(subagent_type="Plan", prompt="...", run_in_background=true)
外部 CLI プロバイダー (spawn skill 経由)
# Codex
codex -m gpt-5.1-codex -a full-auto "${PROMPT}" > output.md
# Gemini
gemini -m gemini-3-pro "${PROMPT}" > output.md
# Cursor
cursor-agent --mode print "${PROMPT}" > output.md
# OpenCode
opencode --provider anthropic "${PROMPT}" > output.md
詳細な CLI パターンについては、skills/spawn/agent/cookbook/ を参照してください。
ファイルの規則
すべての MapReduce 操作は、標準的なファイルの規則に従います。
| タイプ | 場所 | 命名 |
|---|---|---|
| プランのアウトプット | specs/plans/ |
planner-{name}.md |
| コードのアウトプット | implementations/ |
impl-{name}.{ext} |
| デバッグのアウトプット | diagnoses/ |
debug-{name}.md |
| 統合済み | プロンプトで指定 | ROADMAP.md, implementation.ts |
参照: reference/file-conventions.md
スコアリングルーブリック
各リデューサーは、特定のスコアリングルーブリックを使用します。
- プラン: 完了度、実現可能性、リスク、明確さ、革新性
- コード: 正確性、可読性、保守性、パフォーマンス、セキュリティ
- デバッグ: 正確性、最小性、安全性、明確さ、根本原因
参照: reference/scoring-rubrics.md
コマンド
| コマンド | 目的 |
|---|---|
/ai-dev-kit:mapreduce |
完全な MapReduce ワークフロー |
/ai-dev-kit:map |
分散フェーズのみ |
/ai-dev-kit:reduce |
統合フェーズのみ |
例: 完全な MapReduce
# メインスレッド内:
## ステップ 1: MAP
単一のメッセージでプランナーを起動します (並列処理を有効にします)。
Task(subagent_type="Plan", prompt="""
Create implementation plan for: User Authentication
Write to: specs/plans/planner-conservative.md
Strat
(原文がここで切り詰められています) 📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
MapReduce Skill
Skill ID: mapreduce Purpose: Fan-out tasks to multiple providers/agents, then consolidate results Category: Orchestration
Overview
The MapReduce skill enables parallel task execution across multiple AI providers or agent instances, followed by intelligent consolidation of results. This produces higher-quality outputs by leveraging diverse model strengths and cross-validating findings.
Architecture
┌─────────────────────────────────────────────────────────────────────────┐
│ MAIN THREAD (Orchestrator) │
│ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ PHASE 1: MAP (Parallel Fan-Out) │ │
│ │ │ │
│ │ Task(worker-1) ──→ output-1.md │ │
│ │ Task(worker-2) ──→ output-2.md │ │
│ │ Task(worker-3) ──→ output-3.md │ │
│ │ bash(codex) ──→ output-codex.md │ │
│ │ bash(gemini) ──→ output-gemini.md │ │
│ └─────────────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ PHASE 2: COLLECT (Timeout-Based) │ │
│ │ │ │
│ │ TaskOutput(worker-1, timeout=120s) │ │
│ │ TaskOutput(worker-2, timeout=120s) │ │
│ │ TaskOutput(worker-3, timeout=120s) │ │
│ │ Verify: output-codex.md, output-gemini.md exist │ │
│ └─────────────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ PHASE 3: REDUCE (Consolidation) │ │
│ │ │ │
│ │ Task(reducer) ──→ reads all outputs ──→ consolidated.md │ │
│ └─────────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────┘
Key Constraint
Subagents cannot spawn other subagents. All orchestration happens in the main thread. Workers and reducers are subagents that operate on files.
Use Cases
1. Parallel Planning
Fan out planning task to multiple providers with different strategic biases:
Workers:
- planner-conservative: Low-risk, proven patterns
- planner-aggressive: Fast-track, modern patterns
- planner-security: Security-first approach
Reducer: plan-reducer
Output: specs/ROADMAP.md
See: cookbook/parallel-planning.md
2. Multi-Implementation
Generate the same feature with multiple models, pick best:
Workers:
- impl-claude: Claude's implementation
- impl-codex: OpenAI's implementation
- impl-gemini: Gemini's implementation
Reducer: code-reducer
Output: src/feature/implementation.ts
See: cookbook/multi-impl.md
3. Debug Consensus
Get multiple diagnoses of a bug, verify and select best fix:
Workers:
- debug-claude: Claude's diagnosis
- debug-codex: Codex's diagnosis
- debug-gemini: Gemini's diagnosis
Reducer: debug-reducer
Output: Applied fix + documentation
See: cookbook/debug-consensus.md
Available Reducers
| Reducer | Agent Path | Purpose |
|---|---|---|
plan-reducer |
agents/orchestration/reducers/plan-reducer.md |
Consolidate plans |
code-reducer |
agents/orchestration/reducers/code-reducer.md |
Compare/merge code |
debug-reducer |
agents/orchestration/reducers/debug-reducer.md |
Verify fixes |
Provider Integration
Claude Subagents (via Task tool)
Task(subagent_type="Plan", prompt="...", run_in_background=true)
External CLI Providers (via spawn skill)
# Codex
codex -m gpt-5.1-codex -a full-auto "${PROMPT}" > output.md
# Gemini
gemini -m gemini-3-pro "${PROMPT}" > output.md
# Cursor
cursor-agent --mode print "${PROMPT}" > output.md
# OpenCode
opencode --provider anthropic "${PROMPT}" > output.md
See: skills/spawn/agent/cookbook/ for detailed CLI patterns.
File Conventions
All MapReduce operations follow standard file conventions:
| Type | Location | Naming |
|---|---|---|
| Plan outputs | specs/plans/ |
planner-{name}.md |
| Code outputs | implementations/ |
impl-{name}.{ext} |
| Debug outputs | diagnoses/ |
debug-{name}.md |
| Consolidated | Specified in prompt | ROADMAP.md, implementation.ts |
See: reference/file-conventions.md
Scoring Rubrics
Each reducer uses a specific scoring rubric:
- Plans: Completeness, Feasibility, Risk, Clarity, Innovation
- Code: Correctness, Readability, Maintainability, Performance, Security
- Debug: Correctness, Minimality, Safety, Clarity, Root Cause
See: reference/scoring-rubrics.md
Commands
| Command | Purpose |
|---|---|
/ai-dev-kit:mapreduce |
Full MapReduce workflow |
/ai-dev-kit:map |
Just the fan-out phase |
/ai-dev-kit:reduce |
Just the consolidation phase |
Example: Full MapReduce
# In main thread:
## Step 1: MAP
Launch planners in a single message (enables parallelism):
Task(subagent_type="Plan", prompt="""
Create implementation plan for: User Authentication
Write to: specs/plans/planner-conservative.md
Strategy: Conservative - proven patterns, minimal risk
""", run_in_background=true)
Task(subagent_type="Plan", prompt="""
Create implementation plan for: User Authentication
Write to: specs/plans/planner-aggressive.md
Strategy: Aggressive - fast, modern patterns
""", run_in_background=true)
Bash("codex -m gpt-5.1-codex -a full-auto 'Create auth plan' > specs/plans/planner-codex.md")
## Step 2: COLLECT
TaskOutput(task_id=conservative-id, block=true, timeout=120000)
TaskOutput(task_id=aggressive-id, block=true, timeout=120000)
# Verify codex output exists
Read("specs/plans/planner-codex.md")
## Step 3: REDUCE
Task(subagent_type="ai-dev-kit:orchestration:plan-reducer", prompt="""
Consolidate plans in specs/plans/*.md
Output: specs/ROADMAP.md
Priority: Security over speed
""")
Cookbook
parallel-planning.md: Multi-provider planning workflowsmulti-impl.md: Code generation with selectiondebug-consensus.md: Multi-diagnosis bug fixing
Reference
scoring-rubrics.md: Detailed scoring criteriafile-conventions.md: Output file standards
Related Skills
spawn: Provider-specific CLI invocation patternsmulti-agent-orchestration: General multi-agent patternsresearch: Parallel research with synthesis