update

A command that updates the Swarm plugin to its newest available version.

In plain words
What is it for?
Use it to update the Swarm plugin in the current user or project installation.
Why use it?
It refreshes the local marketplace information first and determines the correct installation scope, avoiding updates that miss a newer version or target the wrong install.

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/dheerg/swarms/update
Clone the repo
git clone --depth 1 https://github.com/DheerG/swarms
Per session 8 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,144 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00008 $0.01144
Opus 5 $0.00004 $0.00572
Sonnet 5 $0.00002 $0.00229
Haiku 4.5 $0.00001 $0.00114

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

Security

Grade A, and why

update 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.

commands/update.md · 41 lines

How it starts

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

/swarm:update

Run these commands in order using the Bash tool. The order is load-bearing: marketplace update must run first to refresh the local marketplace clone — otherwise plugin update reads a stale clone and reports "already at latest" even when a newer version exists. plugin update does not auto-detect the install scope (it defaults to user), so resolve the real scope from plugin list before updating.

  1. claude plugin marketplace update swarms
  2. claude plugin list --json — read the entries whose id is swarm@swarms and resolve the install scope yourself (no extra tooling; read the JSON from the output):
    • Exactly one entry → use its scope.
    • Multiple entries → prefer the project entry whose projectPath matches the current project — in a git worktree, that is the main checkout root — the parent directory of what git rev-parse --git-common-dir returns (a permission prompt is acceptable) — not the worktree path; otherwise the user entry; otherwise whichever remains (local, managed).
    • No entry → treat as a failure: use the failure handling at the end of this file.
  3. claude plugin update swarm@swarms --scope <resolved scope> — for a project-scope install whose projectPath is not the current directory (e.g., running from a git worktree), run the update pinned to that path in a subshell so the session's working directory is unchanged: (cd "<projectPath>" && claude plugin update swarm@swarms --scope project). If you need another way to locate the main checkout (e.g., git rev-parse --git-common-dir), use it even if it requires a permission approval — a prompt beats failing.

After the commands succeed, choose the message from the plugin update output. The reliable signal is the success token "updated from X to Y" (the command prints e.g. "updated from 0.5.3 to 0.5.4" — this also carries the version numbers to substitute):

  • If the output contains "updated from X to Y" (a new version was installed) — use the update-applied message and STOP directive below. Substitute the real X and Y; do not emit the literal placeholders "vX"/"vY". Do not soften the restart instruction, and do not offer /reload-plugins or any in-session reload as a shortcut.
  • If the commands succeeded but the output does not contain "updated from X to Y" (it reports you are already on the latest version) — use the already-current message below. No restart, no STOP, no version delta.
  • If the commands succeeded but you cannot tell whether a new version was installed — use the update-applied message. A needless restart is harmless; wrongly saying "already current" after a real update reintroduces the version mix.
  • If any command errored or exited non-zero — regardless of which scope was resolved — use the failure handling at the end of this file.

Update-applied (a new version was installed):

Update applied to disk: swarm vX → vY. This session is still running the previous version — Claude Code loads plugin commands and skills once at startup. Restart Claude Code before running any swarm command — quit and relaunch the CLI or desktop app; or on the web, end this session and open a new one. Clearing the conversation (/clear) is not enough; the session has to fully restart.

Then STOP and end your turn. Do not run any other swarm command and do not hand off into a launch flow this session — the running session is pinned to the old version, so any swarm command run now reads new plugin files against old in-context instructions and mixes versions. Reading from a newer version directory does not help either: there is no in-session path to a clean new version. Do not suggest /reload-plugins or any in-session reload to skip the restart — it does not rebuild the command index or re-inject skills and is unavailable on desktop and web, so it reproduces this exact split-version state. If the user asks to proceed with swarm work now, restate that they must start a fresh session first.

Read the full file on GitHub · 41 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 · 41 lines · 8 tokens per session scan A 14da61ed1c08

Subscribe to this mod's changes

update is a command published in the GitHub repository DheerG/swarms (86 stars, last pushed 1mo ago), licensed MIT. It adds 8 tokens to every session and 1,144 once invoked, about $0.0000 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.