ClaudeCodeMod

All shelves / Mods / Workflow

better-memory

By xobotyi

better-memory is a Claude Code workflow mod by xobotyi.

Refuses the agent's writes to the memory folder except through its own save tool, which needs an anchor from the session, and clears stale entries when idle.

Holds a command

Install

The marketplace name is foundry.

In Claude Code
/plugin install better-memory --marketplace xobotyi/cc-foundry
Open the repo

It runs inside the Claude Code process. The side panel is only what the author's README names. Read the repo before you install, or run claude plugin validate on the plugin folder.

Version
0.0.1
License
MIT
Repo stars
23
Last change
2026-11-07

What it can reach

  • Holds a command
  • Sees tool calls
  • Reaches the network or an outside service
  • Calls another program on this machine

Claude Code 2.1.319 or newer. Two settings, both on by default: Guard auto memory and Sift when idle; change them in /config or with /plugin configure. Sift runs the claude command, so it needs claude on the PATH of your session, and it costs an Opus run per batch of up to twelve entries. A headless claude -p run never sifts; its entries are judged in your next interactive session in the project. A removed entry is deleted, and its report in ~/.claude/projects/<project>/better-memory/ is the only copy of its text, kept as long as Claude Code keeps transcripts. /better-memory:sift runs the same pass by hand, with you in the loop.

The marketplace, foundry, also holds more than twenty other plugins, the-statusline and wall-clock among them. Keeping auto memory to facts that still hold is why this page files it under workflow. memory-fork draws what the memory fork changed above the prompt, and refuses the session's writes into the memory folder. dream-pass tidies Claude's memory folder, merging duplicates and dropping dead entries, and shows the counts in a band with a pane, a backup, and undo. This one shows nothing in normal operation. The agent saves and removes memory only through two tools the plugin adds, and the plugin refuses any other write to the memory directory. The save tool takes each entry with its anchors, your exact words, a file the session read, a page it fetched, or a command it ran, and the plugin confirms each anchor is in the session. Guidance on how to work saved as feedback is refused, and the agent is told to offer you a CLAUDE.md edit instead. When an interactive session goes idle, a separate Claude process called sift judges up to twelve entries and promotes a fact, offers you an instruction as a CLAUDE.md line, or removes the entry. The plugin writes MEMORY.md itself.

Demo

The When the agent writes memory part of the better-memory README: the agent saves and removes memory only through two tools the plugin adds and the plugin refuses any other write to the memory folder; the save tool takes the entry with its anchors from the session, the plugin checks each anchor is really there, and guidance on how to work is not saved as feedback; then when an idle session triggers the sift judge and its three verdicts, promote, propose an instruction and remove.
Screenshot of the author's GitHub page.

What it hooks into

  • session.startWhen a session starts
  • tool.describeA Claude Code eventWriteEdit
  • tool.callAround a tool call, where it can hold one
  • tool.checkA Claude Code eventBash
  • turn.startWhen Claude starts a turn
  • turn.completeWhen a turn ends

Read from the on() calls in its hook modules. Open its source under Files to check what each one does.

Files

The author's README and source, 4 files. They load when you open them.

Facts

Author
xobotyi
Category
Workflow
Marketplace
foundry
Repo
xobotyi/cc-foundry
Folder
plugins/better-memory
Version
0.0.1
License
MIT
Repo stars
23
Last change
2026-11-07
Language
TypeScript
Files
10

Same repo on other shelves

Marketplaces

  1. 759xobotyi/cc-foundryxobotyi/cc-foundry23

Other mods in Workflow

llx-deskrsaryevOpens browser pages and terminals in a window you watch, draws a pane of its tabs, and sends the comments you make in the window to Claude as messages.scrubjay-uihenba1Draws named rows for scrubjay's archive lookups, live sync steps above the prompt, and its /sj commands in blue, for sessions kept on every machine you own.agentworksmanishiitgDraws incoming AgentWorks messages as a short preview with the sending agent's name, the person's name for a shared sender, and the network it came through.coder-workspace-statuscoderDraws the Coder workspace Claude Code runs in above the prompt: health, startup scripts, autostop, repositories, and ports, with a full card from a command.apiariusyusuflkqDraws a live deck of every agent and subagent in the session, in the Desktop side pane, the terminal, or a browser tab, and an agents band above the prompt.feature-devjuanmhidalgoDraws a Features pane beside the transcript with each feature's status and buttons to plan, review, continue, or delete, and a band above the prompt.ai-cli-jobsmoerasermaxDraws a table of ai-cli background jobs above the prompt, with status, source, model, task, and time, and a one-line job count in the hint line below it.clawd-hqvedant-shahDraws a pixel-art office panel of the specialists Claude hands work to in the background: each one's words, model, time, tokens, and progress, and your usage.athosathos-agentDraws a band above the prompt and a trail pane that tick off the steps of your saved ways of working as Claude follows them, with Save and rating buttons.korean-uiKimSuro5773Shows Claude Code's command descriptions and /config entries in Korean, translates other plugins' on request with Haiku, and toasts untranslated text.thryx-tasksogxo-ioDraws a panel beside the chat for your ThryX board: the active sprint or all open tasks in Doing, Review, and Up next, a card per task, and a hint-line summary.chief-of-staffpwsaragossyHolds a commandDraws a Projects pane of each project's status and next action and a Threads pane, and refuses a thread brief that names no specialist.
All 396 in Workflow