360 Secure SkillHub
360 安全技能中心

how-it-works

该 Skill 是一份说明文档,用于解释 claude-mem 的工作方式:Claude 的每次 Read、Edit 和 Bash 都会生成压缩观察,会话结束时进行摘要,相关记忆会在后续会话中自动注入。记忆注入从项目第二个会话开始,数据保存在本机 ~/.claude-mem 目录下。它不安装或配置任何工具。

thedotmack
热度 0.00
最近更新 2026-10-18 22:45:36
分类:知识依赖:纯提示词应用场景:概念解释 / 笔记整理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add thedotmack/claude-mem/how-it-works
Metadata
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.