From autopilot
Write a standardized mid-work handoff doc for session continuation, and resume from one. Useful when context is full or handing off to another session.
How this skill is triggered — by the user, by Claude, or both
Slash command
/autopilot:handoffThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Mid-work session continuation handoff.
Mid-work session continuation handoff.
Triggered by "寫 handoff", "寫 handover", "ctx 太滿", "context 快滿", "clear session 後繼續", "write a handoff", or "hand off to the next session".
Collect State Mechanically: Run commands to collect context:
git branch --show-current
git log --oneline -5
git status --porcelain | head -20
git stash list | head -3
ls docs/projects/ | grep -v _archive | head
# Also check open task list if the harness shows one
Determine Handoff Path:
docs/projects/<project>/HANDOFF.mddocs/HANDOFF.md~/.autopilot/handoff-manual/<repo-or-cwd-name>.mdGenerate Document:
If HANDOFF.md already exists, REPLACE it (a handoff is a snapshot, not a log) and note the replacement in the reply. Write verbatim:
## 目標
[One-sentence goal of the interrupted work]
## 現況
[Branch, last commit SHA+subject, dirty files, what is DONE vs IN-FLIGHT]
## 已決事項(不重議)
- [Decision 1] — [One-line rationale]
- [Decision 2] — [One-line rationale]
## 下一步
1. [CONCRETE command or file edit to start with]
2. [Subsequent concrete step]
## 驗證方式
[Commands and expected output proving work is done]
## Read-order
1. /absolute/path/to/file1 — [Why to read first]
2. /absolute/path/to/file2 — [Why to read second]
3. /absolute/path/to/file3 — [Why to read third]
## 陷阱
- [Gotchas discovered this session that would burn the next session]
Response to User:
Reply with the file path, the paste-ready line: read <path> 接續, and a reminder that the machine-snapshot hook complement exists (handoff_inject, see hooks/README.md) if they want auto-capture on /clear.
Triggered by "read ...HANDOFF.md 接續" or "接手上個 session" or "resume from handoff".
git log -1
git status
If reality has drifted from "現況", report the drift to the user first before proceeding.已決事項(不重議) as settled; do not reopen or litigate them.下一步 item 1 immediately; do not re-plan unless verification fails.HANDOFF.md file as part of session-end cleanup (a handoff is a snapshot; a stale one misleads the next session).When context pressure signals occur (a compaction just happened; or the conversation is long and the user hints at wrapping/切換), OFFER a handoff in one sentence: "需要我寫 handoff 檔案以便 clear session 後繼續嗎?" (The user should never have to ask "需要寫 handoff 嗎?" themselves).
npx claudepluginhub cookys/autopilot --plugin autopilotCaptures session state into a structured handoff document before switching context or ending a session, so future sessions can resume without losing context.
Produces a handoff document so a fresh agent can continue work from the current session. Handles both mid-arc continuation and backlog handoffs.
Writes a grounded session-handoff document and continuation memory so a fresh agent can resume in-progress work. Useful before /clear, /compact, or teammate handoff.