how-it-works
它能做什么
这个 AI 代理会记录你的操作(读取、编辑、执行命令),并在会话结束时进行总结。下次你在同一个项目上工作时,它会利用这些记录为你提供上下文,这样你就不必把所有内容再解释一遍。
适用场景
- ✓当你开始一个新项目,希望 AI 记住你之前做过的事情时。
- ✓当你希望 AI 了解你的工作历史,而不必每次重复说明时。
- ✓为了避免每次回到某个任务时,都要重新解释代码或之前的决定。
技能链接
https://github.com/thedotmack/claude-mem/blob/main/plugin/skills/how-it-works/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“Claude 是怎么工作的?”
每周 5 个新技能,1 分钟读完。
工作原理
它会把你的操作记录为‘观察记录’。会话结束时,它会对这些观察记录做总结。下次使用时,它会把重要的笔记插入到发给 AI 的提示词中,让 AI 一开始就带着上下文开始工作。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
How claude-mem works
What it does
Every Read, Edit, and Bash that Claude makes turns into a compressed observation. Observations get summarized at session end. Relevant ones get auto-injected into future prompts so the next session starts with context from the last one — no re-explaining the codebase, no re-discovering decisions.
When it kicks in
Memory injection starts on your second session in a project.
The first session in a fresh project seeds memory; subsequent sessions receive auto-injected context for relevant past work. Run /learn-codebase if you want to front-load the entire repo into memory in a single pass (~5 minutes, optional).
Where data lives
Everything stays in ~/.claude-mem on this machine.
Nothing leaves your machine except calls to whichever AI provider you configured for compression (Claude / OpenRouter / Gemini). Local installs contact cmem.ai once, at signup, to create the sign-in link; nothing else is sent to cmem.ai. The SQLite database, vector index, logs, and settings all live under that directory and are removed cleanly on npx claude-mem uninstall.
常见问题
AI 什么时候开始记住我的工作内容?
从你在同一个项目上的第二次工作会话开始。第一次时,它会先‘播下记忆的种子’;之后的会话中,它会带入已经学到的上下文。
这些笔记存放在哪里?
所有信息都保存在你的电脑上,位于 ~/.claude-mem 文件夹中。
我的数据会离开我的电脑吗?
不会。只有笔记会被发送给你配置的用于总结的 AI 模型,其他内容都不会离开你的电脑。
详情
作者的原始描述
Explain how claude-mem captures observations, when memory injection kicks in, and where data lives. Use when the user asks "how does claude-mem work?" or "what is this thing doing?".
repo: thedotmack/claude-mem
热度
- GitHub 星标
- 101k
- 排名
- #1272
- 许可证
- Apache-2.0
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
Agent Cost Report
101k让你的智能体生成其活动的详细成本报告。显示在 token 和服务上花费了多少。
claude-mem-install
101k帮助你的智能体在不同环境中设置 Claude-Mem。你可以选择使用本地或远程工作进程,并配置观察功能。
mem-search
101k让你的智能体搜索过去的记忆。适合回忆之前的解决方案,或旧会话中的工作内容。
host-observer
101k帮助你的智能体响应 Claude-Mem 观察者任务。它只能回复“skip_summary”或完整的 XML 观察记录。