swarm-scripts

swarm-scripts is a skill for Claude Code, Codex from desplega-ai/agent-swarm. It costs 82 tokens per session (2,775 once invoked), scanned A, original, MIT.

A way to write TypeScript programs that run separately from the agent and use the Swarm software kit. The programs return processed results to the agent.

In plain words
What is it for?
Use it for repeated calls across many records, data fetching and transformation, bulk work, parallel agent tasks, and repeatable scripts or APIs.
Why use it?
It avoids repeating many individual tool calls and keeps bulk or data-heavy processing out of the agent’s working context.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for repeated calls across many records, data fetching and transformation, bulk work, parallel agent tasks, and repeatable scripts or APIs.

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

Made for: Claude Code, Codex.

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-scripts

README.md
[![agentmods](https://agentmods.dev/badge/skills/desplega-ai/agent-swarm/swarm-scripts.svg)](https://agentmods.dev/skills/desplega-ai/agent-swarm/swarm-scripts)
Your own site
<a href="https://agentmods.dev/skills/desplega-ai/agent-swarm/swarm-scripts"><img src="https://agentmods.dev/badge/skills/desplega-ai/agent-swarm/swarm-scripts.svg" alt="Measured on agentmods" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,775 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
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.00082 $0.02775
Opus 5 $0.00041 $0.01388
Sonnet 5 $0.00016 $0.00555
Haiku 4.5 $0.00008 $0.00278

Measured 4d ago against content hash 4793387927f2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

swarm-scripts 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 4d 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.

templates/skills/swarm-scripts/SKILL.md · 158 lines

How it starts

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

Swarm Scripts

A swarm script is TypeScript that runs out of process with a typed Swarm SDK. Only its return value enters your context. Use one when direct tool calls would repeat, flood your context, or need deterministic processing over many records.

When to script

Situation Approach
1 to 9 SDK calls, result fits in context Direct tool calls.
10 or more similar calls, bulk or fan-out Script. Inline script-run for a one-off, a named script for reuse.
Fetch, parse, and transform heavy data Script, or ctx_* (context-mode) when your harness has it.
One large web fetch ctx_fetch_and_index (context-mode).
Multi-agent fan-out, parallel work, deterministic pipeline Workflow. See workflow-iterate.
Work that repeats on a clock Schedule. See scheduling.

Named script only when the logic will run two or more times, by you, another agent, a schedule, or a workflow. A one-off goes inline, so the catalog does not fill with scratch saves.

Reference point: a workflow triage that took about 26 tool calls returns as one result of about 4k tokens in about 13 seconds.

Loading the tools

The script tools are deferred. Load them with your harness tool search before the first call: script-search, script-run, script-upsert, script-query-types, script-delete, and for durable runs launch-script-run, get-script-run, list-script-runs.

Run script-query-types before non-trivial work. It returns the live swarm-sdk.d.ts and stdlib declarations, including generated per-app types.

Seed catalog

The swarm ships named scripts at global scope. Each one replaces a multi-step tool chain. script-search with a plain-language description finds them. Call one with script-run and name plus args.

Script Args Use
task-context-gathering { taskId, queries: [...] } the task plus a deduplicated multi-query memory recall
smart-recall { queries: [...] } multi-query memory recall without the task
memory-dedup-check { text, threshold? } near-duplicates before you store a memory
delegate { agentName, task, parentTaskId? } a subtask for an agent by name, returns { taskId }
wait-for-task { taskId } waits up to about 25 s for a terminal state, returns { done, status, output }; call again while done is false
get-child-outputs { parentTaskId } every child with status and output
complete-task { taskId, output } finish a task from inside a script
report-progress { taskId, note } a progress note from inside a script
swarm-overview {} agents and task counts
Heartbeat Audit, boot-triage see heartbeat-runbook the lead's heartbeat data gathering

Read the full file on GitHub · 158 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 4d ago Changed · +4 lines 4793387927f2
  2. 8d ago First seen · 154 lines · 82 tokens per session scan A 3919515ee1f5

Subscribe to this mod's changes

swarm-scripts is a skill published in the GitHub repository desplega-ai/agent-swarm (749 stars, last pushed today), licensed MIT. It adds 82 tokens to every session and 2,775 once invoked, about $0.0004 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-30.

Related

Other skills, from other repositories

vector-db-init

Interactively initializes the Vector DB plugin. Guided discovery asks which folders to index, confirms the manifest, then scaffolds vectorprofiles.json for high-performance In-Process or Native Server connections. Mandatory first step before ingestion or search.

richfrem/agent-plugins-skills · 49 tokens

update-cli-models

Updates model catalogs and cheapest-model references for all CLI backends (copilot, agy, claude, codex, llama). Researches current model IDs and pricing from official sources, updates the per-CLI JSON files, refreshes cheapestmodels.json/md if the cheapest pick changed, then propagates all copies via…

richfrem/agent-plugins-skills · 111 tokens

local-llm-bridge

Local Gemma 4 12B sub-agent. Routes bounded tasks directly to the optimized llama-server at localhost:8089 — no routing proxy, no cloud API, 2–5s typical response. Use for fast, private, cost-free subtask delegation from any cloud primary agent. Part of the runagent.py multi-LLM task router — cli=llama target.

richfrem/agent-plugins-skills · 85 tokens

vector-db-launch

Start the Native Python ChromaDB background server. Use when semantic search returns connection refused on port 8110, or when the user wants to enable concurrent agent read/writes.

richfrem/agent-plugins-skills · 40 tokens

local-llm-setup

Cross-platform setup wizard for the local Gemma 4 12B inference stack. Automates llama-server installation (binary download or Metal/CUDA/Vulkan/ROCm compile), model download, routing proxy daemon install (launchd/systemd/NSSM), and Mode A/B validation. Covers Day 1 bootstrap and Day 2+ reconfiguration.

richfrem/agent-plugins-skills · 78 tokens

vector-db-cleanup

Removes stale and orphaned chunks from the ChromaDB vector store for files that have been deleted or renamed. Use after files are removed or moved to keep the vector index in sync with the filesystem. user: "Clean up the vector store after I deleted some files" assistant: "I'll use vector-db-cleanup to remove orphaned…

richfrem/agent-plugins-skills · 115 tokens