Skip to content
Skill

Compound memory

Lets your agent recall your past decisions and preferences from earlier sessions

Compound memory is an open-source agent skill for knowledge and memory. It is available on Claude Code and Codex.

Scripts
None
Platforms
Claude Code, Codex
GitHub stars
348
Last commit
License
MIT
Listing updated

Similar skills

About Compound memory

Compound memory is a long-term memory layer for the user across Claude Code and Codex sessions. A nightly process distills past AI session logs into a memory profile, and a short snapshot is injected at the start of each session. This skill teaches the agent to search that memory by topic before asking the user to repeat themselves, and to treat the results as background rather than instructions, preferring the newest dated memory when entries conflict.

The skill also covers setup. When the user explicitly asks for it, the agent explains that the tool reads local session logs, calls a model once per new session each night (the local claude CLI by default), and adds a session-start injection and a cron job that can be removed with a single uninstall command. Installation is done from a stable git clone, and a dry-run option previews distillation cost without calling a model.

The skill expects a shell with git and bash, the cm command-line tool, and local Claude Code or Codex session logs to draw from.

When your agent uses it

Long-term memory about the user across Claude Code and Codex sessions. Use when the user refers to something from an earlier conversation ("like we discussed", "my usual setup", "what did I decide about X"), when you need their past preferences or decisions before acting, or when they ask to set up persistent memory across sessions or machines.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (2 KB) on GitHub on 1 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the compound-memory plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add Protocol-zero-0/compound-memory
/plugin install compound-memory@compound-memory

Or copy only this skill to ~/.claude/skills/compound-memory:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Protocol-zero-0/compound-memory.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/compound-memory &&
cp -R "$tmp/skills/compound-memory" ~/.claude/skills/compound-memory &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/compound-memory inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/compound-memory to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Protocol-zero-0/compound-memory.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/compound-memory &&
cp -R "$tmp/skills/compound-memory" ~/.agents/skills/compound-memory &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/compound-memory inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/compound-memory to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Protocol-zero-0/compound-memory.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/compound-memory &&
cp -R "$tmp/skills/compound-memory" ~/.cursor/skills/compound-memory &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/compound-memory inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/Protocol-zero-0/compound-memory.git --path skills/compound-memory

Or copy the folder to ~/.gemini/skills/compound-memory yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/compound-memory:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Protocol-zero-0/compound-memory.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/compound-memory &&
cp -R "$tmp/skills/compound-memory" ~/.copilot/skills/compound-memory &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/compound-memory inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/Protocol-zero-0/compound-memory.git

Then copy compound-memory/skills/compound-memory into your agent's skills folder as compound-memory. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Topic memory search
Queries the distilled memory by topic, with options for more results or including overturned memories.
Session snapshot
Prints the short memory snapshot that is injected at the start of each session.
Health check
Verifies whether the memory tool is installed and working before searching.
Guided installation
Walks through a git-based install with a name preference and a first test distillation.
Reversible setup
Backs up the session-start hook and cron job it adds, and removes them on uninstall.
Cost preview
Offers a dry-run mode that estimates distillation work without calling a model.

Good for

  • Recall a deployment checklist I settled on last month
  • Check what I previously decided about pricing before drafting a proposal
  • Look up my usual project setup before starting a new repo
  • Set up persistent memory across my Claude Code and Codex sessions
  • Find out whether an older plan was later overturned

Compound memory FAQ

What does Compound memory need to work?

It needs the cm command-line tool installed. If it is missing, the skill can guide a git clone and install, and it reads local Claude Code or Codex session logs as its input.

Does Compound memory send my session logs anywhere?

The skill states that it calls a model once per new session each night, by default the local claude CLI using Opus. Session logs are the only input it reads.

How do I remove Compound memory?

Running cm uninstall removes exactly what the installer added, such as the session-start injection and the nightly cron job.

When does the agent use Compound memory?

When the user refers to earlier conversations, when past preferences or decisions are needed before acting, or when they ask for persistent memory across sessions or machines.

How do I install Compound memory in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/compound-memory to use it in all your projects, or to .claude/skills/compound-memory in one project. Or install the compound-memory plugin, which includes it: /plugin marketplace add Protocol-zero-0/compound-memory, then /plugin install compound-memory@compound-memory.

Does Compound memory run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Compound memory?

Claude Code and Codex. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Compound memory?

The closest alternatives to Compound memory are Claude mem, Recap, Memory sync, Memory review and Learn.

Where this comes from

  • Description: from the skill's own SKILL.md.