Handoff a Claude session
Create a handoff for another agent from Claude Code's local session log. Treat the log as the source conversation: the Claude session is unavailable for further prompts.
Process
- Require the Claude session ID. If the user did not provide one, ask for it and stop. Do not guess from recent sessions, because the user can retrieve the ID without spending a Claude prompt.
- Run
python3 scripts/extract_session.py <session-id> --output <scratchpad>/claude-session-<session-id>.md, resolving scripts/ relative to this skill. Use the OS temporary directory, not the workspace, for <scratchpad>.
- Read the extracted history. Trace the user's objective, decisions, completed work, verification, failures, unresolved work, and the latest state. Inspect referenced files, diffs, commits, issues, or plans when they are available locally and needed to distinguish current state from stale conversation.
- Write
<scratchpad>/handoff-<session-id>.md for the receiving agent. If the user supplied a focus after the session ID, tailor the handoff to it.
- Return the handoff path and a one-sentence summary.
Use filesystem reads and the bundled extractor only. Do not run claude, resume the session, invoke a model through a CLI or API, or send any prompt back into Claude.
Handoff contents
Make the document concise and operational. Include:
- source session ID and working directory
- objective and relevant user intent
- current state, including completed and partially completed work
- decisions, constraints, and rejected approaches that still matter
- artifacts by path, URL, branch, commit, or issue
- verification already run and its result
- remaining work, blockers, and the clearest next action
- suggested skills for the receiving agent
Reference existing artifacts instead of copying their contents. Distinguish facts observed in the log or workspace from inference. Redact credentials, tokens, private keys, and unnecessary personal information from the handoff.
1---2name: handoff-claude-session3description: Create a handoff document from an existing Claude Code session history without resuming the session or invoking Claude.4---56# Handoff a Claude session78Create a handoff for another agent from Claude Code's local session log. Treat the log as the source conversation: the Claude session is unavailable for further prompts.910## Process11121. Require the Claude session ID. If the user did not provide one, ask for it and stop. Do not guess from recent sessions, because the user can retrieve the ID without spending a Claude prompt.132. Run `python3 scripts/extract_session.py <session-id> --output <scratchpad>/claude-session-<session-id>.md`, resolving `scripts/` relative to this skill. Use the OS temporary directory, not the workspace, for `<scratchpad>`.143. Read the extracted history. Trace the user's objective, decisions, completed work, verification, failures, unresolved work, and the latest state. Inspect referenced files, diffs, commits, issues, or plans when they are available locally and needed to distinguish current state from stale conversation.154. Write `<scratchpad>/handoff-<session-id>.md` for the receiving agent. If the user supplied a focus after the session ID, tailor the handoff to it.165. Return the handoff path and a one-sentence summary.1718Use filesystem reads and the bundled extractor only. Do not run `claude`, resume the session, invoke a model through a CLI or API, or send any prompt back into Claude.1920## Handoff contents2122Make the document concise and operational. Include:2324- source session ID and working directory25- objective and relevant user intent26- current state, including completed and partially completed work27- decisions, constraints, and rejected approaches that still matter28- artifacts by path, URL, branch, commit, or issue29- verification already run and its result30- remaining work, blockers, and the clearest next action31- suggested skills for the receiving agent3233Reference existing artifacts instead of copying their contents. Distinguish facts observed in the log or workspace from inference. Redact credentials, tokens, private keys, and unnecessary personal information from the handoff.