1实现原理 · 为什么它能做到
纯 prompt 编排,零代码:功能完全由宿主模型执行——读取当前会话、总结、按指令把文档写到 OS 临时目录。目录内除 SKILL.md 主指令与 agents/openai.yaml 元数据外无任何脚本/模板/引用文件。
productivity/handoff/SKILL.md
Write a handoff document summarising the current conversation so a fresh agent can continue the work. Save to the temporary directory of the user's OS - not the current workspace.
注:全文仅 5 段祈使句指令(cat -A 逐字节确认无代码块/隐藏内容)。'document summarising the current conversation' 依赖宿主模型的总结能力,skill 本身只做行为约束。
输出位置纪律:刻意写 OS 临时目录而非当前工作区,避免把交接文档混入用户仓库/项目目录。
productivity/handoff/SKILL.md
Save to the temporary directory of the user's OS - not the current workspace.
注:这里在做什么:把输出副作用隔离到临时区,防仓库污染;但文件名/子路径未指定,由宿主模型自行决定。
反重复设计:对既有工件(specs/plans/ADRs/issues/commits/diffs)只引用 path/URL,不复制内容,保证 handoff 精简并避免与源工件漂移。
productivity/handoff/SKILL.md
Do not duplicate content already captured in other artifacts (specs, plans, ADRs, issues, commits, diffs). Reference them by path or URL instead.
注:交接文档定位为『指针集+摘要』而非『内容快照』,下一 agent 按需回读原工件。
参数化定制:用户传入的 argument(argument-hint 提示'What will the next session be used for?')被当作下一会话用途描述,据此裁剪文档重点。
productivity/handoff/SKILL.md
If the user passed arguments, treat them as a description of what the next session will focus on and tailor the doc accordingly.
注:argument-hint 只在前置元数据中出现,是给宿主的触发提示词;无 schema 约束,argument 为自由文本。
双生态显式触发:Claude 侧 disable-model-invocation: true、OpenAI 侧 allow_implicit_invocation: false,均禁止模型自动调用,只有用户主动发起才运行。
productivity/handoff/agents/openai.yaml
policy: allow_implicit_invocation: false
注:frontmatter 另有 'disable-model-invocation: true'。交接属于用户有意图的收尾动作,不做隐式触发。
2核心能力
01把当前会话压缩成供新 agent 接手的交接文档
02文档写入 OS 临时目录、避开工作区
03生成 'suggested skills' 建议区,指明下一 agent 应调用的 Skill
04对已有工件按 path/URL 引用而非复制
05敏感信息脱敏(API keys/密码/PII)
06按用户 argument 定制文档侧重点
4风险提醒 风险提醒:蓝色 · 知晓即可
风险提醒:蓝色 · 知晓即可
- 脱敏无强制机制,仅靠模型判断 — 指令 'Redact any sensitive information…' 无规则/扫描兜底;敏感内容可能漏网写入文档,而 temp 目录文件对同机其他进程/用户可见(取决于 umask),且 skill 未指示用后删除,文档会留存累积
- 交接文档可成为 prompt-injection 的载体 — 文档总结自整个会话(可能含网页抓取等不可信内容);新会话直接读取该文档时,夹带指令可影响下一 agent。文档定位为『给另一个 agent 读』使此传播链天然存在
- 输出位置与文件名的不可预期性 — 仅约束到『OS 临时目录』,具体路径/文件名由模型临场决定,后续人工找回文档需搜索 temp 目录;多 OS 的 temp 路径语义也不同
风险提醒:蓝色,知晓即可。无脚本执行、无网络外发、无凭证读取;唯一行为面是写一个文档到 OS 临时目录(本地写入,且明确排除工作区)——按六档范式属『仅本地读写』档。留意点仅是 temp 文件对同机其他进程可见且无清理指令。
5第二遍独立确认
- [ok] 外部依赖:无(external_deps 为空) — 第二遍逐词重扫两文件正文:无任何 CLI/API/网络端点/第三方包引用;唯一提及的 'Skill tool' 是宿主自身工具而非外部依赖
- [ok] 无脚本/无可执行代码 — find productivity/handoff -type f 仅返回 SKILL.md 与 agents/openai.yaml;cat -A 显示正文为 5 段纯文本,无代码围栏
- [ok] 文件写入:仅 OS 临时目录 — quote 'Save to the temporary directory of the user's OS - not the current workspace.' 逐字节核实;无其他写路径指令
- [ok] 无网络调用/凭证读取 — 正文无 curl/gh/API 字样;未引用任何 env/keychain/配置文件
- [ok] 触发方式:仅显式 — SKILL.md frontmatter 'disable-model-invocation: true' 与 openai.yaml 'allow_implicit_invocation: false' 两处独立证据一致
- [ok] 功能声明 vs 实际能力相符性 — description 'Compact the current conversation into a handoff document' 与正文指令一致;无夸大——能力边界即宿主模型的总结+写文件
- [ok] 元数据:license/stars/last_push — GitHub API:MIT、stargazers_count 253948、pushed_at 2026-09-04(与 pin commit 日期吻合)
6结论
适合:需要跨会话/跨 agent 交接复杂工作的个人开发者(如 Matt Pocock 式工作流);想把『下一 agent 接手』标准化的团队;偏好交接文档不进仓库、留在临时区的场景。
不适合:需要固定交接模板/结构化 schema 的团队(本 skill 无任何格式约束,纯自由文本);需要交接自动触发的工作流(禁隐式调用);需要把交接文档沉淀进仓库或共享位置、或需要文档生命周期(删除/归档)管理的场景。
安装 agent 直装可复制
① 本站镜像 更新 2026-09-06
方式 A · 人下载镜像包下载 handoff.tar.gz
sha256:
方式 B · JSON 格式安装指南,复制给 agentfa26a009eb0d810a…agent 读 JSON 指南后会自动从本站下载安装,无需更多说明。
② 上游 GitHub · 原始来源
来源信息 GitHub 原始
作者 / 仓库mattpocock / mattpocock/skills
原始 GitHubmattpocock/skills ↗
Stars253948
最近推送2026-09-04
本 skill commit
3cca18b368许可MIT
本站信息
收录日期2026-09-06
分类基础工具与工作流
侦查报告2026-09-06 · 2 遍
本站镜像与 GitHub 原始是不同来源:本站锁定 commit 快照经 /r2 分发;GitHub 为实时上游,内容可能已更新。