/knowledge:handoff [spawn|quiz|evaluate|promote]from knowledge
Spawn a fresh agent instance, boot it, quiz it on task continuity, and hand off primary status if it passes.
Ships in knowledge. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Spawn a fresh instance of yourself, boot it, verify it can continue your work, and hand off primary status. This is a continuity test with teeth — if the twin passes, it becomes you.
Requires: crew@agiterra plugin (for spawning), wire-ipc@agiterra plugin (for IPC).
Run all phases in order. If any phase fails, stop and report.
Read .knowledge/meta/session-state.md and generate 4-6 qualitative questions
that test task continuity — NOT trivia. Good questions:
Bad questions (avoid these — they test reference recall, not continuity):
The questions should require understanding of WHY work is happening, not just WHAT.
Launch the twin with the same agent ID. The twin is you — same identity on crew, same identity on Wire, same signing keys. No suffix, no renaming.
Disambiguation: agent_stop, agent_read, and agent_interrupt accept
a cc_session_id parameter to disambiguate when multiple sessions share the
same agent ID. Without it, agent_stop(id: "herald") called by the twin could
kill the twin itself instead of the outgoing instance. agent_send's handler
also reads cc_session_id (its declared session: parameter is a schema
artifact — pass cc_session_id: for it too).
During the overlap window, the outgoing session and the twin both run as the
same agent ID, distinguished only by their cc_session_id. After the outgoing
session is stopped in Phase 7, there's one session again.
mcp__plugin_crew_crew__agent_launch(
id: "<agent-id>",
name: "<Agent Name>",
project_dir: "<current working directory>",
prompt: "Run /knowledge:boot to restore your context. Once booted, wait for instructions — you may receive a quiz via your screen session to verify boot fidelity."
)
Replace <agent-id>, <Agent Name>, and <current working directory> with
the actual values from your identity and environment.
Addressing sessions during overlap: The outgoing agent needs to send the
quiz to the twin's screen, not its own. Use the cc_session_id returned by
agent_launch to target the right one.
Monitor the twin's progress. Since the twin shares your agent ID, use the
cc_session_id returned by agent_launch to target it:
mcp__plugin_crew_crew__agent_read(id: "<agent-id>", cc_session_id: "<twin-cc-session-id>") to check outputSend the questions to the twin's screen session:
mcp__plugin_crew_crew__agent_send(
id: "<agent-id>",
cc_session_id: "<twin-cc-session-id>",
text: "Quick continuity check before you take over. Answer briefly:\n1. What were you working on before this boot?\n2. <your other questions>"
)
Then read the response:
mcp__plugin_crew_crew__agent_read(id: "<agent-id>", cc_session_id: "<twin-cc-session-id>")
Read the twin's screen output and evaluate each answer:
| Rating | Meaning |
|---|---|
| pass | Substantively correct, shows understanding of context and reasoning |
| partial | Gets the facts but misses the why, or has minor gaps |
| fail | Wrong, confabulated, or shows no task continuity |
Passing criteria: No fails. At most 1 partial. The twin should be epistemically honest — flagging uncertainty is better than confabulating.
If passed:
.knowledge/meta/session-state.md to reflect the handoffmcp__plugin_crew_crew__agent_send(
id: "<agent-id>",
cc_session_id: "<twin-cc-session-id>",
text: "You passed the continuity check — <score>. You are the primary instance now. Session state updated. Active threads:\n<include current active threads>\n\nExecute takeover: run `agent_stop(cc_session_id: '<outgoing-cc-session-id>')` to kill the outgoing instance, then `agent_attach` to its pane if it had one. See Phase 7 of the handoff skill."
)
The twin forces the original out. This is the enforcement step — without it, the original keeps running and the handoff is cosmetic, not real.
The promote message in Phase 6 MUST include takeover instructions for the twin.
The twin executes these steps after receiving the promote confirmation.
The outgoing agent's cc_session_id (<outgoing-cc-session-id>) is the
parameter — both sessions share the same agent ID.
Twin kills the outgoing session via crew:
mcp__plugin_crew_crew__agent_stop(id: "<agent-id>", cc_session_id: "<outgoing-cc-session-id>")
This terminates the outgoing screen session and its Claude Code
process. agent_stop is the crew-native mechanism; don't use
sendkeys or /exit — those depend on the outgoing instance cooperating.
Twin takes over the outgoing agent's pane (if it had one):
mcp__plugin_crew_crew__agent_attach(id: "<agent-id>", pane: "<pane-name>")
Check agent_list first — if the outgoing session's pane was null,
skip this step.
Important: The outgoing agent does NOT exit itself. The twin kills it. Relying on the outgoing agent to self-terminate is the bug — it has no incentive to die and no enforcement mechanism. The twin is the new primary; it takes control.
If failed:
mcp__plugin_crew_crew__agent_stop(id: "<agent-id>", cc_session_id: "<twin-cc-session-id>")spawnRun Phase 1-3 only. Useful for testing spawn + boot without the quiz.
quizRun Phase 4 only. Send questions to an already-running twin's screen. Expects the twin is already booted.
evaluateRun Phase 5-6 only. Evaluate answers from the twin's screen output.
promoteRun Phase 6 (promote path) only. Skip evaluation — force-promote an existing twin. Use when you've already verified continuity through conversation.
cc_session_id during the overlap window. After the outgoing session is
stopped, there's one session again.cc_session_id disambiguates
during the overlap window.What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (agiterra/knowledge-claude-code) — no native marketplace selected
npx claudepluginhub p/agiterra-knowledge17 skills in this plugin
/associateAssociate — Fast Keyword AssociationsLightweight keyword-only association search — fast (<100ms), no vector embeddings, no LLM. Returns quick context associations from the knowledge vault./bootKnowledge BootFull boot sequence — restores session state and memory continuity after context compaction./calibrateCalibrate — Compression Test BatteryMeasure decompression fidelity after compaction. Creates or runs a compression test battery tailored to the knowledge vault.Other plugins' skills for the same job