agentsclimarketplace

Agent handoff protocol

Skill Amey-Thakur/AI-SKILLS/skills/multi-agent-teams/agent-handoff-protocol

Plug-and-play skills and prompts for every AI coding agent

Install
npx -y skills add Amey-Thakur/AI-SKILLS --skill agent-handoff-protocol

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 19 days oldThe repository was created 19 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
  • 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Design each handoff between two agents as an explicit artifact contract with a context budget and a rule for what must survive the crossing. Use when work passes from one agent to the next and the receiver keeps losing constraints, re-deriving decisions, or drowning in raw transcript.

SKILL.md

3.4 KB, 711 tokens by cl100k_base, as published. Nobody here has run it

Agent handoff protocol

The handoff is where multi-agent teams leak. The sender knows why a constraint matters; the receiver gets a wall of transcript and guesses. It inherits too little and re-derives a decision wrong, or too much and burns its context window on noise. A handoff protocol is the edge in the team graph: a typed envelope, a size ceiling, and a rule for what has to survive the crossing.

Method

  1. Define the artifact contract. The envelope is structured, not prose: task, inputs, constraints, done_criteria, provenance. Pick a format the receiver can parse, JSON or fenced fields in markdown, and reject anything that fails the schema on arrival.
  2. Set a context budget. Cap the payload in tokens, often one to two thousand. The sender summarizes decisions and their reasons; it does not forward the chat log. A payload over the cap is a signal to split the task, not to raise the ceiling.
  3. Carry decisions, not narration. The envelope states what was decided and the constraint behind it: "auth reuses the session cookie, add no token store." The receiver should never need the sender's reasoning turns to act correctly.
  4. Validate on receipt and fail closed. The receiver checks that required fields are present and specific before it starts. A missing done_criteria or a vague constraint bounces back as a defect. A receiver that guesses at a thin envelope is how a whole pipeline goes wrong in silence.
  5. Stamp provenance and keep it replayable. Record which agent produced the envelope, from which inputs, at which version. A handoff you can replay from its inputs is one you can debug when the output surprises you.
  6. Acknowledge or reject out loud. The receiver returns an ack that the contract is met, or a rejection naming the missing field. Silence is not acceptance: an unacknowledged handoff is an open failure.

Run it

In Claude Code, write each handoff to a file the next subagent reads first rather than piping a full transcript into its prompt. The orchestrator enforces the budget by distilling sender output into the envelope before spawning the receiver, and refuses to spawn on a malformed one. Treat a handoff as complete only on an explicit ack; on rejection, route back to the sender with the named defect. To port, the envelope is a CrewAI task output_pydantic model, an AutoGen structured message, or a typed edge payload in a LangGraph State that the next node reads and the graph validates.

Signals it works

  • The receiver never asks for context the envelope should have carried.
  • No handoff exceeds its token budget without triggering a task split.
  • Every crossing ends in an explicit ack or a named defect, never in silence.

Boundaries

This governs one edge between two agents; the nodes it connects are defined by agent-role-definition. It assumes the roles already do not overlap: a clean contract cannot rescue two agents fighting over one deliverable. Match envelope strictness to blast radius, a throwaway draft needs less ceremony than a handoff into a production deploy.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.