From claude-code-handoff
Snapshot session state to .claude/handoff_current.md (plus a raw-dump backup at .claude/handoff_backups/handoff_raw_<session_id>.md that the Stop hook has been appending to all session, when Stop hooks fire) and tell the user (loudly, with -*-*- borders) to start a new session. Use at clean boundaries (commit lands, track wraps), when the user signals context pressure ("getting long", "meter is full"), or whenever the user invokes /handoff. Blocks until the user actually starts a new session — do not start new work after invoking.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-code-handoff:handoffThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Used at clean boundaries (after a commit, when a major track wraps),
Used at clean boundaries (after a commit, when a major track wraps),
when the user signals context pressure, or whenever the user invokes
/handoff. Hands the next session a complete state snapshot so
nothing gets lost across the restart boundary.
${CLAUDE_PLUGIN_ROOT}/bin/write_handoff.sh, which captures:
HANDOFF_SUBSTRATE_NAME, e.g. a shared decisions / RFCs repo).md docs under the configured
directories (default: docs/; configurable via HANDOFF_INFLIGHT_DIRS)## Notes from this session section using Edit.Stop hook fired during this session, handoff_turn_append.sh has been appending turn-by-turn to .claude/handoff_backups/handoff_raw_<session_id>.md. Verify it: ls -la .claude/handoff_backups/. In the Cowork-VM tab the Stop hook does not fire (known issue, see plugin README), so the file will be missing — fall through to "Raw dump fallback" below.Run via Bash:
bash "${CLAUDE_PLUGIN_ROOT}/bin/write_handoff.sh"
The script outputs the absolute path of the written handoff
(<repo-root>/.claude/handoff_current.md).
Read the file you just wrote. Then Edit it to add a ## Notes from this session body under the placeholder. Capture, in order of
importance:
Verify the raw dump. Run ls -la <repo-root>/.claude/handoff_backups/
and confirm the current session's file is there. If missing, fall
through to "Raw dump fallback" below. (In the Cowork-VM tab this will
always be missing — that's expected; the SessionEnd and Stop hooks
don't fire there.)
Print the banner verbatim. Do NOT skip, soften, or shrink this:
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
ASK: START A NEW SESSION NOW
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
handoff written to: <path the script printed>
raw dump written to: <path of the raw-dump file>
action: end this session, then start a fresh one in the same project.
The SessionStart hook auto-loads the handoff into context.
Do NOT resume / continue this saturated session — that defeats
the purpose of the handoff.
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
Stop. Do NOT continue working after printing the banner.
Use this only if the Stop hook is not firing (Cowork-VM tab, or hook
not installed) and the running raw-dump file is missing. Create the
dump in one shot, write it to
<repo-root>/.claude/handoff_backups/handoff_raw_<timestamp>.md (use
UTC YYYY-MM-DD_HHMM), and prune to 3 newest:
ls -t <repo-root>/.claude/handoff_backups/handoff_raw_*.md 2>/dev/null \
| tail -n +4 \
| xargs -r rm
Content guidance: long-form, lightly-edited brain dump — what we worked on, what got decided (including the ones the user pushed back on), what got built or written (paste plans/specs in full if reasonable), what the user said about how to proceed (direct quotes where phrasing matters), what's still open, what almost got missed. Better to over-include than miss something. The dump is gitignored.
The assistant cannot self-measure context % (/context is user-side).
Trigger on observable signals, not fabricated percentages.
After a commit lands, a track wraps, a spec ships, an ASK reply goes out — if the boundary feels substantive, ask:
Good handoff moment — want me to run /handoff, or keep going?
If the user mentions context, meter, percentage, "this is getting long," "you must be running out," — immediately offer:
Sounds like context is getting tight. Want me to run /handoff now?
## Notes from this session is acceptable ONLY for purely
mechanical sessions (single bug fix, no decisions, no work product
beyond commits). When in doubt, write the notes.npx claudepluginhub scottconverse/claude-code-handoff-cowork --plugin claude-code-handoffCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.