Swarm

作者 cursorccb5507cec15無授權條款10K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫今天更新

Fan out N parallel workers, drain them, and return one report. Use for /swarm, 'swarm this', or parallel coverage, races, gauntlets, and exploration.

僅含說明AI & Agents
AI 產生的概覽

平行派出 N 個雲端工作單元,彙整其結果並回傳一份統一報告。

功能
此技能負責編排一組平行工作單元:先確定完成判定與形態(分片涵蓋、同一份簡報的競速,或兩者混合),在單一訊息中派出 N 個工作單元,再把終端結果彙整成一張精簡表格,附上帶證據的問題與明確的缺口。它產出的是單一彙整的對話內報告,而非原始工作單元輸出。它也規範了工作單元掉線、缺少驗證資料,以及競速選擇規則(例如 first pass、rank all、best-of)的處理方式。
適用情境
當任務適合平行涵蓋、競速、連續挑戰或探索時使用,也適用於使用者呼叫 /swarm 或說出「swarm this」的情況。它適合可拆分為獨立分片,或針對同一份簡報進行多路競爭嘗試的工作。
執行需求
需要一個支援透過 Task 工具派生次代理、具備雲端或本機執行環境以及背景執行的代理環境。它會引用位於 ~/.cursor/rules/pstack-models.mdc 的模型規則檔與一個預設工作單元模型識別碼。它不附帶指令碼,僅為指示。

Swarm

Fan out N parallel cloud workers. They may cover separate slices, race the same brief, or mix both. The parent waits, aggregates, and returns one report.

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. Set N from the user or derive it from the shape. N is total workers, not the cloud concurrency limit.
  4. 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.
  5. 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 4 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.

Keep a compact result table, one-line evidenced issues, and explicit gaps or dropouts.

Phase D: Report

Return one consolidated in-chat report with the table, issue one-liners, gaps or dropouts, and the race rule when used.

來源與署名

來源:cursor/plugins位於pstack/skills/swarm提交ccb5507

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架