swarm

swarm is a skill for Claude Code from michael-denyer/pstack-claude. It costs 41 tokens per session (1,123 once invoked), scanned A, original, MIT.

A procedure that sends several workers to investigate tasks in parallel and combines their results into one report. The workers can explore different parts of a problem or independently attempt the same task.

In plain words
What is it for?
Use it when a task benefits from multiple independent investigations, such as coverage checks, race conditions, exploratory work, or parallel reviews.
Why use it?
It reduces the time needed for broad exploration, parallel coverage, race testing, and finding competing solutions.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents; mentions Claude Code; mentions Codex.

Part of the pstack plugin — 69 skills, 4 agents, 1 hook shipped together

Good fit Use it when a task benefits from multiple independent investigations, such as coverage checks, race conditions, exploratory work, or parallel reviews.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/michael-denyer/pstack-claude/swarm
About the project

pstack-claude is a set of opinionated coding-agent skills and workflows ported from Cursor to Claude Code, Codex, Pi, and other agent harnesses. It guides agents toward concise, simple, and verified code by routing goals to suitable workflows and supporting subagent tools. The catalogue entries are the project's skills, agents, hook, and plugin implementations for these agent environments.

michael-denyer/pstack-claude · 5,058 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add michael-denyer/pstack-claude --skill swarm
Clone the repo
git clone --depth 1 https://github.com/michael-denyer/pstack-claude

Made for: Claude Code.

Or install pstack, the plugin that ships this one along with the rest of its 69 skills, 4 agents, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for swarm

README.md
[![agentmods](https://agentmods.dev/badge/skills/michael-denyer/pstack-claude/swarm/github.svg)](https://agentmods.dev/skills/michael-denyer/pstack-claude/swarm)
Your own site
<a href="https://agentmods.dev/skills/michael-denyer/pstack-claude/swarm"><img src="https://agentmods.dev/badge/skills/michael-denyer/pstack-claude/swarm/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for swarm

Your own site · 80×15
<a href="https://agentmods.dev/skills/michael-denyer/pstack-claude/swarm"><img src="https://agentmods.dev/badge/skills/michael-denyer/pstack-claude/swarm.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,123 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
  • Socket pass 6 Nov 2026
  • Snyk pass 5 Nov 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00041 $0.01123
Opus 5.5 $0.00016 $0.00449
Sonnet 5.5 $0.00008 $0.00225
Haiku 4.5 $0.00004 $0.00112

Measured 5d ago against content hash 54f7b5f9ff50, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

swarm scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/pstack/skills/swarm/SKILL.md · 59 lines

How it starts

The opening of the file, as written. The whole thing — 59 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Swarm

On Codex, read the platform mapping, including its per-skill notes, before following this skill.

On GitHub Copilot, read the platform mapping, including its per-skill notes, before following this skill.

On Muse, read the platform mapping, including its per-skill notes, before following this skill.

On Antigravity, read the platform mapping, including its per-skill notes, before following this skill.

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 pstack-models.md. If the sheet or that line is missing, use the default in Models. For auto or inherit-parent, omit model so the workers run on the parent model. If the Agent 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 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: "general-purpose", run_in_background: true, and the step 3 model, left unset for auto or inherit-parent. Claude Code subagents all run on this machine, so isolation comes from the worktree or output directory assigned in Phase A, not from a remote environment.

Read the full file on GitHub · 59 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago Changed 54f7b5f9ff50
  2. 26d ago Changed · +2 lines 743f76bf4589
  3. 1mo ago Changed 1d74070322e2
  4. 1mo ago Changed d9f08647b338
  5. 1mo ago Changed · +2 lines 4a905214ac13
  6. 1mo ago Changed · -5 lines f865e75ebb1e
  7. 1mo ago Changed · +2 lines 4f6163d77992
  8. 1mo ago Changed 3c9b09bc625d
  9. 2mo ago Changed · +4 lines 50b6ec27bc3a
  10. 2mo ago First seen · 54 lines · 41 tokens per session scan A b7449208f45b

Subscribe to this mod's changes

swarm is a skill published in the GitHub repository michael-denyer/pstack-claude (5,058 stars, last pushed today), licensed MIT. It adds 41 tokens to every session and 1,123 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

swarm compared with skills from other repositories

swarm next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
swarmmichael-denyer/pstack-claudeSkill5.1ktodayMITA41Claude Code
postgresql-table-designwshobson/agentsSkill43kyesterdayMITA37Claude Code
istio-traffic-managementwshobson/agentsSkill43kyesterdayMITA40Claude Code
event-store-designwshobson/agentsSkill43kyesterdayMITA33Claude Code
chief-data-officer-advisoralirezarezvani/claude-skillsSkill31ktodayMITA61Claude Code
strategic-alignmentalirezarezvani/claude-skillsSkill31ktodayMITA38Claude Code
general-counsel-advisoralirezarezvani/claude-skillsSkill31ktodayMITA68Claude Code