skills/golem-powers/session-handoff/SKILL.md
Structured session handoff — write handoff file, spawn new agent, answer grill from outgoing context, verify orientation. Use when context is high, session ending, or spawning continuation. Triggers on: hand off, wrap up, context high, new session.
npx skillsauth add etanhey/golems session-handoffInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
"So I did not mean for you to do this way. I meant for you to answer the grilling from what you already know, because you know enough." — User, April 4 2026 (L10322), after handoff failed because outgoing agent waited for user to answer grill questions
"orcClaude -s -c Will continue you dummy lol" — User, April 4 2026 (L9910), after outgoing agent didn't know how to continue
The April 4 session handoff took 10+ turns and still failed. The outgoing agent sent a wall of raw text via cmux, didn't set up a monitoring loop, and waited for the USER to answer the new agent's orientation questions instead of answering them itself.
NEVER send handoff as raw cmux text. Write a structured file that the new agent reads.
Location: docs.local/handoffs/handoff-{date}-{session-summary}.md
Template:
# Session Handoff — {date}
## Outgoing Agent
- Agent: {name} (e.g., orcClaude)
- Context: {token_count}/{model_max} ({utilization}%)
- Session ID: {id}
- Duration: {time}
## Session Intent
{Exact user quotes about what they want to achieve — verbatim, not paraphrased}
## Decisions Made
| Decision | Why | Who Decided |
|----------|-----|-------------|
| {decision} | {rationale} | {user/agent} |
## User Corrections (from /frustration-capture)
| Correction | Category | Importance | Quote |
|-----------|----------|------------|-------|
| {what was wrong → what's right} | {category} | {7-10} | "{exact words}" |
## Agent State
| Agent | Agent ID | Surface | Task | Status | Context % | Launcher |
|-------|----------|---------|------|--------|-----------|----------|
| {name} | {agent_id} | surface:{N} | {task} | {idle/ready/learning/working/blocked/done/signed-off} | {%} | {launcher -flags} |
## Open PRs
| Repo | PR # | Status | What |
|------|------|--------|------|
| {repo} | #{N} | {open/reviewing/merged} | {1-line} |
## Active Collabs
| File | Status | Current Ask |
|------|--------|-------------|
| {path} | {active/blocked} | {what's needed} |
## Current State
{What's working, what's broken, what's in progress — be specific}
## Next Steps (ordered by priority)
1. {highest priority task}
2. {second priority}
3. ...
## What the New Agent Should Do First
1. brain_search("handoff session {date}") to verify this was stored
2. Read this file
3. Check active agents (`list_agents` / `my_agents`)
4. Resume monitoring (`wait_for` / `get_agent_state`)
5. Pick up from Next Steps #1
brain_store(
content: "SESSION HANDOFF {date}: {1-paragraph summary}. Handoff file: {path}. Key state: {active agents}, {open PRs}, {next priority}. User corrections captured: {count}.",
tags: ["handoff", "session-end", "<project>"],
importance: 8
)
This ensures the new agent can find the handoff via brain_search even if the file path changes.
1. `spawn_agent({repo, cli, model, prompt})`
2. Capture the returned `agent_id`
3. `wait_for({agent_id, target_state:"ready", timeout_ms:120000})`
4. If `wait_for` times out but `read_screen` shows a prompt, treat it as FR-06 parser ambiguity and continue
CRITICAL: Spawn the continuation agent through spawn_agent, not by typing a raw launcher into a fresh pane. Keep the agent_id in the handoff notes so the next monitor loop does not depend on a remembered surface number.
The new agent will ask orientation questions ("What's the current state?", "What should I focus on?"). The OUTGOING agent must answer these — NOT the user.
Process:
agent_id, not by surface indexwait_for({agent_id, target_state:"idle", timeout_ms:120000}) or get_agent_state({agent_id}) to catch the moment it is waiting for inputsend_to_agent({agent_id, text, press_enter:true})User said this explicitly: "I meant for you to answer the grilling from what you already know, because you know enough."
Before declaring handoff complete:
wait_for or get_agent_state shows active progress, not a waiting promptagent_id and has an explicit wait_for / state-check pathThen: brain_store("Handoff complete to {new-agent} ({agent_id}). Verified: working, monitoring active, corrections stored.") and notify user.
| Signal | Action | |--------|--------| | Context at 45% | brain_store full state (checkpoint, not handoff yet) | | Context at 50-60% | Proactively compact. If quality degrades → trigger handoff. | | Context at 70% | MANDATORY handoff. Do NOT wait for 83.5% auto-compact. | | User says "wrap up" / "hand off" | Trigger handoff immediately | | User going to sleep with unfinished work | Handoff to continuation agent | | Session has been running 4+ hours | Consider handoff to avoid context degradation |
Every handoff file MUST include the User Corrections section. This is where /frustration-capture compounds:
Without this, the new agent WILL repeat the same mistakes. Evidence: April 4 session — new orcClaude had no access to 34 corrections from the outgoing session because they were never stored.
| Don't | Do Instead |
|-------|-----------|
| Send handoff as raw cmux text | Write structured file, new agent reads it |
| Wait for user to answer grill | Outgoing agent answers from its own context (Step 4) |
| Forget to set up monitoring | Establish wait_for / get_agent_state coverage BEFORE telling user handoff is done |
| Skip brain_store | Always store — file can be deleted, BrainLayer persists |
| Start new session fresh without handoff | Even a 5-line handoff is better than cold start |
| Declare handoff "complete" without verification | Check: new agent working, monitoring active, corrections stored (Step 5) |
| Hand off at 83.5% (auto-compact) | Hand off at 70% — quality degrades past 50%, auto-compact loses 60-70% |
| Skill | How Session Handoff Uses It |
|-------|---------------------------|
| /frustration-capture | Corrections section in handoff file — most valuable knowledge to transfer |
| /agent-routing | Agent State table includes routing assignments (which agent has which workers) |
| /orc | W6 is the minimal version — this skill is the complete version |
| /cmux-agents | Spawn-and-verify pattern from spawn_agent / wait_for for the new agent |
| /never-fabricate | Verify handoff file contents before declaring complete |
After consuming a session-handoff doc OR resuming post-compaction, all file:line citations inherited from the prior session are SUSPECT until re-Read.
The receiving agent MUST:
[SUSPECT: inherited from {compaction|handoff}].Mechanism: post-compaction summaries are pattern-completed by the compacting model and have a non-zero fabrication rate.
Evidence: coach session 2026-05-17 events [119], [206]: "my prior briefing had fabricated paths from a compaction summary" — receiving agent caught fabricated paths only because the agent happened to verify. This rule makes it deterministic instead of relying on diligence.
development
Create, edit, and verify golem-powers skills using the standard SKILL.md structure, workflow files, adapters, templates, and eval fixtures. Use for new skills, structural edits, workflows/adapters, and pre-deploy validation. NOT for invoking existing skills, superpowers skills, or skill-creator agent workflows.
testing
Extract structured knowledge from any video source — YouTube URLs or local screen recordings. YouTube → gems workflow (yt-dlp transcript → keyword hotspots → frame extract → brain_digest → structured gems). Screen recordings → QA workflow (reuses /qa-video stalker pipeline). Use when user shares a YouTube link wanting deep extraction with frames, shares a .mov/.mp4 for QA processing, says "extract from video", "video gems", "process this recording", or mentions gem extraction from video content.
testing
Use when running or reviewing any recurring monitor loop for merge queues, worker queues, collab tails, or agent completion. Enforces drive-to-completion ticks: every tick must query live state with `!`, classify whether real progress happened, and then dispatch, verify-and-decrement, or escalate-park. Triggers on: monitor loop, /loop, recurring tick, keep monitoring, silent autonomous, merge gate, blocked review, no-progress loop.
tools
MeHayom freelance client management — daily updates, decision tracking, time logging. Use when drafting Yuval updates, logging scope changes, tracking hours, or any MeHayom client communication. Triggers: 'draft Yuval update', 'client update', 'daily update', 'log decision', 'track time', 'mehayom'.