H

how-it-works

by @thedotmackv
4.4(120)

claude-mem 技能解释了其如何通过压缩观察来捕获 AI 代理的活动,并在后续会话中自动注入相关记忆,从而提供上下文。这使得 AI 能够记住项目细节和决策,避免重复解释代码库或重新发现信息,显著提升开发效率和连贯性。

ai-agent-memorycontext-managementknowledge-retrievalllm-workflowdeveloper-toolsGitHub
安装方式
npx skills add https://github.com/thedotmack/claude-mem --skill how-it-works
compare_arrows

Before / After 效果对比

1 组
使用前

在没有记忆管理的情况下,每次AI代理启动新会话或处理新任务时,都需要重新理解项目背景、代码库结构和之前的决策,导致大量时间浪费在重复的上下文准备和信息检索上。

使用后

通过claude-mem的记忆注入功能,AI代理能够自动获取相关历史上下文,无需重复解释或重新发现信息,显著减少了上下文准备时间,提高了开发效率和任务连贯性。

SKILL.md

How claude-mem works

What it does

While you work, an observer (a second agent) watches what your agent reads, edits and runs, and writes short notes about what mattered. Those notes are called observations. When a session ends, the observer writes a summary. When the next session starts, your agent gets a compact index of the observations that matter for this project and fetches full details only when it needs them.

So the next session starts where the last one left off: 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 seeds memory as you work. To front-load a whole repo in one pass instead, run /learn-codebase (~5 minutes on a typical repo, optional).

Where data lives

Your memory lives in ~/.claude-mem on this machine: the SQLite database, vector index, logs and settings. npx claude-mem uninstall removes it.

What leaves the machine:

  • What the observer reads goes to the model you chose to run it: your Claude plan unless you picked another provider (Codex, OpenRouter, Gemini, or the claude-mem observer on CMEM Pro).
  • During install, cmem.ai gets only your email and optional note if you share them when the installer asks (it's optional and asked once), and a numbers-only usage summary (observation counts and token totals; no prompts, paths, or project names) when setup creates a sign-in link. Nothing else goes to cmem.ai unless you sign in and turn on something that uses it (cloud sync, CMEM Pro's hosted observer, a provider that runs through your cmem.ai account) or choose to upload your prompts during browser setup.
  • Anonymous usage analytics (telemetry) are on by default. Turn them off with npx claude-mem telemetry disable, or set DO_NOT_TRACK=1.

用户评价 (0)

发表评价

效果
易用性
文档
兼容性

暂无评价

统计数据

安装量5.7K
评分4.4 / 5.0
版本
更新日期2026年11月21日
对比案例1 组

用户评分

4.4(120)
5
37%
4
43%
3
13%
2
5%
1
2%

为此 Skill 评分

0.0

兼容平台

🤖claude-code

时间线

创建2026年5月28日
最后更新2026年11月21日
🎁 Agent 知识卡片
调研问卷