threnody-swarm

threnody-swarm is a skill for Claude Code from timjensgrossinger/threnody. It costs 60 tokens per session (1,694 once invoked), scanned A, original, Apache-2.0.

A Threnody workflow for planning and running a task across multiple host agents in parallel waves.

In plain words
What is it for?
Use it when you need to fan out coding or review work, choose a task topology, start host-native agents, and resume a saved swarm.
Why use it?
It organizes work that can be split into independent subtasks while preserving dependencies, budgets, and a final synthesis step.

Skill for Claude Code

Written for Claude Code: PostToolUse hook event. Also seen: mentions Codex.

Part of the threnody plugin — 10 skills, 3 agents shipped together

Good fit Use it when you need to fan out coding or review work, choose a task topology, start host-native agents, and resume a saved swarm.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/timjensgrossinger/threnody/threnody-swarm
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 timjensgrossinger/threnody --skill threnody-swarm
Clone the repo
git clone --depth 1 https://github.com/timjensgrossinger/threnody

Made for: Claude Code.

Or install threnody, the plugin that ships this one along with the rest of its 10 skills, 3 agents.

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 threnody-swarm

README.md
[![agentmods](https://agentmods.dev/badge/skills/timjensgrossinger/threnody/threnody-swarm/github.svg)](https://agentmods.dev/skills/timjensgrossinger/threnody/threnody-swarm)
Your own site
<a href="https://agentmods.dev/skills/timjensgrossinger/threnody/threnody-swarm"><img src="https://agentmods.dev/badge/skills/timjensgrossinger/threnody/threnody-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 threnody-swarm

Your own site · 80×15
<a href="https://agentmods.dev/skills/timjensgrossinger/threnody/threnody-swarm"><img src="https://agentmods.dev/badge/skills/timjensgrossinger/threnody/threnody-swarm.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,694 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.
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.00060 $0.01694
Opus 5 $0.00030 $0.00847
Sonnet 5 $0.00012 $0.00339
Haiku 4.5 $0.00006 $0.00169

Measured 11d ago against content hash 74511a424def, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

threnody-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 11d 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.

skills/threnody-swarm/SKILL.md · 139 lines

How it starts

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

Threnody swarm orchestration

Default: host-native swarms

For MCP host callers (Claude, Copilot, Cursor, Codex, etc.), execute_swarm defaults to host_native:

  1. Threnody plans the task.
  2. Returns awaiting_host_execution: true + host_spawn_waves.
  3. You spawn host Task/Agent per wave — Threnody does not subprocess.

This path is unaffected by utility-only delegation rules.

Fast-start contract

Agent-emitting swarm paths must return host_spawn_waves quickly: target under 5 seconds to a spawnable handoff and under 30 seconds to first host spawn. Use the fast host-native handoff first; optional refinement, consensus, learning aggregation, and detailed receipts happen after the first worker wave starts or at terminal reporting.

Within each wave, spawn every agent as the same batch before waiting on the wave barrier. A host loop that starts one same-wave agent, waits, then starts the next is a fast-start regression.

Token discipline applies to all swarm shapes: keep host-native handoff compact, prefer bounded file-level fanout for broad sweeps, and reserve star/consensus or high-tier synthesis for explicit deep-risk work.

Workflow

  1. If not already planned, follow threnody-plan (plan-only swarm preview stops before spawn).
  2. Optionally route_task for tier context.
  3. execute_swarm(task, topology?, max_agents?, budget_limit?, workspace_root) — always pass workspace_root. Target paths are containment-checked against it; omit it and the server falls back to its own cwd and answers with workspace_root_source: "cwd_fallback" plus a workspace_root_warning.
  4. Handle response:
    • awaiting_host_execution + host_spawn_waves — execute waves via host agents. The response carries plan_summary, not a full plan object (all runs, not just review runs). Spawn from host_spawn_waves; read plan_summary.coverage for file accounting — a non-empty coverage.deferred means a named file has no owner, and coverage.packed means the agent budget merged files into fewer agents. Full plan fidelity stays server-side (inspect_run_receipt).
    • preview: true + preview_token — cost over budget; confirm then re-call with token.
    • started: true (delegate mode only) — Threnody subprocess orchestrator running.
    • Check learning_report_contract.report_mode (batch default, or inline).
  5. Reporting — depends on report_mode:
    • batch (default): Do NOT call report_host_wave for plain worker waves. Just spawn each wave natively. Per-agent learning is captured automatically (PostToolUse hook) or, when learning_capture=model, by passing the agents to the single terminal call. This is the fast path — no per-wave MCP round-trip.
    • inline (legacy): call report_host_wave after each wave with workspace_root and per-agent results (task_id, spawn_id, success, touched_files, output_excerpt).
  6. Mid-run expansion (both modes): after scaffold/contract waves, call expand_host_plan(discovered_files=[...]) to spawn additional file-scoped agents.
  7. Terminal: call report_host_swarm_complete(outcome=accepted|revised|reworked|rejected) once at the end (in batch mode this imports the whole run and finalizes). In inline mode you may instead set terminal=true on the last report_host_wave. Verify finalize.swarm_outcome.stored.
  8. Monitor:
    • Host-native: inspect_swarm for status; optional inspect_status.
    • Delegate: list_subtasks, resume_swarm_inspect, resume_swarm_confirm.

Read the full file on GitHub · 139 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. 11d ago First seen · 139 lines · 60 tokens per session scan A 74511a424def

Subscribe to this mod's changes

threnody-swarm is a skill published in the GitHub repository timjensgrossinger/threnody (2 stars, last pushed 14d ago), licensed Apache-2.0. It adds 60 tokens to every session and 1,694 once invoked, about $0.0003 per session on Opus 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-31.

Related

Other skills, from other repositories