plugins/ainb-fleet/skills/needs/SKILL.md
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.
npx skillsauth add stevengonsalvez/agents-in-a-box ainb-fleet:needsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Single place to see every claude session that wants your attention. Four signal kinds classified per session, priority ASK > ERR > IDLE > WAIT.
ainb fleet needs # text Jarvis-HUD layout
ainb --format json fleet needs # structured JSON (preferred by LLM)
ainb fleet needs --idle-min 10 # override idle threshold (default 5 min)
Env override: AINB_FLEET_IDLE_MIN=10.
Each row in the output array:
{
"session": {
"id": "…",
"cwd": "/Users/…",
"tmux_session": "tmux_…",
"workspace_name": "…",
"peer_id": "…", // null if not broker-registered
"sources": ["ainb", "peers"],
"summary": "…", // JSONL-derived (see standup)
"last_seen_ms": 1779…
},
"kind": "ASK" | "ERR" | "IDLE" | "WAIT",
"context": {
// shape depends on `kind`:
//
// ASK — structured AskUserQuestion pulled from JSONL tool_use:
"question": "…",
"header": "…",
"options": [ { "label": "…", "description": "…" } ],
"multi_select": false,
//
// ERR — API error matched in pane:
"pattern": "rate_limited",
"snippet": "…API Error · rate_limited · …",
//
// IDLE — assistant turn-end, no user follow-up, > N min ago:
"idle_minutes": 17,
"last_assistant_text": "…",
//
// WAIT — explicit WAITING: prefix in peer summary:
"marker": "WAITING:",
"text": "…the post-marker text…"
},
"route_hint": "broker" | "tmux" | "none"
}
The calling LLM session should render this exact layout in chat:
╔════════════════════════════════════╗
║ ⚡ FLEET STATUS · N NEED YOU ⚡ ║
║ 🔴 X err 🟡 Y ask ⚪ Z idle ║
║ highest priority: <session> (<KIND>) ║
╚════════════════════════════════════╝
▸ 🟡 <session> ─ <question text>
① <option label>
② <option label>
③ <option label>
▸ 🔴 <session> ─ <pattern> (<snippet>)
▸ ⚪ <session> ─ idle <N>m
'<last assistant snippet>'
▸ 🟢 <session> ─ WAITING: <text>
Rules:
▸ prefix, signal emoji, em-dash separator+ N moreAfter rendering the HUD, fire AskUserQuestion per session that wants an answer. Each kind maps to a different prompt shape:
| kind | AskUserQuestion shape |
|---|---|
| ASK | Relay options 1:1 from context.options |
| ERR | "<session> hit <pattern> — retry? skip? investigate?" |
| IDLE | "<session> idle <N>m after: '<snippet>' — resume? close? other?" |
| WAIT | "<session> says: <marker> <text> — answer:" |
For ASK kinds, the LLM session SHOULD use AskUserQuestion's structured options so the user can click rather than type.
Once Stevie answers each, route via the existing send-route:
ainb fleet broadcast "<answer>" --filter "<exact tmux_session>"
route_hint tells you what'll happen:
broker — clean send through claude-peers HTTPtmux — tmux send-keys -l literal mode (works for any tmux pane)none — bg job or no targets; can't auto-route; tell user manuallyout=$(ainb --format json fleet needs)
# 1. Render the HUD in chat (LLM does this from the JSON)
# 2. For each entry, fire AskUserQuestion (claude code session does this)
# 3. After each answer:
echo "$out" | jq -r ".[] | select(.session.tmux_session == \"$picked\") | .session.tmux_session" \
| xargs -I% ainb fleet broadcast "$answer" --filter "%"
--idle-min or env var.summary to start with WAITING:. Most sessions never do.ainb status <job> for those.--idle-min flag + AINB_FLEET_IDLE_MIN env overridecontext polymorphic per kindroute_hint field to guide answer-routingdocumentation
Report reflect drain spend over a time window — tokens split by cached (cache_read), uncached writes (cache_creation), and io (input+output), with a $ estimate, grouped by day / outcome / model / transcript. Reads the drainer's cost log and surfaces outlier runs and cache-reuse health (the 41.5M-token failure mode = low cache reuse + high cache writes). Use to answer "what is reflection costing me" for the last day / week.
development
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.
testing
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).
development
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.