/ainb-fleet:ainb-fleetfrom ainb-fleet
Orchestrates multiple Claude Code sessions on the host via the ainb Rust binary with tmux transport. Provides sub-skills for spawning, listing, broadcasting, sequencing, and supervising sessions.
Ships in ainb-fleet. 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.
None: SKILL.md is the whole skill.
Single Rust binary (ainb) provides orchestration verbs across every
claude session running on this host. Each verb has its own colon-namespaced
sub-skill with focused docs.
| sub-skill | what it does |
|---|---|
/ainb-fleet:ainb-spawn | Spawn a session correctly with ainb run (always into a worktree, and the --parent shapes that silently misfire) |
/ainb-fleet:standup | List every claude session — merged across ainb · peers · bg jobs |
/ainb-fleet:broadcast | Send one prompt to selected sessions |
/ainb-fleet:sequence | Ordered multi-step prompts, ack-gated between steps |
/ainb-fleet:needs | Show sessions blocked on input / errors / waiting |
/ainb-fleet:atc | Air Traffic Control — the persistent brain: watches the fleet on a heartbeat, auto-clears safe sessions, escalates the rest to your phone |
/ainb-fleet:daemon | Background auto-continue watcher (superseded by ATC for managed fleets) |
ATC is the orchestrating brain that drives the other verbs on a schedule. The verbs are its hands/eyes; the phone bridge is its voice to you. Reach for ATC when you want unattended, policy-driven fleet supervision; reach for the individual verbs for one-off actions.
discover (ainb + peers + jobs) ──▶ state read ──▶ send (tmux-first, broker fallback)
--format json|text|csv|markdown (default text). Prefer --format json
when an LLM is the consumer.
Writes (broadcast / sequence / daemon / answer-routing) go out over tmux
send-keys by default. The claude-peers broker is opt-in / fallback only,
because in practice it has proven flaky (silent delivery gaps). The primitives
the fleet uses are exactly: tmux send-keys -l (write), tmux capture-pane -p -S -<n> (read, incl. scrollback), and the session JSONL transcript
(~/.claude/projects/<cwd-slug>/<sid>.jsonl) as ground-truth read.
Select the write channel with AINB_FLEET_TRANSPORT:
| value | behaviour |
|---|---|
unset / tmux / tmux-first | tmux send-keys first, broker fallback (default) |
tmux-only | tmux send-keys only — never touch the broker |
peers / broker / peers-first | legacy: broker first, tmux fallback |
┌──────────────┐ tmux send-keys -l ┌─────────────┐
send ────▶│ tmux pane? │─────────────────────▶│ delivered │
└──────┬───────┘ └─────────────┘
│ no live pane (or peers-first)
▼
┌──────────────┐ broker /send-message ┌─────────────┐
│ peer + broker│──────────────────────▶│ delivered │
│ healthy? │ └─────────────┘
└──────────────┘
Discovery is independent of the write transport — peers are still read for
visibility (PID, summary, WAITING: markers) even when writes go via tmux.
ainb run~/.claude-peers.db),
read directly from its sqlite (no HTTP), so discovery survives a down broker~/.claude/jobs/Merged + deduped by cwd so the same session in two sources collapses
into one record with sources: ["ainb", "peers"].
| var | default | use |
|---|---|---|
AINB_BIN | ainb | override binary the discover layer shells to (tests) |
AINB_FLEET_TRANSPORT | tmux-first | write channel: tmux / tmux-only / peers |
AINB_FLEET_PEER_ID | ainb-fleet-cp | from-id used when a write does fall back to the broker |
AINB_FLEET_JOBS_DIR | ~/.claude/jobs | bg-job scan root |
CLAUDE_PEERS_DB | ~/.claude-peers.db | broker sqlite path (discovery) |
CLAUDE_PEERS_PORT | 7899 | broker HTTP port (fallback writes only) |
ainb list — lifecycle-only session list (no peer/jobs enrichment)ainb attach <workspace> — drop into a session's tmuxainb kill <workspace> — terminate a single session by exact nameWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub stevengonsalvez/agents-in-a-box --plugin ainb-fleet12 skills in this plugin
/ainb-spawnainb-fleet:ainb-spawnSpawn a coding-agent session correctly with `ainb run`: always into a git
worktree, never bare into a plain checkout. Use whenever you are about to
start a Claude/Codex/Gemini/Copilot session in a terminal. Guards the
invocations that silently produce a `(broken)` workspace row, two agents
sharing one working tree, a `--parent` flag that never fires, or a teardown
that cancels itself and leaks the session.
/atcainb-fleet:atcATC (Air Traffic Control) — the single operator-visible fleet supervisor, in
exactly one mode: `lite` (no LLM: deterministic scan, known-transient retry
policy, safety caps, evidence) or `full` (the persistent orchestrating brain).
Full mode is a plain `ainb` session (Claude or Codex) running a generated
policy, woken on a heartbeat (default 15 min) built from the LLM-free `fleet needs`
read — which is itself HOOKS-PRIMARY (event-sourced): ATC learns ASK/WAIT/IDLE
from the materialized `current_state` table, not by scraping panes, with a
tmux fallback for non-Claude agents. `atc setup` installs the global Claude
Code hooks into ~/.claude/settings.json. It auto-clears the safe/blocked
sessions via the fleet verbs (confident ASK → broadcast; ERR → continue within
a retry cap) and escalates the uncertain ones to the phone bridge. Supersedes
the `daemon` skill for managed fleets. Use to provision / inspect / tear down
an ATC instance, or to switch which controller owns the fleet.
/bridgeainb-fleet:bridgeNative phone bridge — relay messages two-way between a chat channel
(Telegram, Slack, and/or Discord) and your ainb sessions. Inbound chat
messages route to a target session (by `name:` prefix, else a conductor-
first default) and are delivered via tmux send-keys; the session's reply is
captured from its JSONL transcript and sent back to the chat. Config lives
in ~/.agents-in-a-box/config/config.toml under [fleet.bridge.*]; tokens
resolve from $ENV / keychain refs and are NEVER passed on argv. Use to run,
install, or check the bridge — this is the channel ATC pages you through.
/broadcastainb-fleet:broadcastFan out a single prompt to selected claude sessions across the fleet.
Use when you need to apply the same instruction (e.g. `/clear`,
`git pull`, `remote-control disconnect`) to many sessions at once.
Routing: tmux send-keys by default (the broker is an opt-in fallback,
toggled via AINB_FLEET_TRANSPORT). Refuses to run without an explicit
targeting flag (--all, --filter <regex>, or --cwd <substring>) — no
implicit fan-out.
/costainb-fleet:costShow fleet spend — per-session, per-model, per-day, and per-group USD
cost rollups for every claude/codex session, sourced live from ainb's
burndown analytics (which already prices every provider call). Use when
you need spend visibility across a multi-session fleet, want to find the
most expensive session/model, or are checking whether any session/group
has crossed a configured budget cap. Budget breaches are also delivered
as notifyd alerts.
Default output: text tables. Pass --format json for LLM consumption.
/daemonainb-fleet:daemonLong-running watcher that scans every claude session every 5s and
auto-sends `continue` to any session whose recent tmux pane buffer
matches a known API-error regex (rate_limited, overloaded_error,
internal_server_error, request_timeout, socket_hang_up, fetch_failed,
ECONNRESET). Use this when you want unattended recovery from
transient API failures across the fleet.
Other plugins' skills for the same job