/swarm:setupfrom swarm
Installs and configures Swarm (AI worker deployment system) on a Linux machine: installs the box, connects the AI, sets up a project, and runs a first job.
Ships in swarm. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Swarm runs on the person's Linux machine (Ubuntu 24.04 x86_64: their own PC or a server) as a box they deploy AI workers to. It works on one machine with a local AI; Tailscale and relays are optional extras for other machines. The person's part is consent, choices, typing keys where Swarm asks, and sign-in. You do the rest when you can run commands on that machine.
Reuse what exists. Call swarm_status: if it answers, Swarm is installed and
connected — skip to section 4. A 401 is a key problem, not a missing install.
On the machine, ls ~/.config/swarm/ai-key and systemctl is-active swarm-headless tell you whether the box is installed and this person has a
key.
After the person agrees to the system changes (it downloads Swarm's newest
release, checks it, and runs it as a service under its own swarm user; no
Docker is installed unless they want environments), run on that machine, as the
person, with sudo:
curl -fsSL https://swarmagent.dev/install | sudo bash
Everything it starts listens on 127.0.0.1 only. At the end it creates Swarm's
owner for the person who ran it, puts an AI key for their AI in
~/.config/swarm/ai-key (only they can read it) and prints the connect lines.
Agents run on this machine without permission prompts (the sandbox is off by
default; install.sh sandbox on turns it on). Environments, a folder's own
container for its agents' commands with its secrets, need Docker: add
--environments on to the install, or run install.sh environments on later.
install.sh connect-ai makes a new key later.
Add --tailnet only if the person wants to reach Swarm from other devices
(see remote access); it is not needed for a local AI.
~/.config/swarm/ai-key and connects to http://127.0.0.1:7783/mcp (it
needs Node 22+). Restart or reconnect the plugin's MCP server after the
install.node bin/connect.mjs http https://SWARM-HOST.YOUR-TAILNET.ts.net:8444/mcp
once (see connection modes), then reconnect the
plugin's MCP server. Keyless with the tailnet grant; needs Node 22+.claude mcp add --scope user --transport http swarm http://127.0.0.1:7783/mcp --header "Authorization: Bearer $(cat ~/.config/swarm/ai-key)"Confirm a real call (swarm_status) succeeds before saying it is connected.
For other clients and remote setups, see connection modes
and remote access.
swarm_list_providers shows which providers are ready. For each one that is
not, its connect field says exactly how to connect it. If none is ready, ask
the person which they have, show every option below in one short list with
what each needs, and follow their choice. No option is the default.
codex): swarm_connect_chatgpt with action start
returns a link and a code. Give both to the person at once; they finish
sign-in in their own browser. Then call action status with the
login_id and wait_seconds until it reports success.claudecode): the person signs in
themselves; Swarm never sees or handles Claude credentials. See
Claude Code for the three
steps (install it, claude auth login as Swarm's user, turn it on).
swarm_connect_claude_code does it from here: action status gives the
installer command the person runs on the machine, then action activate.anthropic, openai, google, openrouter or
fireworks: the person adds it on the setup page (http://127.0.0.1:8443
on the machine; on a server, the installer printed the ssh -L line to open
it from their computer), or as the first provider by script on the machine:
sudo bash /var/lib/swarm-headless/install.sh key PROVIDER < key-file.vertex), only on a machine with a Google Cloud identity:
sudo swarmctl setup credential --provider vertex --project PROJECT.Never ask for a key in chat; if one is pasted, tell them to revoke it.
Call swarm_list_providers again to confirm it is ready. Swarm then gives
every role its recommended model: swarm_list_models shows what the coder,
designer and finder agents will use. Do not change models unless the person
asks (swarm_set_agent_model does it, per role).
Ask: "Which folders is your work in?" — existing folders or git repositories,
possibly several. Create a project with swarm_create_project: a name and
those folders. Swarm registers each folder in place and writes the project's
project.md from them.
workspace_not_found: the path is wrong; check it with the person.workspace_not_visible: Swarm (its own user) cannot see inside a home
folder and never changes its host itself. Run, as root on that machine,
sudo swarmctl workspace add PATH
(the command the error names), then create the project again.Use swarm_create_workspace (a new, empty repository; advanced tools) only
when the person asks to start a new project from scratch.
Use the person's real task, or agree on a small one in their project. Follow
using-swarm: swarm_run_task with project_id, the registered workspace
and a brief with acceptance criteria. Omit role to delegate to Swarm, which
uses its task tool for regular specialists. No worker preset is required or
created by this flow. Follow swarm_wait_task, read swarm_task_result and
swarm_get_session, and handle returned questions/approvals through their
authorized controls. Check actual files, diffs and validation receipts; use
swarm_integrate_task only when the person wants the reviewed work integrated.
A timeout means keep waiting, never start a duplicate task.
End with what runs where, the project/workspace, resolved models without secrets, what completed, measured usage, and what was actually verified.
If workers need an API token for a website (for example to post or deploy), the person sets it on the machine; you never see it:
sudo swarmctl secret set --name NAME --hosts HOST (the person types the value at a hidden prompt, never the AI),sudo swarmctl secret grant --name NAME --workspace FOLDER --days N (or --hours N), after asking the person how long.Never ask for a secret or key in chat.
swarm_list_secrets then shows it granted to that folder; a job in that folder
uses it through Swarm's gateway, never seeing the value.
For protocol checks, response parsing or MCP errors, read Swarm's MCP contract.
Read swarm_status → machine.update.command. The standard headless command
is sudo bash /var/lib/swarm-headless/install.sh update (the retained installer,
not its source checkout). The person, or their AI running as the person with
sudo, runs it on the machine. It waits until no job runs and Swarm restarts
by itself. If the field is absent, establish the installation method first.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub swarm-agent/swarm --plugin swarm3 skills in this plugin
/building-on-swarmBuild a custom app on Swarm with the @swarm-agent/sdk — onboarding, streaming chat, permissions, sessions and context, projects and the orchestrator, custom tools with sealed agents, workers, usage and monitoring. Use when the person wants their own UI, bot, dashboard or service on top of their Swarm./using-swarmGet work done by the person's Swarm through its MCP tools: delegate goals to Swarm or give jobs straight to its workers, follow and review them, deliver results, request media, and set up workers, schedules, workflows and environments when the person wants them. Use when the person asks for help with Swarm or work by its agents.Other plugins' skills for the same job