ai-memory-retrieval
它能做什么
该技能查找你的项目在记忆知识库中已经记录的内容。适合希望智能体在设计或修改之前检查过去决定的人。
适用场景
- ✓当你询问项目中关于某个话题以前做过什么决定的时候。
- ✓当你希望从记忆中获取近期活动摘要或状态简报的时候。
- ✓当你在设计、调试或修改之前需要阅读某个完整记忆页面的时候。
技能链接
https://github.com/akitaonrails/ai-memory/blob/main/crates/ai-memory-core/src/routing_skills/ai-memory-retrieval/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我们关于数据库迁移方案做过什么决定?请在你提出任何建议之前先检查项目记忆。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会搜索项目的知识库,列出最近更新的页面,并在需要时阅读完整页面。这些查找只读,不会改变任何记忆。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
ai-memory retrieval
Use this skill for read-only ai-memory lookups, catch-up, and evaluating remembered project knowledge before you design, debug, or edit.
Tools in this cluster
memory_querysearches the current project's wiki for prior decisions, gotchas, procedures, rules, and session notes.memory_recentlists the most recently updated pages when the user wants a light activity check.memory_read_pagefetches a full page body after a search hit or direct path lookup. Aglobal_scope_hitsresult carries itsworkspace,project, andscope; passscope: "global"to read that reserved scope directly. The body is capped bymax_chars(default 12000, max 64000); the response'struncated/total_charsfields report whether it was cut and its full size. Raisemax_charsonly when you need the whole page. Passinclude_related: true(optionalrelated_depth, default 1, hard cap 3) to also walk the link graph outward and return arelatedarray of reachable pages, each with its hopdepthand edgedirection(link/backlink); default off omits it.memory_read_session_observationsreads one session's raw hook observations (prompts, tool calls, stops) in capture order, paged and body-capped, when the user asks what actually happened in a session or wants to check a compiled page against its evidence. It also continues a session that was cut off without ending: pass thesession_ida session-start notice,recent_sessionsornewer_unended_sessionnames (a harness's native id, such as an OpenCodeses_…id, works too) withorder: "desc", and its newest prompts and tool results are where the work stopped.memory_statusreports whether ai-memory is healthy and how large the knowledge base is.memory_briefingreturns a structured read-only snapshot for agent consumption, including a boundedpinnedlist of the project's pinned standing-context pages (present only when the project has pins) andrecent_sessions, the sessions with the newest captured work. An entry there withended: falseandhanded_off: falsethat is notcurrentwas cut off or is still running; read it before an older handoff or page when the user asks to continue.memory_explorereturns a prose digest when the user asks for an open-ended catch-up.
Project scope
Choose scope from the MCP client's identity support:
- Session-aware MCP clients that forward the real lifecycle-hook session id on every request should use automatic current-project routing. Omit
workspace,project, andcwdfor the current repository; pass explicit scope only when the user names a different project. - Static MCP clients (including clients with lifecycle hooks but no bridge connecting that hook session id to MCP requests) must pass
workspaceandprojecttogether on every project-scoped call, including requests about this project, here, or our work. Read the exact names from the nearest.ai-memory.tomlwhen it declares both. Without a marker override, derive the project from normalizedupstream, thenorigin, using the full repository path without its host (github.com/acme/api→acme-api); use the folder basename only when no valid remote exists. Never rely on the server's last active project.
This rule applies only to project-scoped calls. For cross-project retrieval, global=true must omit workspace, project, and scopes. For a standing preference written with scope: "global", omit workspace and project.
Choose the smallest useful lookup
- Use the search tool when the user asks whether something was discussed, before proposing architecture, or before non-trivial coding in a subsystem with possible prior decisions.
- Before non-trivial coding, debugging, deployment, release, auth, scope, migration, PR review, or data-preservation work, search memory for the subsystem and task type first. If the first search is thin, broaden or query more specific subsystem/error terms before designing a fix.
- Use the recent-pages tool for a quick what changed lately view.
- Use the status tool only for health and size questions.
- Use the structured briefing when code needs counts, windows, pending-handoff counts, current rules, or recent pages as JSON-like data.
- Use the prose exploration tool for broad catch-up questions like what is important right now or I have been away.
- Use the session observations tool when the question is about what
常见问题
搜索会改变我的记忆吗?
不会。检索是只读的。
它能读取原始的会话活动吗?
可以。当你想查看发生了什么时,它可以读取某次会话中记录的提示词和工具调用。
它也搜索其他范围吗?
会。来自其他范围的结果会显示其工作区、项目和范围,让你看清每条结果的来源。
详情
作者的原始描述
Use this skill for any request whose goal is read-only retrieval from ai-memory: project history, prior context, decisions, rules, gotchas, recent activity, full wiki pages, or status/briefing. Trigger by semantic intent rather than exact wording, including when ai-memory is not named.
repo: akitaonrails/ai-memory
热度
- GitHub 星标
- 15k
- 排名
- #11041
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
ai-memory-durable-pages
15k当你要求记住某些持久的内容时,帮你的智能体在 ai-memory 知识库中保存、更新或删除永久的项目笔记。
ai-memory-handoff
15k帮你的智能体把上下文传递给下一次会话,让你可以从上次停下的地方继续、保存收尾笔记,或取消一次误发的交接。
ai-memory-learning-maintenance
15k帮你的智能体整理记忆知识库:把会话笔记转化为主题页面,检查矛盾之处,并在你要求时清理过时的条目。
ai-memory-messaging
15k帮你的智能体向另一个项目的收件箱发送一条自成一体的请求,检查你项目的收件箱,或取消你已发送的消息。