handoff
它能做什么
这项技能恢复你当前项目文件夹中最近一次的智能体会话。它会从任何未回答的问题开始,并建议下一步。
适用场景
- ✓当你说“我们做到哪了”或想从上次停下的地方继续时。
- ✓当你开始一次会话,而对项目没有最新的背景信息时。
- ✓当你想从同一文件夹中的上一次会话恢复工作时。
技能链接
https://github.com/rohitg00/agentmemory/blob/main/plugin/skills/handoff/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我们的认证重构做到哪了?请从这个项目的上一次会话接着做。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会找到与该项目文件夹匹配的最近一次会话,并回忆其关键记忆。它会先说明任何未解决的问题,然后是下一步,并且不会为空白会话编造细节。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
The user wants to resume work. Optional cwd override: $ARGUMENTS
Quick start
memory_sessions { "project": "<current-project-id>", "limit": 20 }
Pick the most recent session whose cwd matches this project, then:
memory_recall { "query": "<session top concepts>", "project": "<current-project-id>", "limit": 10 }.
When an agent is requested, pass the same agentId to both calls.
Expected output:
Resuming 7f3a9c2 "Auth refresh rework".
Open question: should logout revoke all device tokens or just the current one?
Next step: decide revoke scope, then update auth/logout.ts.
Why
Match the session by directory boundary, not raw prefix, so a sibling repo never gets mistaken for this one. Never invent observations for an empty session.
Workflow
- Resolve the project path: if
$ARGUMENTSis given, normalize it to absolute (path.resolve(process.cwd(), $ARGUMENTS)); else use the cwd. - Call
memory_sessionswith the exact project identifier when known, andagentIdwhen requested. Otherwise follownextCursoruntil the matching directory is found or pagination ends. Preserve filters between pages. Pick the most recent session whose normalizedcwdmatches by directory boundary: equality, ORcwd.startsWith(projectPath + sep), ORprojectPath.startsWith(cwd + sep). Prefercompletedoverabandoned. No match: report that this project has no matching session and stop. Do not substitute a different project's session. - If the session ended on an unanswered user-facing question, surface it FIRST.
Look in
summaryor recentconversationobservations whosenarrativeends in?. - Summarize: title/summary, key files, key decisions or errors, using
memory_recallon the top concepts, limit 10, preserving the chosen project and agent scope. Check each result's session or project provenance before including it; a query alone does not enforce scope. - End with one concrete "next step?" pointer.
Anti-patterns
WRONG: session.cwd.startsWith(projectPath) matches /repo-a-staging when the
project is /repo-a, resuming the wrong repo's session.
RIGHT: session.cwd === projectPath || session.cwd.startsWith(projectPath + sep),
a directory-boundary check that cannot cross sibling repos.
Checklist
- cwd override resolved to an absolute, normalized path.
- Match used a directory-boundary check, not a raw prefix.
- Unanswered question (if any) leads the response.
- Empty session is reported plainly, with an offer to start fresh.
See also
recap,session-history,recall: same session data, broader views.
Troubleshooting
See TROUBLESHOOTING.md if memory_sessions or memory_recall is not available.
常见问题
它如何匹配我的项目?
它按文件夹匹配,因此不会把名称相似的其他项目混淆。
如果没有匹配的会话怎么办?
智能体会报告没有找到匹配的会话。
我能指定其他文件夹吗?
能。你可以提供一个文件夹路径,从该路径恢复,而不是使用当前文件夹。
详情
作者的原始描述
Resume the most recent agent session for the current working directory, leading with any unanswered question. Use when the user says "where were we", "resume", "handoff", "pick up where I left off", or starts a session with no fresh context.
repo: rohitg00/agentmemory
热度
- GitHub 星标
- 30k
- 排名
- #9348
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agentmemory-agents
30k帮你的智能体把 agentmemory 记忆服务器连接到 Claude Code、Cursor 和 Codex 等编程工具。
agentmemory-architecture
30k解释 agentmemory 如何为编程智能体存储、搜索和管理记忆,从记录到回忆的整个过程。
agentmemory-config
30k帮你的智能体设置并检查 agentmemory 记忆服务器,包括端口、配置和功能开关。
agentmemory-hooks
30k帮你的智能体自动从编程会话中记录有用的笔记,而不需要你逐条手动保存。