H

how-it-works

by @thedotmackv
4.4(120)

The claude-mem skill explains how it captures AI agent activities through compressed observations and automatically injects relevant memories into subsequent sessions to provide context. This allows the AI to remember project details and decisions, avoiding repetitive codebase explanations or rediscovering information, significantly enhancing development efficiency and coherence.

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

Before / After Comparison

1 组
Before

Without memory management, an AI agent starting a new session or task repeatedly needs to understand project context, codebase structure, and previous decisions, leading to significant time wasted on repetitive context preparation and information retrieval.

After

With claude-mem's memory injection, the AI agent automatically receives relevant historical context, eliminating the need for repetitive explanations or rediscovery of information, significantly reducing context preparation time and improving development efficiency and task coherence.

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.

User Reviews (0)

Write a Review

Effect
Usability
Docs
Compatibility

No reviews yet

Statistics

Installs5.7K
Rating4.4 / 5.0
Version
Updated2026年11月21日
Comparisons1

User Rating

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

Rate this Skill

0.0

Compatible Platforms

🤖claude-code

Timeline

Created2026年5月28日
Last Updated2026年11月21日
🎁 Agent Knowledge Cards
Survey