---
name: context-handoff-yashu
description: 将当前多轮对话上下文压缩为交接文档，以便新的AI agent接手继续沟通。仅当用户请求的文本末尾显式包含以下4个确切关键词之一时才触发此技能：『上下文交接』、『生成交接文档』、『总结上下文』、『换AI继续』。
title: context-handoff-yashu
canonical_url: https://skilld.dev/gh/steelan9199/wechat-publisher/context-handoff-yashu
last_updated: 2026-10-07T07:20:50.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> If the user asked to install this Skill, run `npx skilld install steelan9199/wechat-publisher/context-handoff-yashu`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/context-handoff-yashu`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/steelan9199/wechat-publisher/context-handoff-yashu) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/context-handoff-yashu`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/context-handoff-yashu --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/context-handoff-yashu --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# 上下文交接

将当前对话的完整上下文总结为一份结构化的交接文档，保存到当前工作区根目录下的 `handoff-YYYYMMDD-HHMMSS.md` 文件中。让新的 AI agent 阅读该文档后即可无缝继续对话。

## 交接文档应包含以下内容

1. **对话背景与目标**：当前正在讨论或解决什么事情、最终想要达成什么结果。
2. **已完成的进展**：到目前为止已经做了哪些工作、达成了哪些共识或成果、解决了哪些子问题。
3. **当前状态与待办事项**：
   - 正在进行但尚未完成的事项；
   - 下一步明确需要执行的任务；
   - 存在的阻塞点、待确认的问题或待做的决策。
4. **关键决策与方案**：当前已确定的方向、原则、方法或结论。如果对话中涉及选择或取舍，需记录最终定下的方案。
5. **产出物与变更摘要**：如果对话中产生了任何内容（如文本、代码、配置、计划、列表、分析等），列出关键产出物的摘要或存放位置。不要贴完整内容，只写要点和路径。
6. **建议调用的 Skills**：根据当前任务类型，建议新 agent 继续工作时可以调用的相关 skills。
7. **脱敏提醒**：文档中必须隐去所有敏感信息，包括 API Key、密码、Token、个人隐私信息等。

## 引用规范

- 不要重复已存在于其他文档、计划、记录中的详细内容。
- 对于这些内容，在交接文档中通过文件路径或 URL 引用即可。

## 参数处理

如果用户传递了参数，将其视为对“下一会话重点方向”的描述，并在交接文档中突出体现，帮助新 agent 明确接下来的工作重心。

## 输出格式

- 交接文档使用 Markdown 格式。
- 文件名必须为 `handoff-YYYYMMDD-HHMMSS.md`，其中时间戳必须基于**用户设备的本地真实时间**。
- **严禁编造时间戳**。获取当前时间的跨平台方式如下：
  - **Windows (PowerShell)**: `Get-Date -Format "yyyyMMdd-HHmmss"`
  - **Linux / macOS / Bash**: `date +%Y%m%d-%H%M%S`
  - **Python**: `import datetime; datetime.datetime.now().strftime("%Y%m%d-%H%M%S")`
  - **Node.js**: `new Date().toLocaleString('sv').replace(/[- :]/g, '').slice(0, 12)`
- 如果执行环境支持调用系统命令，必须优先通过系统命令获取真实时间后再生成文件。
- 将文件保存到当前工作区根目录，确保新 agent 能快速定位并理解上下文。
