how-it-works
Explains how a memory tool works. It helps you understand how information is collected and where it is stored.
What it does
This AI agent notes down what you do (reads, edits, commands) and summarizes it at the end of your session. It uses these notes to give you context the next time you work on the same project, so you don't have to explain everything again.
When to use it
- ✓When you start a new project and want the AI to remember what you did before.
- ✓When you want the AI to understand your work history without having to repeat everything.
- ✓To avoid having to explain code or past decisions every time you return to a task.
Example of what to ask your AI
“How does Claude work?”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
It records your actions as 'observations'. At the end, it summarizes these observations. The next time you use it, it inserts important notes into your prompts for the AI, so it starts with context.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add thedotmack/claude-mem --skill how-it-worksOr download just the file:
curl -L https://raw.githubusercontent.com/thedotmack/claude-mem/main/plugin/skills/how-it-works/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
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.
FAQ
When does the AI start remembering my work?
From your second work session on the same project. The first time, it 'seeds' the memory. In subsequent sessions, it brings the learned context.
Where are these notes stored?
All information is stored on your computer, in the ~/.claude-mem folder.
Does my data leave my computer?
No. Only the notes are sent to the AI you configured for summarization. Nothing else leaves your computer.
Details
Original description by the author
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?".
repo: thedotmack/claude-mem
Popularity
- GitHub stars
- 101k
- Ranking position
- #812
- License
- Apache-2.0
- Updated
- 10/16/2026
Comments
- …
More skills from this repository
Agent Cost Report
Has your agent generate detailed cost reports for its activities. Shows how much was spent on tokens and services.
thedotmack/claude-mem
claude-mem-install
Helps your agent set up Claude-Mem in different environments. Allows choosing between local or remote workers and configuring observation.
thedotmack/claude-mem
mem-search
Lets your agent search past memories. Useful for recalling previous solutions or work from old sessions.
thedotmack/claude-mem
host-observer
Helps your agent respond to Claude-Mem observer tasks. It should only reply with 'skip_summary' or a full XML observation.
thedotmack/claude-mem
Similar skills
dashboard-builder
Helps your agent create useful monitoring dashboards. It turns data into charts that answer important system questions.
affaan-m/ECC
dev-team
Simulates a collaborative development team where different roles respond to a problem together. It's useful for getting multiple perspectives without manually switching agents.
affaan-m/ECC
ecc-council
Has your agent convene a four-voice council for difficult decisions. It's useful when there are multiple good options and debate is needed before choosing.
affaan-m/ECC