create-handoff by parcadei/continuous-claude-v3
npx skills add https://github.com/parcadei/continuous-claude-v3 --skill create-handoff你的任务是编写一份交接文档,以便将你的工作交接给新会话中的另一个智能体。你需要创建一份既详尽又简洁的交接文档。目标是在不丢失你所处理工作的任何关键细节的前提下,紧凑地总结你的上下文。
使用以下信息来理解如何创建你的文档:
首先,从现有的交接文档中确定会话名称:
ls -td thoughts/shared/handoffs/*/ 2>/dev/null | head -1 | xargs basename
这将返回最近修改的交接文件夹名称(例如 open-source-release)。将此用作交接文件夹名称。
如果不存在任何交接文档,则使用 general 作为文件夹名称。
在以下路径下创建你的文件: thoughts/shared/handoffs/{session-name}/YYYY-MM-DD_HH-MM_description.yaml,其中:
{session-name} 来自现有的交接文档(例如 open-source-release),如果不存在则使用 广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
generalYYYY-MM-DD 是今天的日期HH-MM 是当前时间的 24 小时制格式(不需要秒)description 是一个简短的短横线分隔描述示例:
thoughts/shared/handoffs/open-source-release/2026-01-08_16-30_memory-system-fix.yamlthoughts/shared/handoffs/general/2026-01-08_16-30_bug-investigation.yaml关键:请严格按照此 YAML 格式。不要偏离或使用替代字段名称。
goal: 和 now: 字段会显示在状态行中 - 它们的名称必须与此完全一致。
---
session: {来自账本的会话名称}
date: YYYY-MM-DD
status: complete|partial|blocked
outcome: SUCCEEDED|PARTIAL_PLUS|PARTIAL_MINUS|FAILED
---
goal: {本次会话完成的目标 - 显示在状态行}
now: {下次会话应首先执行的操作 - 显示在状态行}
test: {用于验证此项工作的命令,例如 pytest tests/test_foo.py}
done_this_session:
- task: {第一个已完成的任务}
files: [{file1.py}, {file2.py}]
- task: {第二个已完成的任务}
files: [{file3.py}]
blockers: [{任何阻塞性问题}]
questions: [{留给下次会话的未解决问题}]
decisions:
- {决策名称}: {理由}
findings:
- {关键发现}: {详情}
worked: [{有效的方法}]
failed: [{失败的方法及原因}]
next:
- {第一个后续步骤}
- {第二个后续步骤}
files:
created: [{新创建的文件}]
modified: [{已修改的文件}]
字段指南:
goal: + now: - 必需,显示在状态行中done_this_session: - 已完成的工作及文件引用decisions: - 重要的选择及其理由findings: - 关键的学习成果worked: / failed: - 应重复使用的方法与应避免的方法next: - 下次会话的行动项请勿使用替代字段名称,如 session_goal、objective、focus、current 等。状态行解析器只识别 goal: 和 now: - 其他任何名称都无效。
重要提示: 在回复用户之前,你必须询问会话结果。
使用 AskUserQuestion 工具,并附带以下确切的选项:
Question: "本次会话进展如何?"
Options:
- SUCCEEDED: 任务成功完成
- PARTIAL_PLUS: 大部分完成,存在次要问题
- PARTIAL_MINUS: 取得一些进展,存在主要问题
- FAILED: 任务被放弃或阻塞
用户回复后,对交接文档进行索引并标记结果:
# 标记最近的交接文档(适用于 PostgreSQL 或 SQLite)
# 使用 git 根目录查找项目,然后定位到 opc/scripts/core/
PROJECT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo "${CLAUDE_PROJECT_DIR:-.}")
# 首先,将交接文档索引到数据库中
cd "$PROJECT_ROOT/opc" && uv run python scripts/core/artifact_index.py --file thoughts/shared/handoffs/{session_name}/{filename}.yaml
# 然后标记结果
cd "$PROJECT_ROOT/opc" && uv run python scripts/core/artifact_mark.py --latest --outcome <USER_CHOICE>
重要提示: 将 {session_name} 和 {filename} 替换为步骤 1 中的实际值。
这些命令会自动检测数据库(如果配置了 PostgreSQL 则使用它,否则回退到 SQLite)。
注意: 如果索引失败,标记步骤将显示"数据库标记不可用" - 对于第一次交接来说这是可以接受的,但这表明索引步骤被跳过了。
标记结果后,回复用户:
交接文档已创建!结果已标记为 [OUTCOME]。
在新会话中恢复工作,请使用:
/resume_handoff path/to/handoff.yaml
/path/to/file.ext:line 这样的引用,以便智能体在后续需要时可以跟进,例如 packages/dashboard/src/app/dashboard/page.tsx:12-24。每周安装量
213
代码仓库
GitHub 星标数
3.6K
首次出现时间
2026年1月23日
安全审计
安装于
opencode204
codex203
gemini-cli201
github-copilot198
cursor197
amp193
You are tasked with writing a handoff document to hand off your work to another agent in a new session. You will create a handoff document that is thorough, but also concise. The goal is to compact and summarize your context without losing any of the key details of what you're working on.
Use the following information to understand how to create your document:
First, determine the session name from existing handoffs:
ls -td thoughts/shared/handoffs/*/ 2>/dev/null | head -1 | xargs basename
This returns the most recently modified handoff folder name (e.g., open-source-release). Use this as the handoff folder name.
If no handoffs exist, use general as the folder name.
Create your file under: thoughts/shared/handoffs/{session-name}/YYYY-MM-DD_HH-MM_description.yaml, where:
{session-name} is from existing handoffs (e.g., open-source-release) or general if none existYYYY-MM-DD is today's dateHH-MM is the current time in 24-hour format (no seconds needed)description is a brief kebab-case descriptionExamples:
thoughts/shared/handoffs/open-source-release/2026-01-08_16-30_memory-system-fix.yamlthoughts/shared/handoffs/general/2026-01-08_16-30_bug-investigation.yamlCRITICAL: Use EXACTLY this YAML format. Do NOT deviate or use alternative field names.
The goal: and now: fields are shown in the statusline - they MUST be named exactly this.
---
session: {session-name from ledger}
date: YYYY-MM-DD
status: complete|partial|blocked
outcome: SUCCEEDED|PARTIAL_PLUS|PARTIAL_MINUS|FAILED
---
goal: {What this session accomplished - shown in statusline}
now: {What next session should do first - shown in statusline}
test: {Command to verify this work, e.g., pytest tests/test_foo.py}
done_this_session:
- task: {First completed task}
files: [{file1.py}, {file2.py}]
- task: {Second completed task}
files: [{file3.py}]
blockers: [{any blocking issues}]
questions: [{unresolved questions for next session}]
decisions:
- {decision_name}: {rationale}
findings:
- {key_finding}: {details}
worked: [{approaches that worked}]
failed: [{approaches that failed and why}]
next:
- {First next step}
- {Second next step}
files:
created: [{new files}]
modified: [{changed files}]
Field guide:
goal: + now: - REQUIRED, shown in statuslinedone_this_session: - What was accomplished with file referencesdecisions: - Important choices and rationalefindings: - Key learningsworked: / failed: - What to repeat vs avoidnext: - Action items for next sessionsession_goal, objective, focus, current, etc. The statusline parser looks for EXACTLYgoal: and now: - nothing else works.IMPORTANT: Before responding to the user, you MUST ask about the session outcome.
Use the AskUserQuestion tool with these exact options:
Question: "How did this session go?"
Options:
- SUCCEEDED: Task completed successfully
- PARTIAL_PLUS: Mostly done, minor issues remain
- PARTIAL_MINUS: Some progress, major issues remain
- FAILED: Task abandoned or blocked
After the user responds, index and mark the outcome:
# Mark the most recent handoff (works with PostgreSQL or SQLite)
# Use git root to find project, then opc/scripts/core/
PROJECT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo "${CLAUDE_PROJECT_DIR:-.}")
# First, index the handoff into the database
cd "$PROJECT_ROOT/opc" && uv run python scripts/core/artifact_index.py --file thoughts/shared/handoffs/{session_name}/{filename}.yaml
# Then mark the outcome
cd "$PROJECT_ROOT/opc" && uv run python scripts/core/artifact_mark.py --latest --outcome <USER_CHOICE>
IMPORTANT: Replace {session_name} and {filename} with the actual values from step 1.
These commands auto-detect the database (PostgreSQL if configured, SQLite fallback).
Note: If indexing fails, the marking step will show "Database marking was not available" - this is acceptable for the first handoff but indicates the indexing step was skipped.
After marking the outcome, respond to the user:
Handoff created! Outcome marked as [OUTCOME].
Resume in a new session with:
/resume_handoff path/to/handoff.yaml
##. Additional Notes & Instructions
/path/to/file.ext:line references that an agent can follow later when it's ready, e.g. packages/dashboard/src/app/dashboard/page.tsx:12-24Weekly Installs
213
Repository
GitHub Stars
3.6K
First Seen
Jan 23, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode204
codex203
gemini-cli201
github-copilot198
cursor197
amp193
AI Elements:基于shadcn/ui的AI原生应用组件库,快速构建对话界面
60,400 周安装