how-it-works
GitHub解释 claude-mem 的工作原理,包括观察压缩、会话间记忆注入机制及本地数据存储位置。用于回答用户关于该工具功能、触发时机和数据隐私的疑问。
Trigger Scenarios
Install
npx skills add thedotmack/claude-mem --skill how-it-works -g -y
SKILL.md
Frontmatter
{
"name": "how-it-works",
"description": "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?\"."
}
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.
Version History
-
7d03554
Current 2026-09-28 15:44
修复非交互式安装时的提供商默认值与登录流程,优化 OAuth 轮询超时配置及遥测事件记录。
- e2d1df5 2026-08-20 14:17


