Session Handoff
Produce a paste-ready handoff message: one block, posted as the entire final message of the turn, written so the user can copy it, open a fresh session, paste it, and have the work resume exactly where it stopped.
That copy-paste is the whole workflow. Everything in this skill serves it:
- The message is the last thing in the turn — nothing after it, so a copy grabs it clean.
- The message is alone in that turn — no preamble, no commentary wrapped around it.
- The message is self-contained — it will be read in an empty session with no access to this conversation.
This skill writes nothing to disk. It doesn't update docs, CLAUDE.md, or task files — if those drifted, that's /doc-sync's job, or a dedicated doc skill. Say so in one line if you notice drift, then hand off anyway; don't expand scope.
It is a manual skill. Run it by hand when it's useful. It is never required before a /compact.
When to invoke
User says: "session handoff", "wrap up session", "hand off", "handoff summary", "let's wrap up", "summarize before I clear", or any near-equivalent. Also invoke proactively if the user says they're about to /clear or start a fresh session without having run it yet — but never block them if they decline.
What to pull from
Build the recap from what you already know about this session — not from a filesystem audit. No git log, no broad globs to reconstruct what happened. Sources:
- The original request and the constraints that emerged along the way.
- Decisions made and changes shipped, with the file each one lives in.
- Plan files referenced this session (check
~/.claude/plans/ if a plan was mentioned).
- TodoWrite state — what's done, what's still open.
- Background processes started with
run_in_background — shell IDs are load-bearing.
- Files created or modified; memory files touched.
- Unresolved questions in either direction — yours to the user, and the user's to you.
Output template — use exactly this structure, every time
# Session Handoff — <one-line title of what this session was about>
## Where it started
<2-3 sentences: what the user asked for, key framing or constraints that emerged>
## Decisions locked + what shipped
- <decision or change> — <why, and where it lives (absolute path if a file)>
- ...
## Key files for next session
- `<absolute path>` — <why the next agent should read this first>
- Plan file: `<path>` (if a plan drove the session)
- Memory files touched: `<paths>` (if any)
## Running state
- Background processes: <shell IDs + what they are + how to kill> — or "none"
- Dev servers / ports: <url + port> — or "none"
- Open worktrees / branches: <paths> — or "none"
## Verification — how to confirm things still work
- `<command>` — <expected outcome>
- ...
## Deferred + open questions
- Deferred: <item> — <why pushed to later>
- Open: <question needing the user's input> — <context>
## Pick up here
<1-2 sentences: the single most likely next action for a fresh agent>
Hard rules
- The message is the last message, and it stands alone. No preamble ("here's your handoff"), no sign-off, no question after it. The final message is the template, and only the template. Anything you need to say to the user goes in an earlier message.
- Write it for a cold reader. It gets pasted into an empty session: no "as discussed above", no reference to this chat, no pronoun whose antecedent lives outside the block. If it doesn't stand on its own, it fails.
- Nothing is written to disk. No summary file, no doc updates, no
CLAUDE.md edits. The user carries the handoff by copy-paste.
- Never invent state. If a section has nothing to report, write "none" — do not omit the section. Structure stability is the whole point.
- Absolute paths always. The next agent may have a different working directory.
- If a plan file drove the session, name it first in "Key files" so the next agent reads it before anything else.
- No emojis, no hype, no "great job" summaries. Terse and concrete — paths, commands, shell IDs, decisions. The tone of a seasoned engineer handing off at end-of-shift.
- Background process IDs are critical. If you started any
run_in_background shells, their IDs must appear in "Running state" with the kill command — the next agent cannot find them otherwise.
Optional — transcript backup on auto-compaction
references/pre-compact-backup.sh is a non-blocking safety net you can wire into a PreCompact hook (matcher auto): it copies the raw transcript aside when Claude Code auto-compacts, in case a manual handoff wasn't run in time. It never blocks compaction. Wiring it is entirely optional and independent of this skill — the skill works fully without it. It is the only script this skill ships; there is deliberately no guard that forces a handoff before /compact.
Anti-patterns — do not do these
- Adding anything after the handoff block: a comment, an offer to adjust it, a question. The block ends the turn.
- Opening the final message with "Here's the handoff:" or any other framing line.
- Summarizing the last 3 turns and calling it a handoff.
- Updating docs,
CLAUDE.md, or task files from this skill. Not its job — point at /doc-sync and move on.
- Reconstructing the session with
git log or broad globs instead of writing what you know.
- Listing files by relative path.
- Skipping the "Running state" section because "nothing is running" — write "none" instead.
- Adding a "what went well / what went poorly" retrospective. This isn't a retro.
- Recommending next steps beyond the single "Pick up here" line. The next agent decides; you just hand off.
1---2name: session-handoff3description: Use at end of session — when the user says "session handoff", "wrap up session", "hand off", "handoff summary", or is about to /clear and start over. Produces one paste-ready handoff message as the entire final message of the turn — decisions, shipped changes, key files, running state, verification, deferrals, open questions — written for a cold reader so it can be copied into a brand-new session and resume the work from nothing. It writes no files and edits no docs.4---56# Session Handoff78Produce a **paste-ready handoff message**: one block, posted as the entire final message of the turn, written so the user can copy it, open a fresh session, paste it, and have the work resume exactly where it stopped.910That copy-paste is the whole workflow. Everything in this skill serves it:1112- The message is the **last** thing in the turn — nothing after it, so a copy grabs it clean.13- The message is **alone** in that turn — no preamble, no commentary wrapped around it.14- The message is **self-contained** — it will be read in an empty session with no access to this conversation.1516This skill writes nothing to disk. It doesn't update docs, `CLAUDE.md`, or task files — if those drifted, that's `/doc-sync`'s job, or a dedicated doc skill. Say so in one line if you notice drift, then hand off anyway; don't expand scope.1718It is a **manual** skill. Run it by hand when it's useful. It is never required before a `/compact`.1920## When to invoke2122User says: "session handoff", "wrap up session", "hand off", "handoff summary", "let's wrap up", "summarize before I clear", or any near-equivalent. Also invoke proactively if the user says they're about to `/clear` or start a fresh session without having run it yet — but never block them if they decline.2324## What to pull from2526Build the recap from what you already know about this session — not from a filesystem audit. No `git log`, no broad globs to reconstruct what happened. Sources:2728- The original request and the constraints that emerged along the way.29- Decisions made and changes shipped, with the file each one lives in.30- Plan files referenced this session (check `~/.claude/plans/` if a plan was mentioned).31- TodoWrite state — what's done, what's still open.32- Background processes started with `run_in_background` — shell IDs are load-bearing.33- Files created or modified; memory files touched.34- Unresolved questions in either direction — yours to the user, and the user's to you.3536## Output template — use exactly this structure, every time3738```39# Session Handoff — <one-line title of what this session was about>4041## Where it started42<2-3 sentences: what the user asked for, key framing or constraints that emerged>4344## Decisions locked + what shipped45- <decision or change> — <why, and where it lives (absolute path if a file)>46- ...4748## Key files for next session49- `<absolute path>` — <why the next agent should read this first>50- Plan file: `<path>` (if a plan drove the session)51- Memory files touched: `<paths>` (if any)5253## Running state54- Background processes: <shell IDs + what they are + how to kill> — or "none"55- Dev servers / ports: <url + port> — or "none"56- Open worktrees / branches: <paths> — or "none"5758## Verification — how to confirm things still work59- `<command>` — <expected outcome>60- ...6162## Deferred + open questions63- Deferred: <item> — <why pushed to later>64- Open: <question needing the user's input> — <context>6566## Pick up here67<1-2 sentences: the single most likely next action for a fresh agent>68```6970## Hard rules71721. **The message is the last message, and it stands alone.** No preamble ("here's your handoff"), no sign-off, no question after it. The final message is the template, and only the template. Anything you need to say to the user goes in an earlier message.732. **Write it for a cold reader.** It gets pasted into an empty session: no "as discussed above", no reference to this chat, no pronoun whose antecedent lives outside the block. If it doesn't stand on its own, it fails.743. **Nothing is written to disk.** No summary file, no doc updates, no `CLAUDE.md` edits. The user carries the handoff by copy-paste.754. **Never invent state.** If a section has nothing to report, write "none" — do not omit the section. Structure stability is the whole point.765. **Absolute paths always.** The next agent may have a different working directory.776. **If a plan file drove the session, name it first** in "Key files" so the next agent reads it before anything else.787. **No emojis, no hype, no "great job" summaries.** Terse and concrete — paths, commands, shell IDs, decisions. The tone of a seasoned engineer handing off at end-of-shift.798. **Background process IDs are critical.** If you started any `run_in_background` shells, their IDs must appear in "Running state" with the kill command — the next agent cannot find them otherwise.8081## Optional — transcript backup on auto-compaction8283`references/pre-compact-backup.sh` is a **non-blocking** safety net you can wire into a `PreCompact` hook (matcher `auto`): it copies the raw transcript aside when Claude Code auto-compacts, in case a manual handoff wasn't run in time. It never blocks compaction. Wiring it is entirely optional and independent of this skill — the skill works fully without it. It is the only script this skill ships; there is deliberately no guard that forces a handoff before `/compact`.8485## Anti-patterns — do not do these8687- Adding anything after the handoff block: a comment, an offer to adjust it, a question. The block ends the turn.88- Opening the final message with "Here's the handoff:" or any other framing line.89- Summarizing the last 3 turns and calling it a handoff.90- Updating docs, `CLAUDE.md`, or task files from this skill. Not its job — point at `/doc-sync` and move on.91- Reconstructing the session with `git log` or broad globs instead of writing what you know.92- Listing files by relative path.93- Skipping the "Running state" section because "nothing is running" — write "none" instead.94- Adding a "what went well / what went poorly" retrospective. This isn't a retro.95- Recommending next steps beyond the single "Pick up here" line. The next agent decides; you just hand off.