tasks-swarm

A command that runs the work items in a prd.json file using several worker agents. It understands which tasks depend on others and tracks their progress.

In plain words
What is it for?
Use it to execute a product requirements document with parallel workers, choosing the task file, number of workers, and worker model.
Why use it?
It reduces the need to run independent development tasks one by one. It also keeps task completion status synchronized in the product requirements file.

Command

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.

agentmods
npx agentmods add commands/gantisstorm/essentials-claude-code/tasks-swarm
Clone the repo
git clone --depth 1 https://github.com/GantisStorm/essentials-claude-code
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,424 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 86% copy Near-identical to another mod 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 $0.00012 $0.01424
Opus 5 $0.00006 $0.00712
Sonnet 5 $0.00002 $0.00285
Haiku 4.5 $0.00001 $0.00142

Measured 2d ago against content hash a7fcbb777cec, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

tasks-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 2d 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.

Origin

This is a copy

86% identical to beads-swarm — 85 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

essentials/commands/tasks-swarm.md · 143 lines

How it starts

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

Tasks Swarm Command

Execute prd.json tasks using parallel worker agents. All workers complete → done.

Note: Loop and swarm are interchangeable - swarm is just faster when tasks can run in parallel. Both enforce exit criteria and sync prd.json.

Uses Claude Code's built-in Task Management System for dependency tracking and visual progress (ctrl+t).

Arguments

  • [prd_path] (optional): Path to prd.json (default: ./prd.json)
  • --workers N (optional): Max concurrent workers (default: 3)
  • --model MODEL (optional): Model for workers: haiku, sonnet, opus (default: sonnet)

Instructions

Step 1: Read prd.json (Only)

DO NOT read other files, grep, or explore the codebase - just parse the prd.json:

cat <prd-path>

Parse the JSON and identify:

  • All userStories
  • Dependencies (dependsOn array)
  • Priorities (lower number = higher priority)
  • Completion status (passes: true/false)

Step 2: Create Task Graph

Create a task for each userStory and build an ID map as you go:

// Create tasks in order — each returns a task ID
TaskCreate({ "subject": "US-001: Setup database schema", ... })  // → task "1"
TaskCreate({ "subject": "US-002: Implement auth service", ... }) // → task "2"
TaskCreate({ "subject": "US-003: Add login route", ... })        // → task "3"

// ID map: { "US-001": "1", "US-002": "2", "US-003": "3" }

Full TaskCreate per story:

TaskCreate({
  "subject": "US-001: Setup database schema",
  "description": "<full description from userStory - self-contained>",
  "activeForm": "Setting up database schema",
  "metadata": { "id": "US-001", "prdPath": "<prd-path>" }
})

Translate dependsOn to addBlockedBy using the ID map:

// prd.json says: US-003 has dependsOn: ["US-001", "US-002"]
// ID map: US-001→"1", US-002→"2", US-003→"3"
TaskUpdate({
  "taskId": "3",
  "addBlockedBy": ["1", "2"]
})

A task with non-empty blockedBy shows as blocked in ctrl+t. When a blocking task is marked completed, it's automatically removed from the blocked list. A task becomes ready when its blockedBy list is empty.

Read the full file on GitHub · 143 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. 2d ago First seen · 143 lines · 12 tokens per session scan A a7fcbb777cec

Subscribe to this mod's changes

tasks-swarm is a command published in the GitHub repository GantisStorm/essentials-claude-code (91 stars, last pushed 6mo ago), licensed Unlicense. It adds 12 tokens to every session and 1,424 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 86% identical to beads-swarm, differing in 85 lines, and is treated as a copy.