agent-communication

agent-communication is a skill for Claude Code, Codex from VersoXBT/claude-initial-setup. It costs 61 tokens per session (1,705 once invoked), scanned A, original, MIT.

A set of patterns for sending messages and sharing state between AI agents, including direct messages, event notifications, and publish-subscribe systems.

In plain words
What is it for?
Use it when agents need to coordinate work, pass structured data, maintain shared state, or react to events. It covers message formats, inboxes, outboxes, and message buses.
Why use it?
It provides defined ways for agents to exchange requests, results, and updates without relying on unclear or informal handoffs.

Skill for Claude CodeCodex

Part of the claude-initial-setup plugin — 75 skills, 15 commands, 14 agents, 2 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/versoxbt/claude-initial-setup/agent-communication
Any agent
npx skills add VersoXBT/claude-initial-setup --skill agent-communication
Clone the repo
git clone --depth 1 https://github.com/VersoXBT/claude-initial-setup

Made for: Claude Code, Codex.

Or install claude-initial-setup, the plugin that ships this one along with the rest of its 75 skills, 15 commands, 14 agents, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for agent-communication

README.md
[![agentmods](https://agentmods.dev/badge/skills/versoxbt/claude-initial-setup/agent-communication.svg)](https://agentmods.dev/skills/versoxbt/claude-initial-setup/agent-communication)
Your own site
<a href="https://agentmods.dev/skills/versoxbt/claude-initial-setup/agent-communication"><img src="https://agentmods.dev/badge/skills/versoxbt/claude-initial-setup/agent-communication.svg" alt="Measured on agentmods" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,705 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00061 $0.01705
Opus 5 $0.00030 $0.00852
Sonnet 5 $0.00012 $0.00341
Haiku 4.5 $0.00006 $0.00170

Measured 5d ago against content hash 2f1d814ab350, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agent-communication scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/agent-patterns/agent-communication/SKILL.md · 230 lines

How it starts

The opening of the file, as written. The whole thing — 230 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent Communication

Patterns for communication between AI agents. Covers message passing, shared state, event-driven design, pub/sub, inbox/outbox, and structured message formats.

When to Use

  • User is building multi-agent systems that need inter-agent communication
  • User needs shared state between agents
  • User wants event-driven agent coordination
  • User is designing message formats for agent-to-agent data exchange
  • User asks about pub/sub or inbox/outbox patterns for agents

Core Patterns

Direct Message Passing

Agents communicate through explicit function calls with typed messages.

from dataclasses import dataclass
from typing import Any

@dataclass(frozen=True)
class AgentMessage:
    sender: str
    recipient: str
    msg_type: str  # "request", "response", "notification"
    payload: dict
    correlation_id: str  # Links requests to responses

class MessageBus:
    def __init__(self):
        self._handlers: dict[str, list] = {}
        self._inbox: dict[str, list[AgentMessage]] = {}

    def register(self, agent_id: str, handler):
        self._handlers[agent_id] = handler
        self._inbox[agent_id] = []

    def send(self, message: AgentMessage):
        self._inbox[message.recipient].append(message)

    async def deliver(self, agent_id: str) -> list[AgentMessage]:
        messages = self._inbox[agent_id]
        self._inbox[agent_id] = []
        return messages

# Usage
bus = MessageBus()
bus.send(AgentMessage(
    sender="orchestrator",
    recipient="researcher",
    msg_type="request",
    payload={"task": "Find recent papers on RAG optimization"},
    correlation_id="task-001"
))

Shared State Store

Agents read and write to a shared state store for coordination.

import asyncio
from dataclasses import dataclass, field

@dataclass(frozen=True)
class StateEntry:
    value: Any
    updated_by: str
    version: int

class SharedState:
    def __init__(self):
        self._state: dict[str, StateEntry] = {}
        self._lock = asyncio.Lock()
        self._watchers: dict[str, list] = {}

    async def get(self, key: str) -> StateEntry | None:
        return self._state.get(key)

    async def put(self, key: str, value: Any, agent_id: str) -> StateEntry:
        async with self._lock:
            current = self._state.get(key)
            version = (current.version + 1) if current else 1
            entry = StateEntry(value=value, updated_by=agent_id, version=version)
            self._state = {**self._state, key: entry}  # Immutable update

            # Notify watchers
            for callback in self._watchers.get(key, []):
                await callback(key, entry)
            return entry

    def watch(self, key: str, callback):
        watchers = self._watchers.get(key, [])
        self._watchers = {**self._watchers, key: [*watchers, callback]}

# Usage
state = SharedState()
await state.put("research_findings", {"papers": [...]}, agent_id="researcher")
await state.put("code_review", {"issues": [...]}, agent_id="reviewer")

# Another agent reads the state
findings = await state.get("research_findings")

Read the full file on GitHub · 230 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 230 lines · 61 tokens per session scan A 2f1d814ab350

Subscribe to this mod's changes

agent-communication is a skill published in the GitHub repository VersoXBT/claude-initial-setup (4 stars, last pushed 3mo ago), licensed MIT. It adds 61 tokens to every session and 1,705 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

motion-graphics

Use when the user wants a short, design-led motion graphic where motion is the message: kinetic typography, stat or number count-up, chart/data-viz hit, logo sting, brand lockup, lower-third, callout, social overlay, animated headline/tweet/news item, motion poster, or quick captured-page highlight. Usually under 10s…

Sma1lboy/rove · 161 tokens

release

Autonomously cut a Rove (@sma1lboy/rove) release end-to-end — detect the semver bump from pending changesets (flagging an upstream minor you didn't intend), run the release gates, bump/tag/push via scripts/release.sh, then poll the GitHub Actions Release workflow with gh until npm publish completes, diagnosing CI…

Sma1lboy/rove · 155 tokens

hyperframes-cli

HyperFrames CLI dev loop. Use when running npx hyperframes init, add, catalog, capture, lint, validate, inspect, layout, snapshot, preview, play, render, publish, lambda, doctor, browser, info, upgrade, skills, compositions, docs, benchmark, telemetry, transcribe, or remove-background, or when troubleshooting the…

Sma1lboy/rove · 101 tokens

pstack

Rigorous engineering mode for nontrivial work in this repo — a set of named principles plus the leaf skills that apply them. Use when the user says "pstack", "go deep", "be rigorous", "认真做", or when a task involves architecture, a real bug, a refactor, or anything the user will not be watching. Ported from…

Sma1lboy/rove · 93 tokens

auto-motion

在 kobe 仓库内跑 auto-motion——把 transcription.srt 拆成多段 MG 动画镜头并拼接成竖屏视频(storyboard 分镜 + theme.md 全片主题 + 逐镜头 claude -p 子进程 + ffmpeg 拼接)。本 skill 是薄 wrapper:解析 auto-motion 模板根,继承 kobe 品牌 theme,执行逻辑以 auto-motion 仓库的 canonical SKILL.md 为准。当用户说"跑 auto-motion"、"把这个字幕稿/口播稿做成视频"、"给 kobe 做一条 MG 宣传片"时使用。.

Sma1lboy/rove · 140 tokens

graph-query

PROACTIVELY query the code graph BEFORE modifying any component. Use it to find callers, dependencies, and the blast radius of a change so you do not break something you did not read. Also use when the user asks "find callers", "check dependencies", "what uses this", or when exploring an unfamiliar codebase. Check the…

23blocks-OS/ai-maestro-plugins · 80 tokens