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管控建议与判定依据
建议配套管控措施
面向 Agent
限定工作目录
面向管理者
保留操作记录
判定依据(文件路径与关键语句摘要)
- 本地工作目录: 文件读写与工件输出: 一个 handoff 文档写入用户 OS 的临时目录(指令明确:'Save to the temporary directory of the use
审计说明: 。无脚本执行、无网络外发、无凭证读取;唯一行为面是写一个文档到 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 无任何格式约束,纯自由文本);需要交接自动触发的工作流(禁隐式调用);需要把交接文档沉淀进仓库或共享位置、或需要文档生命周期(删除/归档)管理的场景。
Install Agent-Ready
① Verified Mirror 2026-09-06
Option A · Direct DownloadDownload handoff.tar.gz
sha256:
Option B · Copy Guide for Agentfa26a009eb0d810a…agent 读 JSON 指南后会自动从本站下载安装,无需更多说明。
② Upstream GitHub
GitHub Repo ↗
Pinned to commit 3cca18b368.