跳到正文
Skillpedia
智能体30k · #9348

handoff

它能做什么

这项技能恢复你当前项目文件夹中最近一次的智能体会话。它会从任何未回答的问题开始,并建议下一步。

适用场景

  • ✓当你说“我们做到哪了”或想从上次停下的地方继续时。
  • ✓当你开始一次会话,而对项目没有最新的背景信息时。
  • ✓当你想从同一文件夹中的上一次会话恢复工作时。

技能链接

https://github.com/rohitg00/agentmemory/blob/main/plugin/skills/handoff/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/rohitg00/agentmemory/blob/main/plugin/skills/handoff/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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

  1. Resolve the project path: if $ARGUMENTS is given, normalize it to absolute (path.resolve(process.cwd(), $ARGUMENTS)); else use the cwd.
  2. Call memory_sessions with the exact project identifier when known, and agentId when requested. Otherwise follow nextCursor until the matching directory is found or pagination ends. Preserve filters between pages. Pick the most recent session whose normalized cwd matches by directory boundary: equality, OR cwd.startsWith(projectPath + sep), OR projectPath.startsWith(cwd + sep). Prefer completed over abandoned. No match: report that this project has no matching session and stop. Do not substitute a different project's session.
  3. If the session ended on an unanswered user-facing question, surface it FIRST. Look in summary or recent conversation observations whose narrative ends in ?.
  4. Summarize: title/summary, key files, key decisions or errors, using memory_recall on 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.
  5. 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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能