Skip to content
Agent Memory
Skill

/how-it-works

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

From plugin
claude-mem
116k34 skills1 command2 MCP

Claude Code

$ npx -y skills add thedotmack/claude-mem --skill how-it-works --agent claude-code

SKILL.md

how-it-works.SKILL.md
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

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`.
Read more
@thedotmack
Ships withclaude-mem

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

116k34 skills2 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
115.5k
Star history of thedotmack/claude-mem on GitHub, a chart by star-history.com

Other skills on claude-mem.

community-sweep

community-sweep

Land community pull requests as the contributor and answer community issues on thedotmack/claude-mem. Takes stock of every open…

agent-cost-report

agent-cost-report

Believable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude…

install

install

Use this when setting up claude-mem on Cursor: local or remote worker, local host-login observer or remote cmem.ai inference.

mem-search

mem-search

Use this when the user asks to search memory, "did we already solve this?", "how did we do X last time?", or wants work from…

host-observer

host-observer

Use this when fulfilling claude-mem observer jobs on Grok Bot: reply only skip_summary or one full observation XML, never prose.

mem-setup

mem-setup

This skill should be used when the user asks to "set up claude-mem", "pair claude-mem", "connect cmem", "add my cmem key", "set…

More skills from other plugins.

bot-handoff

bot-handoff

Keep a durable record of work passed between Bots in the shared Hindsight memory bank. Use when handing work to another Bot, when…

@vectorize-io@vectorize-ioInstall Skill
mempalace

mempalace

Install, configure, and operate MemPalace, including a private local palace, a shared-brain hub, or a client joining an existing…

mempalace13d60k
@mempalace@mempalaceInstall Skill
mempalace

mempalace

Install, configure, and operate MemPalace, including a private local palace, a shared-brain hub, or a client joining an existing…

mempalace13d60k
@milla-jovovich@milla-jovovichInstall Skill

Questions about how-it-works.

Which coding agents can use how-it-works?
how-it-works installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.