handoff-v2

跨会话交接协议。用户只要表现出“现在先停一下,下一会话接着干”“继续刚才那一轮”“上下文太长要迁移工作现场”等意图,就必须使用此 skill。 `handoff out` 生成一个最小可执行的 handoff 包;`handoff in <id|latest>` 先读取 handoff 包并给出恢复预览,获得用户同意后才继续执行;`handoff list` 查看最近的交接记录。 整个协议只允许一个载体:handoff.md,不生成额外 prompt,不要求用户重新讲背景。

3,891 stars

Best use case

handoff-v2 is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

跨会话交接协议。用户只要表现出“现在先停一下,下一会话接着干”“继续刚才那一轮”“上下文太长要迁移工作现场”等意图,就必须使用此 skill。 `handoff out` 生成一个最小可执行的 handoff 包;`handoff in <id|latest>` 先读取 handoff 包并给出恢复预览,获得用户同意后才继续执行;`handoff list` 查看最近的交接记录。 整个协议只允许一个载体:handoff.md,不生成额外 prompt,不要求用户重新讲背景。

Teams using handoff-v2 should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/handoff-session/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/allen-cao/handoff-session/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/handoff-session/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How handoff-v2 Compares

Feature / Agenthandoff-v2Standard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

跨会话交接协议。用户只要表现出“现在先停一下,下一会话接着干”“继续刚才那一轮”“上下文太长要迁移工作现场”等意图,就必须使用此 skill。 `handoff out` 生成一个最小可执行的 handoff 包;`handoff in <id|latest>` 先读取 handoff 包并给出恢复预览,获得用户同意后才继续执行;`handoff list` 查看最近的交接记录。 整个协议只允许一个载体:handoff.md,不生成额外 prompt,不要求用户重新讲背景。

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Handoff Protocol V2

`handoff` 不是总结工具,而是一套“冻结现场 → 封装状态 → 恢复执行”的交接协议。

目标只有一个:**让下一会话不追问背景,直接继续干活。**

## 一、协议对象

每一次 handoff,都是一个 **handoff 包**:

```text
~/.agents/handoff_context/<handoff_id>/handoff.md
```

这个包只承担一件事:保存“继续执行”所需的最小状态。

协议约束:

- 唯一载体是 `handoff.md`
- 不额外生成 prompt
- 不转储聊天记录
- 不追求完整,只追求可恢复
- 写完后必须能让下一会话马上开工

## 二、三种动作

### `handoff out`

把当前工作现场冻结成一个 handoff 包。

触发信号:

- `handoff out`
- 帮我做会话交接
- 上下文太长了 / 该换会话了
- 我稍后继续 / 先把现场存一下
- 把当前状态交给下个会话

### `handoff in <id|latest>`

读取一个 handoff 包,先恢复理解,再在用户同意后继续执行。

触发信号:

- `handoff in <id>`
- `handoff in latest`
- 继续刚才那个
- 继续上一个会话
- 从交接文档恢复
- 接着上次任务做

解析规则:

- 给了 `<id>` → 读取该包
- 写了 `latest` → 读取最近一次包
- 没给 ID,但语义明显是“继续最近一次” → 按 `latest` 处理

### `handoff list`

列出最近 handoff 包,帮助用户找回某次交接。

触发信号:

- `handoff list`
- 列出最近的 handoff
- 看看最近交接

## 三、八槽交接包

每个 `handoff.md` 必须包含 8 个槽位,缺一不可:

1. **当前任务**:现在到底在做什么
2. **当前状态**:做到哪一步了,卡在哪里
3. **已完成**:已经落地的结果
4. **关键决策**:已经定下来的结论
5. **关键约束**:不能破坏的限制
6. **关键文件**:下一会话要先看的文件
7. **下一步**:可以立刻执行的动作
8. **待确认**:唯一阻塞项;没有就写 `无`

填写标准:

- `关键文件` 用 `path:line` + 一句话说明
- `下一步` 必须是动作,不允许写“继续推进”“再看看”
- `关键决策` 只写结论,不写讨论史
- `待确认` 只写阻塞项,不能塞杂项
- 没有内容时写 `未记录` 或 `无`,不能留空

## 四、`handoff out` 协议

按顺序执行:

1. 用一句话确定主题
2. 调用 `scripts/handoff_file.sh create "{主题}"`
3. 填满 8 个槽位
4. 做一次压缩,把不能帮助恢复执行的内容全部删掉
5. 做一次恢复检查:假设自己已经失忆,只靠这份文档能否继续干活
6. 向用户输出固定结果块

压缩原则:

- 保留事实,删除过程
- 保留结论,删除讨论
- 保留动作,删除叙述
- 保留阻塞,删除情绪
- 如果一行不能帮助下一会话动手,就删掉

长度规则:

- 目标长度:100 行内
- 建议上限:120 行内
- 复杂任务的例外上限:150 行内
- 超过 120 行时,先主动压缩一次
- 超过 150 行时,视为 handoff 失焦,需要重写

固定输出块必须包含:

```text
Handoff saved.

  ID:   {handoff_id}
  File: ~/.agents/handoff_context/{handoff_id}/handoff.md

  Next session → handoff in {handoff_id}
```

可以在前后补一句解释,但这三行的结构不能变。

## 五、`handoff in` 协议

按顺序执行:

1. 解析目标 handoff 包
2. 读取 `handoff.md`
3. 用 3-5 条 bullets 复述恢复结果
4. 明确告诉用户准备执行的下一步
5. 先询问用户是否同意继续执行
6. 只有在用户同意后,才打开 `关键文件` 并执行 `下一步`
7. 若用户不同意,则停在恢复预览阶段,等待新的指令
8. 若 `待确认` 阻塞执行,也只提出 1 个最关键问题

恢复 bullets 至少覆盖:

- 当前任务
- 当前状态
- 关键文件
- 下一步
- 是否存在阻塞

建议询问句式:

- `我已恢复现场,下一步是:{下一步}。是否继续执行?`

禁止行为:

- 不重新收集背景
- 不让用户复述上一会话
- 不把 handoff 当成总结报告来讲
- 不在用户同意前就直接执行下一步
- 不在 `handoff in` 时顺手再生成新的 handoff

## 六、`handoff list` 协议

执行:`scripts/handoff_file.sh list`

输出格式:

```text
<handoff_id>  <topic>
```

一行一个,默认最近 5 条。

## 七、恢复成功的判定标准

一份合格 handoff,必须同时满足:

- 新会话知道现在要做什么
- 新会话知道已经做到哪一步
- 新会话知道哪些限制不能碰
- 新会话知道先看哪些文件
- 新会话知道下一步立刻做什么
- 新会话不需要用户重新讲故事
- 用户同意后可以无缝继续执行

只要有一项做不到,这份 handoff 就不合格,需要重写。

## 八、异常处理

- 找不到指定 ID:明确报错,并提示用户先执行 `handoff list`
- 没有任何 handoff:明确说明还没有交接记录
- `关键文件` 有部分不存在:指出缺失项,但继续基于剩余信息给出恢复预览
- 文档里某槽位缺失:先用已有槽位恢复;只有在真的阻塞时才问 1 个问题

## 九、资源

- 脚本:`scripts/handoff_file.sh`
- 模板:`references/templates.md`
- 说明:`使用文档.md`

Related Skills

context-handoff

3891
from openclaw/skills

保存和恢复聊天上下文到本地文件。用于用户想在切换账号、清空 session、重新开会话、跨会话延续项目时,把当前会话级上下文或项目级摘要落盘并在之后恢复。也用于列出已有的会话上下文槽位或项目摘要,并按更新时间排序返回最近使用项。触发词包括:保存当前上下文、保存会话摘要、保存项目摘要、记下这次讨论、切号前保存、恢复上下文、恢复项目摘要、读取上次摘要、继续上次讨论、列出上下文槽位、列出已保存摘要、有哪些项目摘要、最近更新的项目摘要、按更新时间排序、session handoff, context handoff, save session context, save current context, save chat summary, save project summary, restore context, restore session context, restore project summary, continue last discussion, resume project context, list context slots, list project summaries, list saved summaries, sort by updated time, most recently updated, recently updated summaries, chat handoff, project handoff.

manufacturing-shift-handoff

3891
from openclaw/skills

为生产班次交接整理设备状态、异常、待处理事项与安全提醒。;use for manufacturing, handoff, shift workflows;do not use for 省略安全问题, 替代正式 EHS 记录.

account-handoff-builder

3891
from openclaw/skills

将销售到交付的客户信息整理成交接包,识别承诺风险与实施前提。;use for handoff, customer-success, sales-to-cs workflows;do not use for 删掉不利信息, 替代合同文本.

---

3891
from openclaw/skills

name: article-factory-wechat

Content & Documentation

humanizer

3891
from openclaw/skills

Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases.

Content & Documentation

find-skills

3891
from openclaw/skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

General Utilities

tavily-search

3891
from openclaw/skills

Use Tavily API for real-time web search and content extraction. Use when: user needs real-time web search results, research, or current information from the web. Requires Tavily API key.

Data & Research

baidu-search

3891
from openclaw/skills

Search the web using Baidu AI Search Engine (BDSE). Use for live information, documentation, or research topics.

Data & Research

agent-autonomy-kit

3891
from openclaw/skills

Stop waiting for prompts. Keep working.

Workflow & Productivity

Meeting Prep

3891
from openclaw/skills

Never walk into a meeting unprepared again. Your agent researches all attendees before calendar events—pulling LinkedIn profiles, recent company news, mutual connections, and conversation starters. Generates a briefing doc with talking points, icebreakers, and context so you show up informed and confident. Triggered automatically before meetings or on-demand. Configure research depth, advance timing, and output format. Walking into meetings blind is amateur hour—missed connections, generic small talk, zero leverage. Use when setting up meeting intelligence, researching specific attendees, generating pre-meeting briefs, or automating your prep workflow.

Workflow & Productivity

self-improvement

3891
from openclaw/skills

Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Claude ('No, that's wrong...', 'Actually...'), (3) User requests a capability that doesn't exist, (4) An external API or tool fails, (5) Claude realizes its knowledge is outdated or incorrect, (6) A better approach is discovered for a recurring task. Also review learnings before major tasks.

Agent Intelligence & Learning

botlearn-healthcheck

3891
from openclaw/skills

botlearn-healthcheck — BotLearn autonomous health inspector for OpenClaw instances across 5 domains (hardware, config, security, skills, autonomy); triggers on system check, health report, diagnostics, or scheduled heartbeat inspection.

DevOps & Infrastructure