with one click
rollout
// Use on explicit /handoff. Write a session handoff file for a fresh Claude Code session.
// Use on explicit /handoff. Write a session handoff file for a fresh Claude Code session.
| name | rollout |
| description | Use on explicit /handoff. Write a session handoff file for a fresh Claude Code session. |
| argument-hint | [additional requirements] |
| disable-model-invocation | true |
Write a handoff file that captures everything a fresh Claude Code session needs to continue the current work. Assume the next session will not have access to this conversation.
date +"%Y-%m-%d_%H%M"date +"%Z %z"mkdir -p "$(git rev-parse --show-toplevel)/.handoff""${CLAUDE_SKILL_DIR}/scripts/next-handoff-number.sh"git status --short | head -5git status --short and git diff --stat..handoff/ directory (<repo-root>/.handoff/). Do not create plugin, topic, or date subdirectories.<n>. The bundled scripts/next-handoff-number.sh resolves the repo root and returns one greater than the largest existing <number>-*.md prefix in <repo-root>/.handoff/ (or 1 if none). Do not reimplement the scan inline.<n>-<TIMESTAMP>-<slug>.md, where <slug> is a short kebab-case summary of this session's focus (e.g., 12-2026-04-24_0233-scripts-and-task-rename.md, 13-2026-04-24_0317-a4-wiki-issue-model-locked.md). Do not prefix the slug with handoff- — the .handoff/ directory already identifies the file kind. The filename slug differs from the frontmatter topic: field (see File Format): topic: is the long-lived thread identifier; the filename slug describes this specific handoff.<repo-root>/.handoff/. If this session began from an opened handoff file, treat that file as the prior context and reuse its topic:. Otherwise, reuse an existing topic: value when this session clearly continues that thread; create a new topic only when the session is genuinely unrelated to existing topics. To review prior context for the same thread, sort files with the same topic: by sequence:.<n> until the filename is unique.git show / git diff for exact file changes.topic: (e.g., docs(handoff): snapshot <topic> session state).Treat $ARGUMENTS as extra emphasis or constraints from the user (e.g., "focus on the auth refactor", "include the failing test outputs verbatim"). Incorporate these into the relevant sections rather than tacking them on at the end.
$ARGUMENTS
Every handoff file must begin with YAML frontmatter followed by a "do not edit" banner.
---
sequence: <n> # same numeric prefix as the filename, e.g., 12
timestamp: <TIMESTAMP> # same value as in the filename, e.g. 2026-04-24_0233
timezone: <TIMEZONE> # e.g., KST +0900
topic: <topic-slug> # kebab-case identifier for the long-lived thread this handoff belongs to (e.g., a4-redesign)
previous: <previous-handoff-filename> # optional; filename of the handoff this session started from, if known
---
sequence — must match the numeric prefix in the filename.timestamp — must match the timestamp in the filename.timezone — must match the timezone captured in Context.topic — the thread this session advances, not the specific session focus. Handoffs with the same topic form an implicit thread when sorted by sequence:. If a prior handoff on the same thread exists, reuse its topic: value verbatim. Choose a new topic: only when starting a genuinely new thread. Note: this is distinct from the filename slug, which describes only the current session focus (see Task step 2 Filename).previous — optional. If this session began by opening or following a specific handoff file, set previous: to that filename only, not a path. Omit the field entirely if there was no specific starting handoff or if it is uncertain; do not infer it just because another file has the same topic:.Immediately after the frontmatter, include this banner so future sessions know not to edit the file:
> **DO NOT UPDATE THIS FILE.** This handoff is a point-in-time snapshot of the session at <TIMESTAMP>. To record a later state, create a new handoff file via `/handoff` — never edit this one.
Below the banner, adapt the document to the session, but include these sections unless one is genuinely irrelevant:
## Goal
## Current State
## Changes Made
## Key Files
## Related Links
## Decisions and Rationale
## Important Dialog
## Validation
## Known Issues and Risks
## Next Steps
## Open Questions
## Useful Commands and Outputs
Goal — explain what the user was trying to accomplish.Current State — summarize what is true now, including branch/commit context and the starting handoff file when useful.Changes Made — list substantive completed work, not every tiny edit. Summarize behavior and intent; for exact file contents, point to the relevant commit(s) and git diff / git show commands instead of copying the diff.Key Files — include paths and why they matter.Related Links — link any related wiki pages, GitHub issues, pull requests, design docs, or other durable records. Keep the handoff self-contained even when links are present: explain why each link matters and what state it was in at handoff time.Decisions and Rationale — capture choices that would be expensive to rediscover.Important Dialog — capture short, high-signal user statements, corrections, constraints, or preferences that shaped the work. Quote sparingly and paraphrase when exact wording is not important.Validation — include commands run and whether they passed, failed, or were skipped.Known Issues and Risks — preserve unfinished work, failing checks, edge cases, or user-visible risks.Next Steps — give concrete continuation steps in priority order.Open Questions — record unresolved product, design, or implementation questions.Useful Commands and Outputs — include only commands or output snippets that help the next session resume quickly. Include git show / git diff commands for reviewing exact changed file contents when that detail matters.After writing the file and creating the required commits, tell the user the handoff file path, the pre-handoff commit SHA(s) from step 1 (or skipped), and the handoff-only commit SHA from step 5. Do not restate the contents.
[HINT] Download the complete skill directory including SKILL.md and all related files