关于 create-handoff
用于编写简洁而完整的交接文档的技能,帮助另一位 Agent 在新会话中接续工作。它规定了 scratchpad 文件路径、YAML 元数据格式,以及记录目标和实现细节的方式。
主要功能
- 01在指定路径创建交接文档
- 02添加结构化 YAML 元数据
- 03记录目标与实现细节
- 04以文件引用替代大段代码
适用场景
- 01将实现工作交给另一位 Agent
- 02在不同会话间保留上下文
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ casper-studios/ casper-marketplace --skill create-handoff安装后在 Claude Code 中输入/create-handoff确认已加载。
详细介绍
创建交接文档
你的任务是编写一份交接文档,将工作交接给新会话中的另一位 Agent。你要创建一份内容详尽但也简洁的交接文档。目标是在不遗漏工作关键细节的前提下,精简并概述上下文。
流程
1. 文件路径与元数据
使用以下信息了解如何创建文档:- 在 .claude/scratchpad/handoffs/[feature]_description.md 下创建文件,其中:feature 是简短的 kebab-case 描述
2. 编写交接文档。
使用指定的文件路径,并采用以下 YAML frontmatter 格式。文档应由 YAML frontmatter 和正文构成:
使用以下模板结构:
---
date: [Current date and time with timezone in ISO format]
git_commit: [Current commit hash]
branch: [Current branch name]
repository: [Repository name]
topic: '[Feature/Task Name] Implementation Strategy'
last_updated: [Current date in YYYY-MM-DD format]
type: implementation_strategy
---
# Handoff: {ticket-id} {very concise description}
## Task(s)
{description of the task(s) that you were working on, along with the status of each (completed, work in progress, planned/discussed). If you are working on an implementation plan, make sure to call out which phase you are on. Make sure to reference the plan document and/or research document(s) you are working from that were provided to you at the beginning of the session, if applicable.}
## Critical References
{List any critical specification documents, architectural decisions, or design docs that must be followed. Include only 2-3 most important file paths. Leave blank if none.}
## Recent changes
{describe recent changes made to the codebase that you made in line:file syntax}
## Learnings
{describe important things that you learned - e.g. patterns, root causes of bugs, or other important pieces of information someone that is picking up your work after you should know. consider listing explicit file paths.}
## Artifacts
{ an exhaustive list of artifacts you produced or updated as filepaths and/or file:line references - e.g. paths to feature documents, implementation plans, etc that should be read in order to resume your work.}
## Action Items & Next Steps
{ a list of action items and next steps for the next agent to accomplish based on your tasks and their statuses}
## Other Notes
{ other notes, references, or useful information - e.g. where relevant sections of the codebase are, where relevant documents are, or other important things you leanrned that you want to pass on but that don't fall into the above categories}
##. 补充说明与指示
- 信息宁多勿少。这是交接文档内容最低限度的指导。必要时,随时可以补充更多信息。
- 详尽且准确。既要包含顶层目标,也要根据需要说明底层细节。
- 避免过多代码片段。简短片段有助于说明关键改动,但应避免大段代码块或差异;除非确有必要(例如涉及你正在调试的错误),否则不要包含。优先使用
/path/to/file.ext:line形式的引用,方便 Agent 之后查找,例如packages/dashboard/src/app/dashboard/page.tsx:12-24。
评论
支持 Markdown