swarm-eject

swarm-eject is a skill for Claude Code, Codex from AnmarHani/SwarmVault. It costs 72 tokens per session (861 once invoked), scanned C, original, MIT.

A project offboarding workflow for disconnecting a project from SwarmVault, the shared store of project knowledge. It lets you keep the knowledge, copy it into the repository, or delete it.

In plain words
What is it for?
Use it when stopping SwarmVault use, archiving a project, or removing its setup. Choose unwire to keep the vault data, export to copy it into the repository, or purge to delete it.
Why use it?
It prevents an incomplete removal that leaves project files, registrations, or agent instructions pointing to a disconnected vault.

Skill for Claude CodeCodex

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 skills/anmarhani/swarmvault/swarm-eject
Any agent
npx skills add AnmarHani/SwarmVault --skill swarm-eject
Clone the repo
git clone --depth 1 https://github.com/AnmarHani/SwarmVault

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/anmarhani/swarmvault/swarm-eject.svg)](https://agentmods.dev/skills/anmarhani/swarmvault/swarm-eject)
Your own site
<a href="https://agentmods.dev/skills/anmarhani/swarmvault/swarm-eject"><img src="https://agentmods.dev/badge/skills/anmarhani/swarmvault/swarm-eject.svg" alt="Measured on agentmods" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 861 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00072 $0.00861
Opus 5 $0.00036 $0.00430
Sonnet 5 $0.00014 $0.00172
Haiku 4.5 $0.00007 $0.00086

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

Security

Grade C, and why

swarm-eject scanned grade C 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 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

Ejecting is not `rm -rf`. A project is wired in six places, and a partial removal leaves the
skills/swarm-eject/SKILL.md · 79 lines

How it starts

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

swarm-eject — leaving cleanly

Ejecting is not rm -rf. A project is wired in six places, and a partial removal leaves the user worse off than never installing: a marker with no registry entry, instruction files still pointing agents at a vault that no longer has the project, hooks firing into nothing.

The eject command does the work; this skill runs the conversation.

1. Ask which exit they want

Lead with the recommendation. Most people asking this want unwire, not deletion.

mode what happens to the knowledge reversible
unwire (default, recommend first) stays in the vault; the project just stops being wired yes — register brings it back
export copied into the repo at docs/swarmvault-archive/, then removed from the vault via those files
purge deleted only from the backup

If they say something like "remove SwarmVault from this project," that is unwire unless they explicitly say delete. Ask before assuming otherwise.

2. Show the inventory before doing anything

The command's default is a dry run, so run it plainly and read the output back:

swarmvault.py eject --project <P> --mode unwire|export|purge

It prints what leaves and what stays: note counts per vault folder, total size, the exact instruction files and hooks to be unwired, and — for export and purge — every inbound [[wikilink]] from other projects that would go dead. Surface the orphan warning to the user; it is the one consequence they cannot see coming.

3. Apply

swarmvault.py eject --project <P> --mode <mode> --apply [--backup PATH]
  • purge asks for the project name typed back. Don't work around that prompt; if the session is non-interactive, tell the user and let them pass --confirm-name <P>.
  • A backup tarball is written outside the vault before any deletion. --no-backup exists; don't reach for it, and never pass it on the user's behalf.
  • Report the printed log back rather than summarising it as "done."

Read the full file on GitHub · 79 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. 4d ago First seen · 79 lines · 72 tokens per session scan C 3f7004b95f87

Subscribe to this mod's changes

swarm-eject is a skill published in the GitHub repository AnmarHani/SwarmVault (5 stars, last pushed 1mo ago), licensed MIT. It adds 72 tokens to every session and 861 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.