swarm
它能做什么
该技能同时启动多个辅助者,用于探索、覆盖或竞争性地完成一项任务,然后汇总他们的发现。适合需要快速完成大范围覆盖的人。
适用场景
- ✓当一项任务可以拆分为可同时运行的独立部分的时候。
- ✓当你希望对同一任务进行多次尝试,并挑选最佳结果的时候。
- ✓当你需要大范围覆盖的时候,例如测试许多用例或界面。
技能链接
https://github.com/cursor/plugins/blob/main/harness/pstack/claude-code/skills/swarm/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请用 swarm 方式检查全部十二个设置页面是否有失效链接,并给我一份报告。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会设定明确的目标,把工作分成若干部分或相同的尝试,并行运行各个工作者,然后把结果合并为一份报告,发现的问题放在最前面。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Swarm
In Claude Code, read the Claude Code adapter once per session before you follow this skill. It maps the Cursor names in pstack skills to Claude Code.
Start
Open a todolist with one entry per phase before launching anything.
- Frame
- Fan out
- Aggregate
- Report
Phase A: Frame
- State the done predicate and the artifact or report the swarm must return.
- Choose the shape. Partition into slices, race N workers on identical briefs, or mix both. For a race or mixed shape, declare
first pass,rank all, orbest-ofbefore spawning. - Pick the worker model from the
swarm workersline in~/.cursor/rules/pstack-models.mdc. If the rule or that line is missing, usegrok-4.7-xhigh-fast. Forautoorinherit-parent, omitmodelso the workers run on the parent model. If the Task tool rejects a slug, use the default and say so. If it rejects the default, use the closest valid slug of the same family from its error message. For a model race, name each arm's model up front. Pick each subagent's reasoning level and fast or standard speed for the job, per the Subagents section of the poteto-mode skill. - Give each worker its own writable output when it writes. When workers verify or measure commits, each brief names the exact SHAs. A measurement brief also names the method (sample count, what one sample is, order). The worker records both in its result.
Phase B: Fan out
Spawn all N workers in one message with subagent_type: generalPurpose, environment: "cloud", run_in_background: true, and the step 3 model, left unset for auto or inherit-parent. Use environment: "local" only when the worker needs access to something on the user's computer.
When a worker must start from a non-default pushed branch, pass cloud_base_branch.
Every brief stands alone. Include the goal, scope, exact slice or race arm, how to verify, and what to report. Reports use PASS, ISSUES, or BLOCKED with evidence. A worker that can prove a defect reports ISSUES and lists every issue it can prove, not only the first.
If a worker drops out, proceed with N-1 and note it.
Phase C: Aggregate
Read the terminal results. Drop a result that does not record the SHAs and method its brief names, and respawn that worker once. After a second miss, record a gap. A gap does not count as a pass. For coverage, every required slice needs a result. For a race, apply the selection rule declared up front. Use first pass, rank all, or best-of. Do not paste raw worker dumps.
Phase D: Report
Return one consolidated in-chat report with a result table, issue one-liners, gaps or dropouts, and the race rule when used.
常见问题
最终报告包含什么?
发现的问题放在最前面,重复项会被合并,有分歧的地方由智能体自行判断解决。
它会启动多少个工作者?
数量取决于你的要求以及任务的拆分方式。
由哪个模型运行工作者?
使用你 pstack 模型规则中设置的工作者模型;如果没有设置,则使用默认模型。
详情
作者的原始描述
Fan out N parallel workers, drain them, and return one report. Use for /swarm, 'swarm this', or parallel coverage, races, gauntlets, and exploration.
repo: cursor/plugins
热度
- GitHub 星标
- 15k
- 排名
- #10998
- 许可证
- —
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
advisor
15k如果你开启该功能,让你的智能体在关键节点咨询一个更强的第二模型,例如在重大决定之前,或在错误上卡住时。
check-agent-compatibility
15k全面检查 AI 编程智能体能否启动、验证和记录某个代码仓库,并返回一个兼容性评分以及主要问题。
cli-for-agents
15k教你的智能体设计或审查命令行工具,使 AI 智能体无需提示即可运行,并提供清晰的帮助文字和示例。
continual-learning
15k通过把回顾过往对话的工作交给专门的记忆更新程序,使你的 AGENTS.md 笔记保持最新。