Handoff (shared)
Create temporary handoff documents and (optionally) propose/apply updates to permanent docs.
Shared vault layout
Root: $HOME/.openclaw/shared/ (Obsidian vault)
- - Temporary handoffs: INLINECODE1
- Permanent knowledge: INLINECODE2
Invocation
This skill is usually invoked via slash command (Telegram nativeSkills):
- -
/handoff <project> [options] (default mode) - INLINECODE4 (subcommand)
If native skill commands are unavailable, use: /skill handoff <input>.
Supported forms (v1)
This skill currently supports only two user-facing forms:
1) Default: /handoff <project> [options]
2) Load: INLINECODE7
Subcommand parsing rules (must follow)
- - Treat the first token after
/handoff as either:
- a
<project> (default mode),
or
- the literal subcommand
load.
- - Only
load is supported as a subcommand in v1. - Any other token that looks like a subcommand (e.g.
integrity, list, help, : variants) must be treated as unsupported. In that case:
1) explain it’s unsupported,
2) show the two supported forms above,
3) ask the user to restate.
/handoff load behavior
Goal: help the user quickly locate the most relevant existing handoff doc for a project.
When invoked as /handoff load <project> [--date YYYY-MM-DD]:
1) Search under: $HOME/.openclaw/shared/handoff/<project>/
2) Prefer checking an INDEX.md if present; otherwise search by recency.
3) If --date is provided, narrow to that date folder first.
4) Output:
- The best matching handoff path(s)
- A 3–8 bullet summary of what each file contains (read only)
- Ask whether to update an existing file or create a new one.
No file writes in load mode unless the user explicitly asks to update/create.
Inputs (suggested schema)
When the user provides options, interpret them like:
- -
--new force creating a new handoff file - INLINECODE23 prefer updating an existing relevant handoff file
- INLINECODE24 also generate a matching INLINECODE25
- INLINECODE26 optional short name ("slug") for the file base name
- INLINECODE27 permanent-doc mode (ONLY propose updates unless
--apply) - INLINECODE29 apply the proposed permanent-doc patch (requires explicit user confirmation)
If options are omitted:
- - default is to search for a relevant existing handoff for the same
<project> and ask whether to update it or create a new one (default suggestion: update).
Critical principles (must follow)
Confirm before writing
Before
any write or
edit, you MUST:
1) state the resolved absolute path(s) you intend to write, and
2) ask the user to confirm.
Permanent docs: propose first
In
--permanent mode you MUST:
- - read the target doc if it exists,
- analyze its existing style/purpose,
- output a PROPOSED PATCH (clear section-level changes),
- STOP and ask for explicit confirmation.
Only after explicit confirmation AND --apply should you write/edit the file.
Focus of permanent docs
Permanent docs should capture long-term maintainable knowledge:
- - architecture/procedures/debugging workflows
- the evolution of understanding (wrong assumptions → what became clear)
Temporary handoff doc requirements
A handoff doc is meant to be discarded after use. It must include:
1) Title: Project Handoff: <project>
2) Header note: temporary/discard after use
3) Key document links (permanent docs). If any new permanent docs were created in THIS session, link them here and explain each link in 1 sentence.
4) Session Goal
5) Work Done (concise)
6) Current Status (artifact/knowledge state, not actions)
7) Next Steps (actionable)
8) If --log used: link to the work log file
Also include a YAML header for indexing:
CODEBLOCK0
Work log document (only with --log)
Work log is detailed and command-ish:
- - commands executed + key outputs
- files read/modified + summary of changes
- hypotheses/decisions/errors
Avoid duplicating overview/goal/status/next steps from the handoff.
Implementation hints
- - Prefer relative Obsidian-friendly links inside the vault when linking other vault docs.
- Each project should keep:
$HOME/.openclaw/shared/handoff/<project>/INDEX.md pointing to recent handoffs. - If no
<project> exists yet, propose creating the project folder + INDEX.md and ask for confirmation before writing. - Ask the user if anything is unclear before proceeding when requirements are ambiguous.
交接(共享)
创建临时交接文档,并(可选)对永久文档提出/应用更新。
共享库结构
根目录:$HOME/.openclaw/shared/(Obsidian 库)
- - 临时交接文档:$HOME/.openclaw/shared/handoff/<项目>//...
- 永久知识文档:$HOME/.openclaw/shared/knowledge/<项目>/...
调用方式
此技能通常通过斜杠命令(Telegram 原生技能)调用:
- - /handoff <项目> [选项](默认模式)
- /handoff load <项目> [--date YYYY-MM-DD](子命令)
如果原生技能命令不可用,请使用:/skill handoff <输入>。
支持的格式(v1 版本)
此技能目前仅支持两种面向用户的格式:
1)默认模式:/handoff <项目> [选项]
2)加载模式:/handoff load <项目> [--date YYYY-MM-DD]
子命令解析规则(必须遵守)
- 一个 <项目>(默认模式),
或
- 字面子命令 load。
- - v1 版本仅支持 load 作为子命令。
- 任何其他看似子命令的词条(例如 integrity、list、help、: 变体)必须被视为不支持。在这种情况下:
1)说明该命令不受支持,
2)显示上述两种支持的格式,
3)请用户重新表述。
/handoff load 行为
目标:帮助用户快速定位项目中最相关的现有交接文档。
当以 /handoff load <项目> [--date YYYY-MM-DD] 形式调用时:
1)在以下路径下搜索:$HOME/.openclaw/shared/handoff/<项目>/
2)优先检查 INDEX.md(如果存在);否则按时间倒序搜索。
3)如果提供了 --date,则先限定到该日期文件夹。
4)输出:
- 最佳匹配的交接文档路径
- 每个文件内容的 3–8 条要点摘要(仅读取)
- 询问是更新现有文件还是创建新文件。
在 load 模式下不执行文件写入,除非用户明确要求更新/创建。
输入参数(建议模式)
当用户提供选项时,按如下方式解释:
- - --new 强制创建新的交接文件
- --update 优先更新现有的相关交接文件
- --log 同时生成匹配的 worklog.md 文件
- --name <名称> 文件基本名称的可选短名称(slug)
- --permanent <目标文档路径> 永久文档模式(除非使用 --apply,否则仅提出更新建议)
- --apply 应用提议的永久文档补丁(需要用户明确确认)
如果省略选项:
- - 默认行为是搜索同一 <项目> 的相关现有交接文档,并询问是更新它还是创建新文件(默认建议:更新)。
关键原则(必须遵守)
写入前确认
在执行
任何 write 或 edit 操作前,您必须:
1)说明您打算写入的已解析绝对路径,并且
2)请用户确认。
永久文档:先提议
在 --permanent 模式下,您必须:
- - 读取目标文档(如果存在),
- 分析其现有风格/目的,
- 输出提议的补丁(清晰的章节级更改),
- 停止并请求明确确认。
只有在用户明确确认且使用 --apply 后,才能写入/编辑文件。
永久文档的重点
永久文档应捕获长期可维护的知识:
- - 架构/流程/调试工作流
- 理解的演变过程(错误假设 → 变得清晰的内容)
临时交接文档要求
交接文档在使用后应被丢弃。它必须包括:
1)标题:项目交接:<项目>
2)页眉说明:临时/使用后丢弃
3)关键文档链接(永久文档)。如果在此会话中创建了任何新的永久文档,请在此处链接它们,并用一句话解释每个链接。
4)会话目标
5)已完成工作(简洁)
6)当前状态(制品/知识状态,而非操作)
7)后续步骤(可操作)
8)如果使用了 --log:链接到工作日志文件
同时包含用于索引的 YAML 头部:
yaml
type: handoff
temporary: true
project: <项目>
date:
created_at:
author:
session:
工作日志文档(仅与 --log 一起使用)
工作日志详细且偏向命令式:
- - 执行的命令 + 关键输出
- 读取/修改的文件 + 更改摘要
- 假设/决策/错误
避免重复交接文档中的概述/目标/状态/后续步骤。
实现提示
- - 在链接库内其他文档时,优先使用库内相对路径(Obsidian 友好型链接)。
- 每个项目应维护:$HOME/.openclaw/shared/handoff/<项目>/INDEX.md,指向最近的交接文档。
- 如果 <项目> 尚不存在,建议创建项目文件夹 + INDEX.md,并在写入前请求确认。
- 当需求不明确时,在继续操作前询问用户是否有不清楚之处。