# how-it-works

> Claude/Codex skill by [@thedotmack](https://omgskills.com/library/thedotmack/index.md) · 104k stars · Updated 2026-10-29

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?".

Tags: ai, ai-agents, ai-memory, anthropic, artificial-intelligence, chromadb, claude, claude-agent-sdk, claude-agents, claude-code, claude-code-plugin, claude-skills, embeddings, long-term-memory, mem0, memory-engine, openmemory, rag, sqlite, supermemory

## Install

```sh
git clone https://github.com/thedotmack/claude-mem /tmp/claude-mem && ln -s /tmp/claude-mem/plugin/skills/how-it-works ~/.claude/skills/how-it-works
```

## From README

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.

## Links

- HTML page: https://omgskills.com/library/thedotmack/claude-mem/plugin/skills/how-it-works/
- GitHub: https://github.com/thedotmack/claude-mem
- Author: [@thedotmack](https://omgskills.com/library/thedotmack/index.md)

## More from this repo

- [do](https://omgskills.com/library/thedotmack/claude-mem/plugin/skills/do/index.md) — Execute a phased implementation plan using subagents.
   - [@thedotmack](https://omgskills.com/library/thedotmack/index.md) · 117k stars
- [cloud-sync](https://omgskills.com/library/thedotmack/claude-mem/plugin/skills/cloud-sync/index.md) — Set up or check claude-mem cloud sync with cmem.ai Pro.
   - [@thedotmack](https://omgskills.com/library/thedotmack/index.md) · 104k stars
- [make-plan](https://omgskills.com/library/thedotmack/claude-mem/make-plan/index.md) — Used to create a detailed, phased implementation plan with documentation discovery.
   - [@thedotmack](https://omgskills.com/library/thedotmack/index.md) · 104k stars
