handoff
Write a handoff so a fresh session or another tool can resume with no prior context, as HANDOFF.md or a block to copy. Use when the user says 'handoff', 'hand off', 'pause here' or 'wrap up for now', or when work will resume later or the session is getting long. Pauses work in progress; does not commit, push or report shipped work.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- handoff
- description
- Write a handoff so a fresh session or another tool can resume with no prior context, as HANDOFF.md or a block to copy. Use when the user says 'handoff', 'hand off', 'pause here' or 'wrap up for now', or when work will resume later or the session is getting long. Pauses work in progress; does not commit, push or report shipped work.
03 SKILL.md 正文
Handoff
Capture the full working context of this session into a structured handoff so a future session (a fresh Claude Code session, a new chat, or another tool) can pick up exactly where this one stopped, with no prior context.
Modes
- Park (default in Claude Code): write the handoff to a file the next session reads. Default path:
HANDOFF.mdin the current working directory (mention it can be gitignored or deleted after use; the user may specify a different path). To resume: a new session reads that file and follows the instructions at its top. - Immediate (clipboard): print the handoff inline so the user can copy it into a new chat or another tool. Use this when the next session is somewhere this filesystem isn't shared.
Ask which mode if it isn't obvious; default to park.
Step 0: Retrospective gate (do this BEFORE writing the handoff)
The retrospective is the step that gets squeezed out between finishing the work and handing off, even when a written rule requires it. Before Step 1, state one of these to the user:
- "Retrospective already ran this session", and say what it produced (including "nothing worth adding", which is a legitimate result).
- "Running the retrospective now": run this short version: list the corrections the user made and the work that
was redone; for each one that will happen again and would make a future agent act differently, propose one line
for
CLAUDE.mdor memory, after checking that no existing line already says it; show the exact lines and apply only the ones the user approves. If theretrospectiveskill is installed and the user wants the full version, run it first, then come back and write the handoff. - "Skipping the retrospective because <reason>", only for a genuinely trivial session (a one-line fix, a pure question). If corrections were made, work was redone, or a phase closed, it is not trivial.
Say which of the three applies in every handoff. The retrospective's findings often belong in the handoff's Key Learnings section, which is why it runs first.
Step 1: Scan the Conversation
Review the full session and extract:
- What was accomplished: decisions made, artifacts created (files, code, plans, docs), problems solved.
- What was learned: gotchas, constraints, and corrections discovered during the work; user preferences that surfaced (tone, format, approach); things that didn't work and why.
- Where work stopped: the exact point the session ends; incomplete tasks; open questions.
- What's next: the user's stated priorities (these always take precedence over your own analysis), logical next steps, and any pending decisions the user needs to make.
Step 2: Build the Handoff
Produce this structure (as the file contents in park mode, or the inline block in immediate mode):
## Continue: [brief title of the project/task]
**How to resume:** this file is the record of the earlier session. Do not redo work it lists as done. Before you build
on a claim in "What's Been Done" or "Current State", run its "How to check" once. A check reads or runs once; it does
not redo the work. Before my approval, run only reading checks (files, `git log`, `git show`) and tests marked "safe to
run" below; ask me before any other test, a long run or one that costs money. Each check ends one of three ways:
holds; false (say so and treat the item as not done); or could not check (missing dependency, service not running,
another machine): the claim stands as written, flagged, and I decide.
**Before changing anything, tell me:**
1. What you understand was already done, and which claims you checked and how each came out
2. Your proposed next steps
3. Then wait for my approval. Reading files and running the read-only first commands listed below need no approval.
### First commands (read-only)
[Two to four commands that show where things stand, e.g. `git status`, `git log --oneline -5`. Nothing that writes,
installs, pushes or costs money.]
---
### Context
[What this project/task is about. 2 to 3 sentences.]
### What's Been Done
[Specific deliverables and decisions, not vague. End each claim with "How to check:" and one cheap check that
exercises the claim, not one that only shows a commit exists: the line of code that does it, or one named test to
run once. Mark a test "safe to run" only if it writes no files outside temp folders, needs no database or service
and calls nothing outside the machine. E.g. "Parser handles empty input. How to check: run the empty-input test once
(`pytest tests/test_parser.py::test_empty`, `go test -run TestEmpty ./parser`); safe to run."]
### Key Learnings
[Gotchas, constraints, preferences, corrections, so the next session doesn't repeat mistakes.]
### Current State
[Exactly where things stand: what's complete, in progress, blocked. Each claim ends with "How to check:", as above.]
### Next Steps
1. [User's stated priority, if given; always first]
2. [Logical next action]
3. [Further actions as needed]
### Reference Material
[Essential content the next session needs: key decisions, specs, style notes, file paths, snippets. Only what's essential, not a transcript.]
Step 3: Deliver
- Park: write the file, then tell the user the path and that a new session can resume by reading it.
- Immediate: present the block in an easy-to-copy form and tell the user to paste it into a new session.
Key Rules
- Assume no prior context: the receiving session knows nothing about this conversation.
- User's direction comes first: if the user said what to focus on next, it leads Next Steps.
- Concrete, not vague: "drafted the proposal with 5 sections" not "worked on the proposal".
- Every claim is checkable: each item in What's Been Done and Current State names how to check it once, without redoing the work, by exercising the claim rather than showing a commit exists. If you cannot name a check, say the claim is unverified.
- Keep the approval gate: the next session confirms its understanding before changing anything, and may read and run read-only checks first.
- Concise, not a transcript: enough to continue effectively, no more.
- Preserve content that matters: put specific text, code, specs, or decisions in Reference Material rather than just describing them.
- Skip the noise: abandoned dead ends, process meta-talk, superseded drafts, and context the user would naturally re-supply.
04 同仓库更多 Skills
tidy-notes
Tidy a plain text list: sort the lines and remove repeated ones. Use when the user types /tidy-notes.
tidy-notes
Tidy a plain text list: sort the lines and remove repeated ones. Use when the user types /tidy-notes.
other-notes
A skill with a different name, for the refusal case.
tidy-notes
Tidy a plain text list: sort the lines and remove repeated ones. Use when the user asks to tidy notes.
pack-boxes
Plan how to pack boxes for a move, room by room. Use when the user asks to pack for a move.
renamed-skill
A skill whose folder name differs from its name. Use when the user asks to rename something.