memory-save
Reviewed
at commit 0e4c0dd
New version, not yet reviewed
Caution: Saves notes Claude writes about each conversation, which can include secrets, under ~/.cli-tweaks/memory outside your project, where they stay.
Loads MEMORY.md into the session and saves project learnings to it after every turn through a tool-less fork in the background, without blocking the stop.
0 upvotes
Log in to upvote or save- Made by
- Kerem Gok
- Pinned commit
-
0e4c0dd09165cae2933d79eda6069c6df477137f - What we checked
-
After each turn that had a prompt or a tool call, it asks Claude in a background request on your own account (this uses tokens) what the project should remember, and writes the answer to MEMORY.md and topic files under ~/.cli-tweaks/memory/<project>, outside your project. At session start it adds that file to Claude's context. No network calls other than Claude.
Review details
Static review of the source at the pinned commit; not run. Registers session.start, classic.SessionStart, prompt.submit (reads only the origin kind), tool.call (sets a flag only), turn.complete and uses $.model.fork with a prompt that holds the current MEMORY.md; the fork sees the whole conversation and has no tools. Runtime calls: $.process.run git rev-parse (project name, 3 s timeout), $.env.get('HOME'), $.fs.exists/read/write/list in ~/.cli-tweaks/memory/<project>, $.sidebar.set/clear, $.ui.status/log, $.clock. The project name must match [A-Za-z0-9._-]+ and topic file names must match a lowercase name ending in .md without slashes, so writes stay inside the memory directory. The reply must be parseable JSON with add/remove/replace ops; caps of 200 lines and 50,000 characters apply; removed CRITICAL RULES bullets are copied to history.md. An existing MEMORY.md that lacks the four sections is rewritten into them after a backup (MEMORY.pre-migration.md). An unreadable reply is kept in memory-save.failed-reply.txt. Memory text is the model's summary of the conversation and can contain anything the conversation did, including secrets, and it is stored in the home directory and re-injected at every session start, resume, /clear and compaction, together with a fixed instruction to answer in the user's language. The prompt wording and the name 'classic hooks' show it was written around the author's own setup, but it does not need any outside file. npm dependencies: dev only.
- What it uses
-
- Reads your prompts: yes
- Sees tool calls: no
- Blocks or changes tool calls: no
- Reads or writes files: yes
- Runs programs on your machine: yes
- Calls the model (uses tokens): yes
- Sends data over the network: no
- Stores data: yes
- Shows something on screen: yes
Made this mod? Add a badge to your README
Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.
[](https://modsforclaude.com/mods/memory-save/)