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 pedropaulovcv0.11.8MITIn 1 marketplace
Blocks CRUD on the machine-local auto-memory directory and redirects the agent to the repo's ./memory/ folder so memory is git-tracked and shared across users
You run one by typing its /name in Claude Code.
3 cautions to review before installing
A hook runs when Claude uses the Bash tool
A hook runs when Claude writes or edits files
A command runs shell commands (! syntax) when you invoke it
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.
Documentation · Support · Privacy · Local privacy details
Two hooks that move Claude Code and Codex memory off their machine-local directories (~/.claude/projects/<slug>/memory/ and ~/.codex/memories/) and onto the repository's ./memory/ folder — so accumulated memory is git-tracked and shared across every user, machine, and cloud session:
PreToolUse hook that blocks CRUD on the machine-local directory and redirects the agent to make the exact same change under ./memory/ instead;SessionStart hook that, at the start of every session, tells the agent to use ./memory/ as the auto-memory destination and surfaces the repo's ./memory/MEMORY.md index up front — the leading entries with their full one-line descriptions and the rest as bare titles, budgeted to keep context lean, mirroring how Claude Code normally surfaces the auto-memory MEMORY.md, but from the version-controlled location. When ./memory/usage.jsonl is present, the index is instead sorted by how often each memory has actually been consulted (see below).It also ships a /memory-audit command that audits the store for staleness (see below), and a /record-memory-usage command that tracks which memories get used (see below).
Auto memory lets Claude accumulate learnings across sessions by reading and writing MEMORY.md and topic files. But that directory is machine-local: it isn't tracked in git and isn't shared across users, machines, or cloud sessions. Knowledge Claude saves there is invisible to your teammates and lost on a fresh checkout.
This hook converts every memory operation into a hard block with guidance to perform the identical operation against a committed ./memory/ folder in the repo, turning per-machine notes into version-controlled, shareable project knowledge.
The hook matches the tools the harnesses use to manipulate memory files — Write, Edit, MultiEdit, NotebookEdit, Read, Grep, Glob, ListDir, and Bash — and inspects the target path (there is no dedicated "memory" tool). JSON input is parsed natively, so quoted paths are handled without shell escaping ambiguities. Shell deletes/renames — including PowerShell Remove-Item/Move-Item — are matched path-agnostically. If the path resolves to ~/.claude/projects/<slug>/memory/ or ~/.codex/memories/ (POSIX or Windows backslash form), it returns a deny decision instructing the agent to:
./memory/ with identical content (e.g. ./memory/MEMORY.md, ./memory/debugging.md)./memory/ instead./memory/./memory/MEMORY.md is kept as the index, mirroring the auto-memory layout, so the redirected structure matches what Claude already expects.
At session start (including resume, clear, and compact) the SessionStart hook emits a <system-reminder> instructing the agent to ignore the default auto-memory destination and use <project>/memory instead. When <project>/memory/MEMORY.md exists, its index is appended — the leading entries keep their full line (- [Title](file.md) — description) and, once the description budget is spent, the rest fall back to - Title, so the descriptions are in context from the first turn without a large store bloating it. The reminder points the agent at MEMORY.md to read the complete contents on demand. The project root is taken from $CLAUDE_PROJECT_DIR, falling back to the nearest ancestor containing .git and then the working directory.
If <project>/memory/usage.jsonl exists and is non-empty, the only thing that changes is ordering: the index is sorted descending by usage (how many distinct past sessions actually consulted that memory file — see /record-memory-usage) before the same budgeting runs, so the most-used memories are the ones that land in the full-description slots. Ties (including the common all-zero case before usage.jsonl has meaningful data) keep MEMORY.md's original order.
Either way, if usage.jsonl is missing or its last update was more than a day ago, the reminder also appends a one-line nudge to run /record-memory-usage, so the ranking doesn't silently go stale (there's no automatic trigger for that command). Freshness is judged by the file's mtime, which the command bumps each time it appends.
npx claudepluginhub pedropaulovc/agent-plugins --plugin memory-to-repoPlugins from other owners that cover similar ground
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.