session-handoff by softaworks/agent-toolkit
npx skills add https://github.com/softaworks/agent-toolkit --skill session-handoff创建全面的交接文档,使新的 AI 代理能够无缝地继续工作,且无任何歧义。解决了长期存在的代理上下文耗尽问题。
确定适用哪种模式:
创建交接? 用户希望保存当前状态、暂停工作,或者上下文即将填满。
从交接恢复? 用户希望继续之前的工作、加载上下文,或提及现有的交接文档。
主动建议? 在完成大量工作(5 次以上文件编辑、复杂调试、重大决策)后,建议:
"我们已经取得了重大进展。考虑创建一个交接文档,以便为未来的会话保留此上下文。准备好时说 '创建交接'。"
运行智能脚手架脚本以创建预填充的交接文档:
python scripts/create_handoff.py [task-slug]
示例:python scripts/create_handoff.py implementing-user-auth
对于连续性交接(链接到先前工作):
python scripts/create_handoff.py "auth-part-2" --continues-from 2024-01-15-auth.md
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
该脚本将:
.claude/handoffs/ 目录打开生成的文件并填写所有 [TODO: ...] 部分。优先处理以下部分:
使用 references/handoff-template.md 中的模板结构作为指导。
运行验证脚本以检查完整性和安全性:
python scripts/validate_handoff.py <handoff-file>
验证器检查:
[TODO: ...] 占位符如果检测到机密或评分低于 70,请不要最终确定交接。
向用户报告:
列出当前项目中的交接:
python scripts/list_handoffs.py
这将显示所有带有日期、标题和完成状态的交接。
在加载之前,检查交接文档的新旧程度:
python scripts/check_staleness.py <handoff-file>
陈旧性级别:
该脚本检查:
在采取任何行动之前,完整阅读相关的交接文档。
如果交接是链的一部分(有 "Continues from" 链接),也请阅读链接的先前交接以获取完整上下文。
遵循 references/resume-checklist.md 中的检查清单:
从交接文档的 "立即执行的后续步骤" 中的第 1 项开始。
在您工作时参考以下部分:
在您工作时:
--continues-from 创建一个新的交接以将它们链接起来对于长期运行的项目,将交接链接在一起以保持上下文沿袭:
handoff-1.md (初始工作)
↓
handoff-2.md --continues-from handoff-1.md
↓
handoff-3.md --continues-from handoff-2.md
链中的每个交接:
当从链中恢复时,首先阅读最新的交接,然后根据需要参考前身。
交接存储在:.claude/handoffs/
命名约定:YYYY-MM-DD-HHMMSS-[slug].md
示例:2024-01-15-143022-implementing-auth.md
| 脚本 | 用途 |
|---|---|
create_handoff.py [slug] [--continues-from <file>] | 使用智能脚手架生成新交接 |
list_handoffs.py [path] | 列出项目中的可用交接 |
validate_handoff.py <file> | 检查完整性、质量和安全性 |
check_staleness.py <file> | 评估交接上下文是否仍然是最新的 |
每周安装量
572
代码仓库
GitHub 星标数
1.2K
首次出现
2026 年 1 月 20 日
安全审计
安装于
gemini-cli417
cursor417
codex416
claude-code416
opencode400
cline398
Creates comprehensive handoff documents that enable fresh AI agents to seamlessly continue work with zero ambiguity. Solves the long-running agent context exhaustion problem.
Determine which mode applies:
Creating a handoff? User wants to save current state, pause work, or context is getting full.
Resuming from a handoff? User wants to continue previous work, load context, or mentions an existing handoff.
Proactive suggestion? After substantial work (5+ file edits, complex debugging, major decisions), suggest:
"We've made significant progress. Consider creating a handoff document to preserve this context for future sessions. Say 'create handoff' when ready."
Run the smart scaffold script to create a pre-filled handoff document:
python scripts/create_handoff.py [task-slug]
Example: python scripts/create_handoff.py implementing-user-auth
For continuation handoffs (linking to previous work):
python scripts/create_handoff.py "auth-part-2" --continues-from 2024-01-15-auth.md
The script will:
.claude/handoffs/ directory if neededOpen the generated file and fill in all [TODO: ...] sections. Prioritize these sections:
Use the template structure in references/handoff-template.md for guidance.
Run the validation script to check completeness and security:
python scripts/validate_handoff.py <handoff-file>
The validator checks:
[TODO: ...] placeholders remainingDo not finalize a handoff with secrets detected or score below 70.
Report to user:
List handoffs in the current project:
python scripts/list_handoffs.py
This shows all handoffs with dates, titles, and completion status.
Before loading, check how current the handoff is:
python scripts/check_staleness.py <handoff-file>
Staleness levels:
The script checks:
Read the relevant handoff document completely before taking any action.
If handoff is part of a chain (has "Continues from" link), also read the linked previous handoff for full context.
Follow the checklist in references/resume-checklist.md:
Start with "Immediate Next Steps" item #1 from the handoff document.
Reference these sections as you work:
As you work:
--continues-from to chain themFor long-running projects, chain handoffs together to maintain context lineage:
handoff-1.md (initial work)
↓
handoff-2.md --continues-from handoff-1.md
↓
handoff-3.md --continues-from handoff-2.md
Each handoff in the chain:
When resuming from a chain, read the most recent handoff first, then reference predecessors as needed.
Handoffs are stored in: .claude/handoffs/
Naming convention: YYYY-MM-DD-HHMMSS-[slug].md
Example: 2024-01-15-143022-implementing-auth.md
| Script | Purpose |
|---|---|
create_handoff.py [slug] [--continues-from <file>] | Generate new handoff with smart scaffolding |
list_handoffs.py [path] | List available handoffs in a project |
validate_handoff.py <file> | Check completeness, quality, and security |
check_staleness.py <file> | Assess if handoff context is still current |
Weekly Installs
572
Repository
GitHub Stars
1.2K
First Seen
Jan 20, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
gemini-cli417
cursor417
codex416
claude-code416
opencode400
cline398
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
136,300 周安装
OpenAPI 转 TypeScript 工具 - 自动生成 API 接口与类型守卫
563 周安装
数据库模式设计器 - 内置最佳实践,自动生成生产级SQL/NoSQL数据库架构
564 周安装
Rust Unsafe代码检查器 - 安全使用Unsafe Rust的完整指南与最佳实践
564 周安装
.NET并发编程模式指南:async/await、Channels、Akka.NET选择决策树
565 周安装
韩语语法检查器 - 基于国立国语院标准的拼写、空格、语法、标点错误检测与纠正
565 周安装
技能安全扫描器 - 检测Claude技能安全漏洞,防范提示注入与恶意代码
565 周安装