swarm-scripts

swarm-scripts is a skill for Claude Code from desplega-ai/agent-swarm. It costs 100 tokens per session (4,630 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 Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the agent-swarm plugin — 30 skills, 11 commands, 5 agents, 6 hooks, 1 MCP server shipped together

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.

Or install agent-swarm, the plugin that ships this one along with the rest of its 30 skills, 11 commands, 5 agents, 6 hooks, 1 MCP server.

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/github.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/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-scripts

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 100 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,630 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00100 $0.04630
Opus 5.5 $0.00040 $0.01852
Sonnet 5.5 $0.00020 $0.00926
Haiku 4.5 $0.00010 $0.00463

Measured yesterday against content hash c17efccdd606, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

swarm-scripts scanned grade A with 1 finding 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 yesterday.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- `ctx.sh` is just-bash, a bash interpreter in TypeScript: pipes, globs, `grep`, `sed`, `awk`, `jq`, `sort`, `wc`, `find`, `xargs`. No `git`, `curl`, `node`, `python`, or network. Files stay across calls in one run; `cd`
templates/skills/swarm-scripts/SKILL.md · 197 lines

How it starts

The opening of the file, as written. The whole thing — 197 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).
A schedule, workflow, or API script that reads or writes drive files Script with ctx.fs and ctx.sh.
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, routingReason, routingNote, 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
schedule-health, task-failure-audit, boot-triage see heartbeat-runbook the lead's heartbeat data gathering

Read the full file on GitHub · 197 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. yesterday Changed c17efccdd606
  2. 4d ago Changed · +6 lines 78420ef1144a
  3. 5d ago Changed · +19 lines · +18 tokens per session f37dab0909e5
  4. 7d ago Changed · +2 lines 6d76f0cf8ef7
  5. 9d ago Changed · +1 lines 75a00c7e1251
  6. 11d ago Changed af110862eb60
  7. 13d ago Changed · +10 lines c15a5b272bd5
  8. 23d ago Changed de6a0659bff7
  9. 1mo ago Changed ee54ea595cff
  10. 1mo ago First seen · 159 lines · 82 tokens per session scan A 87726c243d17

Subscribe to this mod's changes

swarm-scripts is a skill published in the GitHub repository desplega-ai/agent-swarm (930 stars, last pushed today), licensed MIT. It adds 100 tokens to every session and 4,630 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). 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

prompt-scanner

A scanner for text sent to an AI agent, looking for prompt injection and jailbreak attempts. Prompt injection is text that tries to override an agent's instructions; a jailbreak tries to bypass its safety limits.

alibaba/anolisa · 103 tokens

security-observability

A read-only tool for examining security events already saved by agent-sec-cli, a command-line security log. It can connect those events to an agent session, run, or trace.

alibaba/anolisa · 145 tokens

add-backend

Guide for adding a backend (Rust or Python) to the agent-sec-core security middleware. Use when creating new backends, integrating Rust or Python code into the security middleware, or extending with new backend actions.

alibaba/anolisa · 46 tokens

skill-ledger

A security record for agent skills, which are reusable instruction packages for coding agents. It shows their status, reviews risk exposure, and can certify them with quick or user-approved deeper scans.

alibaba/anolisa · 67 tokens

regex-mastery

Use this skill when writing regular expressions, debugging pattern matching,optimizing regex performance, or implementing text validation. Triggers on regex, regular expressions, pattern matching, lookahead, lookbehind, named groups, capture groups, backreferences, and any task requiring text pattern matching.

alibaba/anolisa · 60 tokens

pr-body

A tool that reviews all commits on the current branch and creates or updates a pull request title and description. A pull request is a proposed code change submitted for review.

alibaba/anolisa · 68 tokens