Skip to main content
skill CX Codex

swarm · backnotprop — Claude Code skill: parallel workers, one report

Fans out N parallel workers on one job, drains them, and returns a single consolidated report. Useful for coverage, model races and exploration.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add backnotprop/pstack --skill swarm -a claude-code
Open on GitHub

What swarm does

The skill runs in four phases: Frame, Fan out, Aggregate, Report. You state the done predicate and the artifact the swarm must return. Then you pick the shape: partition the work into slices, race N workers on identical briefs, or mix both. For a race, the selection rule (first pass, rank all, best-of) gets declared before anything spawns.

The worker model comes from the swarm workers line in the pstack settings file: ~/.claude/rules/pstack-models.md in Claude, ~/.cursor/rules/pstack-models.mdc in Cursor, ~/.agents/pstack-models.md in other harnesses. If that file or line is missing, the skill suggests starting with grok-4.7-xhigh-fast. With auto or inherit-parent you omit model and workers run on the parent model. Every brief stands alone: goal, scope, exact slice or race arm, how to verify, what to report.

In Claude workers spawn through the Agent tool and run locally, so each one needs its own worktree or output path. The environment: "cloud" and cloud_base_branch parameters belong to Cursor's Task tool — other harnesses simply don't have them. If a worker drops out, the run continues with N-1 and notes it. A result that doesn't record the SHAs and method named in its brief is dropped and that worker respawned once; after a second miss the skill records a gap, and a gap never counts as a pass.

What it helps with

  • check several code slices at once
  • compare models on the same task
  • collect provable defects instead of the first one
  • explore an unfamiliar codebase in parallel
  • get one consolidated report instead of scattered answers

Example prompts for the agent

  • swarm this: audit error handling in src/api/ and return a report
  • race three workers on the same brief, best-of rule
  • split the refactor into slices and run them in parallel

How to install swarm

1Skills CLI (Vercel)

npx skills add backnotprop/pstack --skill swarm -a claude-code

2Manually: put the files in place

~/.claude/skills/swarm/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/swarm/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about swarm

How do I install swarm in Claude?

Run npx skills add backnotprop/pstack --skill swarm -a claude-code. The skill lands at ~/.claude/skills/swarm/SKILL.md.

What does swarm do?

It fans out N parallel workers on one job, drains them, and returns a single consolidated report with a result table, issue one-liners and gaps.

Do I need the pstack settings file?

No. If the swarm workers line is missing, workers launch on grok-4.7-xhigh-fast.

Source text

SKILL.md · MIT
---
name: swarm
description: "Fan out N parallel workers, drain them, and return one report. Use for /swarm, 'swarm this', or parallel coverage, races, gauntlets, and exploration."
disable-model-invocation: true
---

# Swarm

## 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 the pstack settings file (`~/.cursor/rules/pstack-models.mdc` in Cursor, `~/.claude/rules/pstack-models.md` in Claude Code, `~/.agents/pstack-models.md` in other harnesses). If the file 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 your subagent 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 or your harness's model list. 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`.

**Other harnesses.** These parameters belong to Cursor's `Task` tool, and `environment: "cloud"` runs a Cursor cloud agent. In another harness, use its subagent tool: `Agent` in Claude Code (`subagent_type: general-purpose`), `task` in OpenCode (`subagent_type: general`), `spawn_agent` in Codex. Workers run locally there, so give each one its own worktree or output path. Keep the brief and the model. Drop parameters your tool doesn't have. If your harness has no subagent tool, as in Pi without an extension, run the workers yourself, one after another.

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.

© backnotprop · MIT · backnotprop/pstack

Similar skills

All skills for Agent setup: memory, context, orchestration →

swarm by other authors comes first.

swarm langchain-ai Fans out independent items across subagents in parallel and aggregates the results. Useful for batch file reviews, labeling, and data extraction. CX Codex +1 8,800installs Swarm Orchestration ruvnet Skill for managing agent swarms with parallel execution, dynamic topology, and automatic load balancing. Use when a single agent is not enough and you need to orchestrate specialists of different types. CX Codex +1 2,100installs advisor-orchestrator-worker Shubham Saboo A skill that splits a large task across multiple models: an advisor plans and reviews, workers execute in parallel. Use when one model can't handle the job in one pass, or you need to research dozens of variants at once. CX Codex +1 623installs swarm-advanced ruvnet A skill that lays out how to run a swarm of agents for research, development or testing: topologies, task strategies and ready MCP calls for claude-flow. CX Codex +1 1,200installs parallel-deep-research parallel Runs multi-step deep research jobs using parallel-cli. Use it when you need an exhaustive markdown report with citations rather than a quick web search. CX Codex +1 15,600installs migrate-to-parallel parallel-web Moves web-data integrations from Exa, Tavily, Perplexity or Firecrawl onto Parallel products while keeping app behavior intact. Handy when you swap search and scraping providers. CX Codex +1 3,200installs thermos cursor Runs two code-review subagents in parallel as background tasks, then folds their findings into one prioritised report. CX Codex +1 2,100installs

From the same set44

arena Runs several parallel attempts at the same task, scores them against a rubric, then grafts the best pieces of the losers into the winning base. CX Codex +1 5,500installs create-verification-skill Generates a project-local verification skill that exercises your web UI, CLI, or service through real user flows and collects test evidence. CX Codex +1 5,300installs poteto-mode Sets poteto's agent style: concise answers with detail, deliberate subagents, simple code and verified work. CX Codex +1 5,400installs principle-prove-it-works Forces the agent to verify task outputs against real artifacts before declaring completion. It prevents models from reporting success just because code compiles. CX Codex +1 5,200installs setup-pstack Sets which model pstack runs for each role and how much reasoning budget it gets, then writes that into a rule file that overrides the skill defaults. CX Codex +1 5,300installs principle-type-system-discipline Enforces strict type system rules: brand semantic primitives, parse external data at boundaries, and derive types directly from schemas. CX Codex +1 5,300installs show-me-your-work Keeps a reviewable decision trail for long-running or unattended work. Use it when someone needs to inspect how an agent reached its result. CX Codex +1 5,300installs figure-it-out A skill for work with no ready-made playbook: it designs the plan and a pass/fail predicate first, then runs a hypothesis loop and keeps a decision trail the reviewer can read. CX Codex +1 5,300installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor