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.
npx skills add desplega-ai/agent-swarm --skill swarm-scriptsgit clone --depth 1 https://github.com/desplega-ai/agent-swarmWrote 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.
[](https://agentmods.dev/skills/desplega-ai/agent-swarm/swarm-scripts)<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.
<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>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once 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 |
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` 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 |
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.
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.
- yesterday Changed c17efccdd606
- 4d ago Changed · +6 lines 78420ef1144a
- 5d ago Changed · +19 lines · +18 tokens per session f37dab0909e5
- 7d ago Changed · +2 lines 6d76f0cf8ef7
- 9d ago Changed · +1 lines 75a00c7e1251
- 11d ago Changed af110862eb60
- 13d ago Changed · +10 lines c15a5b272bd5
- 23d ago Changed de6a0659bff7
- 1mo ago Changed ee54ea595cff
- 1mo ago First seen · 159 lines · 82 tokens per session scan A 87726c243d17
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.
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.
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.
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.
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.
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.
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.