From Agent Team OS
File-based communication bus between multiple Claude Code sessions. Use when the user says "send to <agent>", "tell <agent>", "hand off to <agent>", "check inbox", "reply to brief", "delegate to <agent>", or asks "who is active", "list agents", "open threads".
How this skill is triggered — by the user, by Claude, or both
Slash command
/agent-team-os:agent-team-osThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
File-based communication between separate Claude Code sessions. Replaces manual copy-paste between terminals.
File-based communication between separate Claude Code sessions. Replaces manual copy-paste between terminals.
Do NOT activate for:
Agent tool, not the bus.source ~/.claude/scripts/agent-team-os-lib.sh
FROM=$(ab_detect_agent "$PWD")
If FROM is empty → "this workspace is outside AGENT_MAP, cannot send". Stop.
Read ~/.agent-team-os/AGENT_MAP.json field .routing_rules.<from>.deny. If to is in the deny list, do NOT propose a direct send. Suggest:
Check ~/.agent-team-os/AGENT_MAP.json field .agents.<to>.capabilities to see if the intent is supported. Add an intent only if documented.
Payload schema for common intents:
| Intent | Required fields | Recommended |
|---|---|---|
bug-fix | project, summary | project_path, deadline, acceptance_criteria |
feature-spec | project, summary | deliverable, user_story, deadline |
generate-screenshots | project, deliverable | spec_ref, count, dimensions |
code-review | target | focus_areas, deadline |
draft-post | topic, channel | audience, voice_refs, length, deadline |
review-copy | target | voice_check, tone |
plan-campaign | product, goal | timeline, channels, budget |
handoff | state_summary, next_steps | blockers, files_touched, tests_status |
question | question | context, deadline |
architecture-review | target, decision_at_stake | options, constraints |
Don't invent fields. If you're unsure what's needed, ask the user or just use summary.
context_refsMessages should stay small. For heavy context use refs instead of embedding:
| URI scheme | When to use |
|---|---|
file:///abs/path | Local file (both sessions on same machine) |
graphiti://node/<uuid> or graphiti://search/<query> | Decisions/history in a knowledge graph |
artifact://shared/<id> | HTML/deck/PDF on shared storage |
wiki://<slug> | Wiki/memory documents |
gh://<owner>/<repo>/issues/<n> | GitHub issue/PR |
todoist://task/<id> | Todoist task |
urgent → blocker, "can't proceed without", deadline passed. The UserPromptSubmit hook interrupts the recipient on their next turn.high → within 24h, important but not blocking.normal (default) → async, deadline in days.low → fire-and-forget, low priority.Default to normal if the user doesn't specify.
ALWAYS show a compact preview to the user BEFORE writing:
Draft message:
ops → dev
type: request | intent: bug-fix | priority: normal
summary: scroll home stutters on Macbook M1
deadline: 2026-05-20T18:00
context_refs: 1 (file <project>/CLAUDE.md)
Confirm? (y to send)
Do NOT send without explicit confirmation.
AB_FROM="$FROM" \
AB_TO="<to>" \
AB_TYPE="request" \
AB_INTENT="<intent>" \
AB_PRIORITY="normal" \
AB_PAYLOAD_JSON='{...valid JSON...}' \
AB_CONTEXT_REFS_JSON='["file://...", "..."]' \
AB_REQUIRES_RESPONSE=true \
AB_RESPONSE_BY="2026-05-20T18:00:00Z" \
MSG_ID=$(ab_write_message)
Exit codes:
$MSG_ID contains the new idAfter a successful send:
✓ Message sent: msg-... (thread: thread-...)
The recipient will see this in their inbox on next SessionStart.
View full history: /thread <thread-id>
For /reply:
{status: "accepted", eta: "<iso>", notes: "..."}{reason: "...", alternative: "<agent or approach>"}{status: "done|partial", artifact_refs: [...], summary: "..."}For /handoff: see /handoff.md command — pass full state_summary + explicit next_steps.
context_refs.artifact_refs).thread_id when replying (breaks the conversation).User (in ops workspace): "Tell dev to look at the home scroll bug on MyApp, by Wednesday"
Skill:
1. detect_agent → ops
2. routing ops→dev OK
3. compose preview:
ops → dev (request, bug-fix, normal)
summary: home scroll stutters on MyApp
deadline: 2026-05-20
4. User: "y"
5. ab_write_message → msg-... sent
6. "Sent. When you open the dev session, the brief will be in the inbox."
When in GOD mode and dispatching agents inside Onda (see GOD-CONTRACT.md §Dispatch & Monitor), follow these guidelines — learned from real runs — to spawn fast and cheap:
Before spawning:
/inbox at boot and starts immediately — no long manual prompt needed."You are <agent>. Run /inbox, /read <msg-id>, do the task, print ===DONE=== then /reply."Spawning (per agent):
onda_workspace_layout → use activePaneId. Do NOT add_terminal unless you need an extra pane — otherwise you get an empty stray pane.claude --dangerously-skip-permissions for trusted repos/sandboxes → no Bash permission prompts mid-task (the #1 thing that stalls an agent).wait_for("trust|Welcome") → if trust, send_keys(["Enter"])./tmp resolves to /private/tmp; symlinked paths break ab_detect_agent (agent shows as [Anon]). Spawn on real, mapped paths (~/Projects/...); the detect normalizes symlinks (realpath) so canonical paths match.terminal_run(prompt) then ALWAYS send_keys(["Enter"]) — terminal_run alone does NOT submit in the Claude TUI.Layout by agent count:
add_terminal direction:right (side-by-side).workspace_tile quad (2×2 grid, all visible).4 → separate tabs (avoid infinite rightward growth).
Monitoring — cheap, not live:
subscribe+poll a Claude TUI continuously (100+ chunks/sec of spinner = token burn).wait_for(/===DONE===/) (blocks, costs nothing until match) + the agent's /reply on the bus (passive, lands in your inbox).terminal_read/screenshot only at intervals or on demand for visual checks./reply, sign off, optionally agent-team-os-harvest.sh <cwd> for token+cost. Unmount workspaces you created (not Mario's existing ones).Fallback (no Onda): if mcp__onda__* tools are absent, queue briefs and hand Mario cd <ws> && claude commands. Don't pretend to spawn.
~/agent-team-os/README.md and ~/agent-team-os/scripts/agent-team-os-lib.sh~/.agent-team-os/ (inboxes, registry, threads, outbox, locks)~/.claude/scripts/agent-team-os-lib.sh~/.claude/hooks/agent-team-os-load.sh~/.claude/hooks/agent-team-os-urgent.sh~/.claude/commands/{bus,inbox,read,send,reply,handoff,thread}.mdEverything is JSON, inspectable with jq, ls, cat.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub mariomosca/claude-plugins --plugin agent-bus