message-protocol

message-protocol is a skill for Claude Code, Codex from khalilbenaz/claude-skills-collection. It costs 90 tokens per session (3,209 once invoked), scanned A, original, MIT.

A guide for defining reliable messages between AI agents and sub-agents, including their format, routing, delivery confirmations, and versioning.

In plain words
What is it for?
Designing message schemas, request-and-response flows, acknowledgements, error handling, heartbeats, correlation IDs, and communication middleware.
Why use it?
It helps keep communication traceable and compatible when agents exchange tasks, results, errors, or status signals in one process or across distributed systems.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Designing message schemas, request-and-response flows, acknowledgements, error handling, heartbeats, correlation IDs, and communication middleware.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/khalilbenaz/claude-skills-collection/message-protocol
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.

Any agent
npx skills add khalilbenaz/claude-skills-collection --skill message-protocol
Clone the repo
git clone --depth 1 https://github.com/khalilbenaz/claude-skills-collection

Made for: Claude Code, Codex.

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 message-protocol

README.md
[![agentmods](https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/message-protocol/github.svg)](https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/message-protocol)
Your own site
<a href="https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/message-protocol"><img src="https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/message-protocol/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for message-protocol

Your own site · 80×15
<a href="https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/message-protocol"><img src="https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/message-protocol.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 90 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,209 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00090 $0.03209
Opus 5 $0.00045 $0.01605
Sonnet 5 $0.00018 $0.00642
Haiku 4.5 $0.00009 $0.00321

Measured 10d ago against content hash 1166f642c272, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

message-protocol 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 10d 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.

agent-skills/message-protocol/SKILL.md · 316 lines

How it starts

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

Agent Message Protocol

Quand utiliser ce skill

Utilise ce skill dès que deux agents ou plus doivent s'échanger des tâches, des résultats ou des signaux de contrôle de façon fiable et traçable — qu'il s'agisse d'une architecture mono-processus (event bus local) ou distribuée (Redis Streams, RabbitMQ, Kafka).


Workflow en 10 étapes

1. Définir le format de message standard

Tout message doit contenir ces champs minimaux :

Champ Type Description
message_id UUID v4 Identifiant unique du message
sender string ID de l'agent émetteur
recipient string ID de l'agent cible ou "broadcast"
type enum task_request / task_result / status_update / error / heartbeat / control
payload dict Données utiles sérialisées
timestamp ISO 8601 UTC Heure d'émission
correlation_id UUID v4 Relie requête et réponse
schema_version string Ex. "1.2" — pour la compatibilité
import uuid
from datetime import datetime, timezone
from dataclasses import dataclass, field
from typing import Any

@dataclass
class AgentMessage:
    message_id: str = field(default_factory=lambda: str(uuid.uuid4()))
    sender: str = ""
    recipient: str = ""
    type: str = ""  # task_request | task_result | status_update | error | heartbeat | control
    payload: dict[str, Any] = field(default_factory=dict)
    timestamp: str = field(default_factory=lambda: datetime.now(timezone.utc).isoformat())
    correlation_id: str | None = None
    schema_version: str = "1.0"

2. Typer les messages — un type = un schéma

Chaque type possède un schéma de payload documenté et validé via Pydantic :

from pydantic import BaseModel, Field

class TaskRequestPayload(BaseModel):
    task_id: str
    task_type: str
    input_data: dict
    priority: int = Field(default=5, ge=0, le=9)
    deadline_seconds: int | None = None

class TaskResultPayload(BaseModel):
    task_id: str
    status: str  # "success" | "partial" | "failed"
    output_data: dict
    duration_ms: int

class ErrorPayload(BaseModel):
    error_code: str          # "TIMEOUT" | "VALIDATION_FAILED" | "AGENT_UNAVAILABLE"
    error_message: str
    retry_hint: bool
    retry_after_seconds: int | None = None
    fallback_suggestion: str | None = None
    stack_trace: str | None = None  # debug only, masquer en prod

Read the full file on GitHub · 316 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. 10d ago First seen · 316 lines · 90 tokens per session scan A 1166f642c272

Subscribe to this mod's changes

message-protocol is a skill published in the GitHub repository khalilbenaz/claude-skills-collection (22 stars, last pushed 16d ago), licensed MIT. It adds 90 tokens to every session and 3,209 once invoked, about $0.0005 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-30.