一键导入
swarm
Runs tasks via Map-Reduce, Consensus, or Relay swarms. Triggers: swarm, map-reduce, consensus swarm, relay swarm, parallel agents.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Runs tasks via Map-Reduce, Consensus, or Relay swarms. Triggers: swarm, map-reduce, consensus swarm, relay swarm, parallel agents.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
REST/GraphQL API design: naming, versioning, pagination, idempotency, OpenAPI. Triggers: API design, REST, GraphQL, OpenAPI, Swagger, idempotency, rate limit.
Direct technical voice for docs, README, user-facing text. Concise/strict modes. Triggers: documentation, README, content, output-mode, voice, prose style.
Multi-source web research methodology: retrieve-vs-answer gate, complexity-scaled search budget, query craft, primary-source preference, source-conflict skepticism, adversarial verification, attribution-without-reproduction. Triggers: deep research, multi-source, web research, synthesize sources, cross-reference, fact synthesis, source verification.
UI craftsmanship: animation rules, easing, micro-interactions, state polish. Triggers: animation, transition, ease-out, motion, micro-interaction, hover, loading state, UI polish.
Builds production MCP servers via 4-phase methodology: research, implement, test, evaluate. Triggers: build MCP, new MCP, MCP integration, MCP server scaffold.
MCP server design: tool schemas, resources, stdio/SSE, capability negotiation. Triggers: MCP, Model Context Protocol, JSON-RPC, stdio, SSE, Claude Desktop.
| name | swarm |
| description | Runs tasks via Map-Reduce, Consensus, or Relay swarms. Triggers: swarm, map-reduce, consensus swarm, relay swarm, parallel agents. |
| user-invocable | true |
| effort | max |
| argument-hint | [map-reduce|consensus|relay] [--with-kb] [--worktree] [task] |
| context | fork |
| agent | orchestrator |
| model | opus |
| allowed-tools | Bash, Read, Write, Edit, Glob, Grep, Agent, TeamCreate, TeamDelete, SendMessage, TaskCreate, TaskList, TaskUpdate, TaskGet, TaskOutput, TaskStop |
$ARGUMENTS
DO NOT do the work yourself. Decompose the task and invoke agents via multiple parallel Agent tool calls. Single-agent execution = failure.
Split task into N independent sub-tasks. Launch ALL agents in a single response (parallel execution).
# Single response with N Agent tool calls:
Agent(subagent_type="...", prompt="sub-task 1 — own files: path/a/")
Agent(subagent_type="...", prompt="sub-task 2 — own files: path/b/")
Agent(subagent_type="...", prompt="sub-task N — own files: path/n/")
After all complete: aggregate results (see Aggregation section below), produce synthesis report.
Same problem, 3 independent agents from different angles. Launch all 3 in a single response.
Agent(subagent_type="backend-specialist", prompt="[problem] — approach from data layer angle. Output: solution + confidence 0.0–1.0")
Agent(subagent_type="tech-lead", prompt="[problem] — approach from architecture angle. Output: solution + confidence 0.0–1.0")
Agent(subagent_type="performance-optimizer", prompt="[problem] — approach from performance angle. Output: solution + confidence 0.0–1.0")
After all complete: pick winner by confidence score, note dissents.
Sequential chain — each agent depends on the previous output. Launch one at a time, wait for completion before next.
# Round 1
Agent(subagent_type="tech-lead", prompt="Design the API spec. Output to docs/api-spec.md")
# Wait for completion
# Round 2
Agent(subagent_type="backend-specialist", prompt="Implement based on docs/api-spec.md. Own files: src/")
# Wait for completion
# Round 3
Agent(subagent_type="test-engineer", prompt="Write tests for src/. Own files: tests/")
Each agent MUST own distinct file paths. No overlapping paths. No exceptions.
Agent(
subagent_type="<agent-name>",
description="<3-5 word summary>",
prompt="<full task description including: original request, specific sub-task, owned files, success criteria>"
)
When agents touch overlapping paths despite ownership rules: do NOT auto-merge. Escalate to user citing which two agents touched the same hunk. Use --worktree mode to prevent this proactively (see below).
--with-kb)When $ARGUMENTS contains --with-kb, every spawned agent MUST receive KB context grounded in the project knowledge base.
mcp__rag-mcp__smart_query with the original task as query. Use use_multi_hop=true if the task spans 2+ concepts.results[*].kb_id, title, content, and source_documents_used.[KB CONTEXT] block (max 10 entries, pruned to top scores).--with-kb)[KB CONTEXT — from rag-mcp smart_query, ground all decisions in these]
- {kb_id}: {title}
{content excerpt, ≤300 chars}
- ...
[YOUR SUB-TASK]
{specific sub-task, owned files, success criteria}
[RULES]
- Cite KB entries as [PATH: kb_id] when you rely on them.
- If KB is silent on a decision, state that explicitly — do NOT invent.
- After producing your output, call mcp__rag-mcp__verify_answer with your answer + the cited kb_ids; include the verdict in your final report.
--with-kbThe synthesis step MUST include a ## KB Coverage section listing which kb_ids were actually cited and any agent that returned verdict: unsupported.
--with-kb--worktree)When $ARGUMENTS contains --worktree, every spawned agent in Map-Reduce mode runs in its own git worktree on a throwaway branch. Aggregation merges or copies the changes back into the lead workspace.
.git/index.lock all leak.--worktree)Pass isolation: "worktree" to every Agent call:
Agent(
subagent_type="...",
description="...",
prompt="...",
isolation="worktree"
)
The Agent tool returns the worktree path and branch name on completion. Empty worktrees are auto-cleaned by the runtime when the agent made no changes — you don't have to.
--worktreeAfter all agents return:
(path, branch) pairs.cd <main repo> && git merge --no-ff <branch> (or cherry-pick the commits if the agent didn't commit).git worktree remove <path> and the throwaway branch.--worktree is mandatory (not optional)--worktree