ainb-fleet:broadcast

Fan 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: peers-first (broker HTTP) when peer registered, tmux send-keys fallback otherwise. Refuses to run without an explicit targeting flag (--all, --filter <regex>, or --cwd <substring>) — no implicit fan-out.

Best use case

ainb-fleet:broadcast is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Fan 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: peers-first (broker HTTP) when peer registered, tmux send-keys fallback otherwise. Refuses to run without an explicit targeting flag (--all, --filter <regex>, or --cwd <substring>) — no implicit fan-out.

Teams using ainb-fleet:broadcast should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/broadcast/SKILL.md --create-dirs "https://raw.githubusercontent.com/stevengonsalvez/agents-in-a-box/main/plugins/ainb-fleet/skills/broadcast/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/broadcast/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How ainb-fleet:broadcast Compares

Feature / Agentainb-fleet:broadcastStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Fan 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: peers-first (broker HTTP) when peer registered, tmux send-keys fallback otherwise. Refuses to run without an explicit targeting flag (--all, --filter <regex>, or --cwd <substring>) — no implicit fan-out.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# ainb fleet:broadcast

Send one prompt to selected sessions. Mandatory targeting flag.

## Run

```bash
ainb fleet broadcast "<prompt>" --all                       # every running session
ainb fleet broadcast "<prompt>" --filter "<regex>"          # match tmux/workspace name
ainb fleet broadcast "<prompt>" --cwd "<substring>"         # match cwd
```

## Targeting flags (one required)

| flag | matches against |
|---|---|
| `--all` | every session in `ainb fleet standup` |
| `--filter <regex>` | regex against `tmux_session` OR `workspace_name` |
| `--cwd <substring>` | substring against `cwd` |

If none provided, the command exits with `broadcast requires --all,
--filter <regex>, or --cwd <substring>` — by design, to prevent
accidental fan-out.

## Output

```
ainb fleet broadcast — sent to N target(s)
  ✓ <name> via broker peer <peer_id>
  ✓ <name> via tmux <tmux_session>
  ✗ <name>: <reason>
```

`✓ via broker` = sent through claude-peers HTTP (clean, structured).
`✓ via tmux` = sent via `tmux send-keys -l` (literal mode, works for any
tmux pane regardless of peer state).

## Routing rule

For each target:

1. If session has `peer_id` and broker is healthy → POST `/send-message` to broker.
2. Else if session has `tmux_session` and tmux says it exists → `tmux send-keys -l`.
3. Else → `Failed { reason: "no peer registered and no tmux session found" }`.

## Common flows

**Cycle a specific app:**
```bash
ainb fleet broadcast "/clear" --filter "shotclubhouse"
```

**Pull latest in every active worktree:**
```bash
ainb fleet broadcast "git pull" --cwd "/agents-in-a-box/worktrees/"
```

**Universal reset:**
```bash
ainb fleet broadcast "/exit" --all   # careful — quits everything
```

## Safety notes

- `tmux send-keys -l` uses literal mode → shell metacharacters in the
  prompt are safe (no injection).
- Multi-line prompts: newlines in the broadcast text get sent as literal
  characters; the receiving claude reads them as a single message.
- The Enter key is sent *after* the literal text → claude sees the prompt
  as a submitted user message.

## Verify a broadcast landed

For each target, tail the JSONL transcript:

```bash
ls -t ~/.claude/projects/<cwd-slug>/*.jsonl | head -1 | xargs grep "<prompt-text>"
```

(`<cwd-slug>` = replace `/` with `-` in the target's cwd.)

Related Skills

test-ainb

8
from stevengonsalvez/agents-in-a-box

Run tests for the ainb (agents-in-a-box) Rust workspace via a 5-layer strategy — unit, insta snapshot, mock-plugin compositing, real-plugin spawn, vhs recording. Wraps cargo + insta + vhs into one CLI. Use when Stevie says "/test-ainb", "test ainb", "run ainb tests", "snapshot <component>", "regenerate vhs tapes", or any phrasing about validating ainb test layers. The skill autodetects which ainb-tui worktree the cwd sits in and dispatches to scripts/run.sh.

ainb-fleet:standup

8
from stevengonsalvez/agents-in-a-box

Show fleet status — every claude session running on the host, merged across ainb + claude-peers broker + background jobs. Use when you need to enumerate sessions before composing an action, see which sessions have a peer registered (broker-routable) vs tmux-only, check the `summary` of each session, or pipe the list into jq for filtering. Default output: text table. Pass --format json for LLM consumption.

ainb-fleet:sequence

8
from stevengonsalvez/agents-in-a-box

Ordered multi-step prompts to fleet targets, ack-gated between steps via JSONL assistant-turn-end detection. Use for cycles like disconnect→reconnect→verify, or any flow where step N+1 requires step N to have completed first. The skill BLOCKS until each target's transcript shows the next assistant turn finishing OR per-step timeout fires (default 300s).

ainb-fleet:needs

8
from stevengonsalvez/agents-in-a-box

Center control panel — enumerate every claude session that is blocked waiting on something: a user answer (AskUserQuestion fired), an API error retry, an idle assistant turn-end with no follow-up, or an explicit WAITING: marker. Returns rich JSON with signal kind + context per session. Use this when you've stepped away from the fleet and want one place to see everything that wants your attention and answer it.

ainb-fleet:fleet-needs

8
from stevengonsalvez/agents-in-a-box

Workflow-backed Jarvis control panel. Runs the deterministic `hangar` workflow with verb=needs (discover → enrich → prioritize), renders the Jarvis HUD from its render-ready cards, fires AskUserQuestion per blocked session, and routes each answer back via tmux send-keys (broker fallback only). Requires the workflow gate (CLAUDE_CODE_WORKFLOWS=1). If the gate is off, fall back to the prompt-driven `/ainb-fleet:needs` skill.

ainb-fleet:daemon

8
from stevengonsalvez/agents-in-a-box

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

ainb-fleet

8
from stevengonsalvez/agents-in-a-box

Fleet orchestration overview — the `ainb fleet ...` Rust subcommand namespace for driving every claude session on the host. Routes to one of five sub-skills (standup / broadcast / sequence / needs / daemon). Invoke this for an at-a-glance map of what fleet can do; reach for the specific sub-skill for the verb you want.

workflow

8
from stevengonsalvez/agents-in-a-box

Guide through structured delivery workflow with plan, implement, validate phases

webapp-testing

8
from stevengonsalvez/agents-in-a-box

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

validate

8
from stevengonsalvez/agents-in-a-box

Verify implementation against specifications

ui-ux-pro-max

8
from stevengonsalvez/agents-in-a-box

UI/UX design intelligence. 67 styles, 96 palettes, 57 font pairings, 25 charts, 13 stacks (React, Next.js, Vue, Svelte, Astro, Nuxt, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui, Jetpack Compose). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient.

tui-style-guide

8
from stevengonsalvez/agents-in-a-box

TUI style guide for consistent terminal interface design