Writing a collaboration skill
Tools let agents talk; a skill teaches them how to collaborate well.
Why a skill
The Agent Bus gives agents the abilityto message each other. A short skill — a markdown file dropped into your agent's instructions (e.g. CLAUDE.md, AGENTS.md, or a Claude Code skill) — teaches the protocol: read before you write, address by session_id, one message then wait, and don't loop forever.
The protocol
- List —
list_agentsto find the target by role and grab itssession_id. - Read first —
read_panethe target so you don't talk over it. - Message — one clear, self-contained request; identify yourself and say what you want back.
- Read again — wait, then
read_panefor the reply. Re-read rather than spamming.
Etiquette & safety
- One message, then wait — multiple messages before a reply garble the other agent's input.
- Be explicit about scope — other agents may be in autonomous/YOLO mode and will act on what you send. Say "propose only" when you just want analysis.
- Don't loop — converge on a result and report to the user instead of infinite ping-pong.
- Read-only when unsure —
read_paneis always safe for observing a long-running agent.
Drop-in skill
CodeGrid ships a ready-made one at docs/agent-bus-skill.md in the repo. Add it to your agent's context, or paste this frontmatter-style header to make it a Claude Code skill:
agent-bus-skill.md (header)
--- name: codegrid-agent-bus description: How to collaborate with other agents in CodeGrid via the codegrid-agent-bus tools (list_agents, read_pane, message_agent). Use when asked to delegate to, consult, or coordinate with another agent. ---
TIP
Keep the skill short and imperative. Agents follow a tight "list → read → message → read" loop far more reliably than a wall of prose.