跳到正文
Skillpedia
智能体15k · #10998

swarm

它能做什么

该技能同时启动多个辅助者,用于探索、覆盖或竞争性地完成一项任务,然后汇总他们的发现。适合需要快速完成大范围覆盖的人。

适用场景

  • ✓当一项任务可以拆分为可同时运行的独立部分的时候。
  • ✓当你希望对同一任务进行多次尝试,并挑选最佳结果的时候。
  • ✓当你需要大范围覆盖的时候,例如测试许多用例或界面。

技能链接

https://github.com/cursor/plugins/blob/main/harness/pstack/claude-code/skills/swarm/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/cursor/plugins/blob/main/harness/pstack/claude-code/skills/swarm/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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.

  1. Frame
  2. Fan out
  3. Aggregate
  4. Report

Phase A: Frame

  1. State the done predicate and the artifact or report the swarm must return.
  2. 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, or best-of before spawning.
  3. Pick the worker model from the swarm workers line in ~/.cursor/rules/pstack-models.mdc. If the rule or that line is missing, use grok-4.7-xhigh-fast. For auto or inherit-parent, omit model so 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.
  4. 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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能