handoff
- 信任分
- 88/100
- 兼容 Agent
- 1
- 领域
- 效率工具
- 兼容 Agent
- Claude Code
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @mattpocock · 未声明 license
- 安装命令数
- 1 条
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
想读作者英文原文? ↓ 滚到正文区切换 · 在 GitHub 查看 ↗
设计思路
handoff 是 mattpocock 的「session 交接」skill——给当前对话写一份新 agent 能直接续接的交接文档。设计极简但有几条硬纪律:用 mktemp -t handoff-XXXXXX.md 拿到唯一路径,写之前先 read(避免覆盖既有内容),不和 PRD / plan / ADR / issue / commit / diff 等已有载体重复——后者用路径或 URL 引用即可。
工作流(按作者原文凝练)
- 用
mktemp -t handoff-XXXXXX.md生成临时路径 - 先 read 这个文件(极简但重要的安全习惯,避免某些情况下文件已存在)
- 写一份摘要:当前对话进展到哪、未决问题、阻塞点、下一步
- 在文档里建议下一 session 该用的 skill(比如「先跑
writing-plans,因为 design 已经定了」) - 已经在别处沉淀的内容——PRD、plan、ADR、issue、commit、diff——只引用路径或 URL,不复制粘贴
- 如果用户传了参数,把参数视作下一 session 的聚焦方向,按这个方向裁剪文档
适合谁
- 长任务做到一半要交给同事 / 另一台机器继续的人
- 即将上下文耗尽前想留 handover 给新 session 的工程师
- 多人协作 pair-agent 模式中转切换
何时不该用
- 任务一两小时就能做完——直接告诉对方就行
- 已经有完整
context-save文件——本 skill 是更轻量的姊妹,重复
配套
context-save(gstack 等价的更结构化版本)、landing-report(事件级总结报告)、pair-agent(同时协作的另一个 agent)。
Write a handoff document summarising the current conversation so a fresh agent can continue the work. Save it to a path produced by mktemp -t handoff-XXXXXX.md (read the file before you write to it).
Suggest the skills to be used, if any, by the next session.
Do not duplicate content already captured in other artifacts (PRDs, plans, ADRs, issues, commits, diffs). Reference them by path or URL instead.
If the user passed arguments, treat them as a description of what the next session will focus on and tailor the doc accordingly.