agentleFS
GitZhiQingGitZhiQing/agent-skills/skills/session-handoff/SKILL.md

session-handoff

Skill1 starsChanged 17 days agoMITView on GitHub

会话收尾时回顾全程,把接手所需上下文打包成一段交接提示词:用户原样粘贴进新会话开头, 让没有任何历史上下文的 Coding Agent 快速恢复状态、制定计划、继续开发。 当用户说"交接一下""生成交接提示词""换会话继续""把这次会话交接出去""session handoff"等时使用; 当用户只要本会话的总结 / 复盘(不用于跨会话继续)、或任务已完结只需常规收尾时,不要使用本 skill。

139 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use ascii-diagram, research-fleet and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • SethGammonSkill

    ascii-diagram

    Generate perfectly aligned ASCII diagrams — architecture, flow, sequence, box-and-arrow. Uses a programmatic character-grid approach so alignment is guaranteed by math, not token prediction. Includes post-render verification.

    Also in 4 projects that use this

  • SethGammonSkill

    research-fleet

    Parallel research using Fleet wave mechanics. Spawns multiple scout agents, each investigating a different angle of the same question. Findings are compressed between waves. Produces a unified research brief from multiple independent perspectives.

    Also in 3 projects that use this

  • vicoa-aiSkill

    live-preview

    Start a local app in the current user project, expose it through a tunnel, and return preview details in structured Markdown. Use when the user asks for a preview URL, public URL, shareable localhost, mobile/web preview, or tunnel setup.

    Also in 4 projects that use this

  • botlearn-aiSkill

    doc-gen

    Also in 4 projects that use this

  • flyingobsidianSkill

    terminology

    Read a codebase, find terminology, create/update definitions into a markdown document.

    Also in 3 projects that use this

  • Dizzy-TenSkill

    bug-diagnosis

    Diagnose bugs and product issues without modifying code. Use when the user explicitly invokes $bug-diagnosis or asks for diagnosis, root-cause analysis, issue classification, or fix strategy for code bugs, failing tests, configuration/dependency problems, deployment issues, performance regressions, data anomalies, or frontend/user-experience problems described through screenshots, annotations, logs, errors, or natural-language reports. Prioritize analysis and recommendations only; do not edit files.

    Also in 3 projects that use this

  • +1 more from SethGammon

The file

Files
SKILL.md

session-handoff:把会话打包成可粘贴的交接提示词

会话收尾时使用:通读全程,产出一段自包含的交接提示词——用户原样粘贴到新会话开头,接手的 Coding Agent 在无历史上下文的情况下恢复状态、制定计划、继续开发。

接手方一般已通过自动注入读到 AGENTS.md 等项目上下文,因此交接词不搬运项目基本面,只交付会话增量(见"面向 AGENTS.md 的取舍")。

生成前核对

  • 通读整个会话:任务目标、已完成的改动、关键决策、失败尝试、未决问题、下一步。
  • 用命令核对事实,不凭记忆:git status(分支、未提交变更)、git diff --stat(变更清单)、git log --oneline -5(提交锚点);非 git 项目跳过此步。
  • 会话与仓库均无从佐证的内容不编造;密钥、token、密码一律用 <占位符> 代替。

交接提示词骨架

按以下骨架成文:7 节必含 + 第 8 节条件保留(尖括号为提示占位,成文时替换为真实内容):

# 会话交接:<一句话概括任务>

## 1. 任务与目标
(要解决的需求 + 一句话验收标准;项目背景不展开——接手方会从 AGENTS.md 读到)

## 2. 当前进度
(已完成 / 进行中 / 未开始;一句话定位阶段,如"接口已通,前端未联调";分支名与未提交变更)

## 3. 关键变更
(文件清单:路径 + 一句话说明;涉及函数 / 类名;报错原文照贴)

## 4. 关键决策与原因
(技术选型、约定、被否决的方案及原因)

## 5. 待办与下一步
(按优先级排列;每项写明预期产出与涉及文件)

## 6. 已知问题与风险
(未解决的 bug、阻塞点、开放问题;失败尝试写明试了什么、为什么失败)

## 7. 开工指引
(第一个明确动作,如"先运行 <命令> 确认环境,再读 <文件>";附建议计划框架:先验证什么、再做什么、最后做什么)

## 8. 补充(AGENTS.md 未覆盖)
(仅在确有内容时保留本节:AGENTS.md 之外的环境变量、新模块位置、本会话新立的约定等;无内容整节省略)

面向 AGENTS.md 的取舍

  • 项目背景、目录地图、构建 / 测试 / 运行命令、通用代码约定——AGENTS.md(或等价自动注入的上下文文件)已覆盖的,不重复、不搬运。
  • 交接词只写三类内容:本会话的增量事实(改动、决策、进度);与 AGENTS.md 的偏差与补充;接手方无处可查但必须知道的信息。
  • 项目无 AGENTS.md(或已知新会话不会自动注入)时,把环境与运行方式、重要文件地图、约定与禁忌并入第 8 节补全——"能独立开工"的底线不因精简而失守。

写作要求

  1. 只输出交接提示词本身,放在一个 markdown 代码块内(便于整段复制);块外不要有任何解释、总结或寒暄。
  2. 以第二人称对下一个 Agent 说话("你接手的是…""你的第一步是…")。
  3. 语言与本次会话保持一致。
  4. 具体、可验证:真实文件路径、函数 / 类名、分支名、命令、版本号、报错原文。反例:"修改了相关文件""优化了部分逻辑";正例:"src/auth.py 的 login() 新增 3 次指数退避重试(50ms 起)"。
  5. 区分确定与不确定:未验证的结论标"(待验证)",悬而未决的问题标"(未决)"。
  6. 不得包含密钥、token、密码等敏感信息,一律用 <占位符> 代替。
  7. 精炼打包,以"能立刻继续干活"为准:一般 400–1200 字;信息多时优先保留影响下一步行动的事实。
  8. 本次会话失败过的尝试必须写明"试了什么、为什么失败",防止接手方重蹈覆辙。
  9. 必含节确实无内容时写"本会话未涉及";第 8 节无内容时整节省略。

收尾核验

输出前自检——接手方带着(自动注入的)AGENTS.md + 这段文字,能否独立开工?不能则补齐缺失信息后再输出。

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.