Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By TheVoskampsv0.1.0GPL-3.0In 1 marketplace
Captures every Write or Edit into agent memory or auto memory with a PostToolUse hook, one YAML record per call under ${XDG_STATE_HOME:-~/.local/state}/memory-tools/<host>/<owner>/<repo>/, and grades what it captured for a checkout with the read-only /memory-tools:memory-grade skill: delete, durable, or no code home, each with its evidence or its destination.
Claude loads one when your task matches it, or you run it by name.
1 caution to review before installing
A hook runs when Claude writes or edits files
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Keeps a copy of every memory Claude Code writes, outside any repository, and grades those copies on request without changing anything.
Memory is written where it is easy to lose and hard to review:
isolation: worktree writes its .claude/agent-memory/ inside
a throwaway worktree. Unless something carries the entry out before
the worktree is removed, it is gone.CLAUDE.md acts on its own judgment,
and its edits reach a branch without a review round.The plugin separates the two halves. A hook records each memory write the moment it happens, so no agent has to remember a copy step and no entry depends on a session ending cleanly. A skill reads the records and reports what each memory is worth; acting on the report is yours.
jq and git on PATH. Without jq the hook records nothing and
says nothing.origin remote. Records are filed by the
repository they belong to, and a write with no origin to file it
under is not recorded.cc-tools plugin, which is installed and enabled with this one.The hook, memory-capture.sh, runs after every Write and Edit call
and records the call when the file it wrote lies in a memory directory.
<config> is CLAUDE_CONFIG_DIR when that is set and not empty, and
~/.claude otherwise:
| Kind | Directory | Whose memory |
|---|---|---|
agent-user | <config>/agent-memory/<agent>/ | An agent declaring memory: user |
auto | <config>/projects/<project>/memory/, or your autoMemoryDirectory | The main session's auto memory |
agent-local | <dir>/.claude/agent-memory-local/<agent>/ | An agent declaring memory: local |
agent-project | <dir>/.claude/agent-memory/<agent>/ | An agent declaring memory: project |
A path is matched against the kinds in that order and takes the first
that fits, so a file under ~/.claude/agent-memory/ is agent-user
although it also has the agent-project shape.
autoMemoryDirectory is read from .claude/settings.local.json and
.claude/settings.json in the session's working directory, then from
<config>/settings.json. The first file that sets it wins, and a
leading ~ is expanded. A value set only through --settings or a
policy file is not seen, so auto memory redirected that way is not
captured.
A call is not recorded when:
origin remote can be read, or its URL does not reduce to a host,
an owner and a repository made of letters, digits, ., _ and -.The hook only observes. It prints nothing, never blocks or alters a tool call, and exits 0 whatever it is given, so a failure to record costs that one record and nothing else.
Each recorded call is one YAML file:
${XDG_STATE_HOME:-$HOME/.local/state}/memory-tools/<host>/<owner>/<repo>/<captured-at>-<tool-use-id>.yml
<host>/<owner>/<repo> comes from the origin URL: of the directory
holding the memory file for the agent-project and agent-local
kinds, and of the session's working directory for the other two.
Records are therefore filed by repository and not by checkout, and a
memory written in a worktree outlives it. <captured-at> is the UTC
capture time as YYYYMMDDTHHMMSSZ, so a directory listing is in
capture order.
A record holds these keys, in this order:
kind: agent-project
source-path: /abs/path/to/the/memory/file
tool: Write
session-id: "0b1c2d3e"
branch: issue-12-some-branch
captured-at: "2026-11-26T05:14:25Z"
content: "the file's whole text after the call"
branch is the branch checked out in the memory file's directory,
and is empty when there is none.content is the whole file after the call, not the change: what a
Write was given, and the file read back from disk after an Edit.
It is always a double-quoted scalar with JSON string escapes, so a
YAML parser reads back exactly what was captured, whatever its
whitespace, line endings or control characters.Every write is a record of its own, so a memory edited five times has five records and its history can be read off them. Nothing prunes the directory. Records hold your memories verbatim; delete the files yourself when you no longer want them.
/memory-tools:memory-grade [<checkout-path>]
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub thevoskamps/claude-plugins-marketplace --plugin memory-toolsPlugins from other owners that cover similar ground