ワンクリックで
handoff-relay
Teaches agents how to use prepare_handoff and accept_handoff tools for structured context relay in multi-agent pipelines.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Teaches agents how to use prepare_handoff and accept_handoff tools for structured context relay in multi-agent pipelines.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | handoff-relay |
| description | Teaches agents how to use prepare_handoff and accept_handoff tools for structured context relay in multi-agent pipelines. |
| allowed-tools | prepare_handoff accept_handoff |
| metadata | {"author":"koi-team","category":"orchestration"} |
Use prepare_handoff and accept_handoff to pass structured context between agents in a pipeline.
Call prepare_handoff when:
Call accept_handoff when:
handoff_id to use| Field | Type | Description |
|---|---|---|
to | string | Target agent ID that will receive this handoff |
completed | string | Summary of what you accomplished in this phase |
next | string | Instructions for the next agent — what they should do |
| Field | Type | Description |
|---|---|---|
results | object | Structured data (JSON) the next agent needs |
artifacts | array | References to files/resources ({ id, kind, uri }) |
decisions | array | Decision records with reasoning |
warnings | array | Pitfalls or caveats for the next agent |
delegation | object | Delegation grant to forward permissions |
metadata | object | Arbitrary metadata |
completed should describe outcomes, not process:
next should be actionable instructions:
{
"to": "implementer-agent",
"completed": "Designed REST API with 5 endpoints for user management",
"next": "Implement the API endpoints using Express.js. Follow the schema in results.",
"results": {
"endpoints": [
{ "method": "GET", "path": "/users", "description": "List users" },
{ "method": "POST", "path": "/users", "description": "Create user" }
]
},
"artifacts": [
{ "id": "api-spec", "kind": "file", "uri": "file:///workspace/api-spec.yaml" }
],
"warnings": ["Rate limiting is not yet configured", "Auth middleware must be added"]
}
| Field | Type | Description |
|---|---|---|
handoff_id | string | The envelope ID from the injected system message |
After the middleware injects a handoff summary into your context, call accept_handoff with the provided ID to get the full structured data. The summary gives you an overview; accepting gives you the complete results, artifacts, decisions, and warnings.
{
"handoff_id": "abc-123-def"
}
Returns the full envelope contents:
handoffId — the accepted envelope IDfrom — the agent that prepared this handoffphase — { completed, next } descriptionsresults — structured dataartifacts — file/resource referencesdecisions — decision records with reasoningwarnings — pitfalls and caveatsdelegation — forwarded permissions (if any)metadata — arbitrary metadataIn multi-agent pipelines (A -> B -> C), warnings accumulate:
warnings: ["Budget constraint"]warnings: ["Budget constraint", "Use existing auth library"]Each agent should review incoming warnings and forward relevant ones to the next agent.
accept_handoff without a pending handoff — if no handoff context was injected, there's nothing to acceptresults, keep completed/next as human-readable summaries