mem

mem is a command for coding agents from sdsrss/claude-mem-lite. It costs 16 tokens per session (590 once invoked), scanned A, original, MIT.

A group of commands for searching and managing a project's saved memory and history. It can find notes, show recent observations, trace a file's history, and remove old entries.

In plain words
What is it for?
Use it to search project memories, review recent findings, inspect what was recorded about a file, browse a timeline, save notes, view memory statistics, or clean up stale records.
Why use it?
It reduces the need to repeat earlier investigation and helps recover context from past work.

Command

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the claude-mem-lite plugin — 8 commands, 7 hooks, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/sdsrss/claude-mem-lite/mem
Clone the repo
git clone --depth 1 https://github.com/sdsrss/claude-mem-lite

Or install claude-mem-lite, the plugin that ships this one along with the rest of its 8 commands, 7 hooks, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mem

README.md
[![agentmods](https://agentmods.dev/badge/commands/sdsrss/claude-mem-lite/mem.svg)](https://agentmods.dev/commands/sdsrss/claude-mem-lite/mem)
Your own site
<a href="https://agentmods.dev/commands/sdsrss/claude-mem-lite/mem"><img src="https://agentmods.dev/badge/commands/sdsrss/claude-mem-lite/mem.svg" alt="Measured on agentmods" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 590 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00016 $0.00590
Opus 5 $0.00008 $0.00295
Sonnet 5 $0.00003 $0.00118
Haiku 4.5 $0.00002 $0.00059

Measured 5d ago against content hash 07adcf705b38, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mem scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/mem.md · 39 lines

What it actually says

Memory

Search and browse your project memory efficiently.

Quick Commands

  • /mem search <query> — Search all memories (FTS5 full-text search)
  • /mem recent [n] — Show recent N observations (default 5)
  • /mem recall <file> — History for a file before editing
  • /mem timeline <id> — Browse timeline around an observation
  • /mem save <text> — Save a manual memory/note
  • /mem stats — Show memory statistics
  • /mem cleanup — Scan and interactively purge stale data
  • /mem cleanup [N]d — Purge stale data older than N days (e.g. cleanup 60d)
  • /mem cleanup keep [N]d — Purge stale data but retain last N days (e.g. cleanup keep 14d)

Instructions

When the user invokes /mem, parse their intent:

  • /mem search <query> → run node ${CLAUDE_PLUGIN_ROOT}/cli.mjs search <query> via Bash
  • /mem recent or /mem recent 20 → run node ${CLAUDE_PLUGIN_ROOT}/cli.mjs recent [N] via Bash
  • /mem recall <file> → run node ${CLAUDE_PLUGIN_ROOT}/cli.mjs recall <file> via Bash
  • /mem timeline <id> → run node ${CLAUDE_PLUGIN_ROOT}/cli.mjs timeline --anchor <id> via Bash
  • /mem save <text> → call mem_save MCP tool with the text as content
  • /mem stats → run node ${CLAUDE_PLUGIN_ROOT}/cli.mjs stats via Bash
  • /mem get <ids> → run node ${CLAUDE_PLUGIN_ROOT}/cli.mjs get <ids> via Bash
  • /mem cleanup → run mem_maintain(action="scan"), report pending purge count and stale items to user, ask for confirmation, then run mem_maintain(action="execute", operations=["purge_stale"]) if confirmed
  • /mem cleanup Nd (e.g. 60d) → same as above but use retain_days=N to only purge items older than N days
  • /mem cleanup keep Nd (e.g. keep 14d) → same as above with retain_days=N
  • /mem <query> (no subcommand) → treat as search, run node ${CLAUDE_PLUGIN_ROOT}/cli.mjs search <query> via Bash

Use Bash commands first. For detailed data, use node ${CLAUDE_PLUGIN_ROOT}/cli.mjs get <id> via Bash.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 39 lines · 16 tokens per session scan A 07adcf705b38

Subscribe to this mod's changes

mem is a command published in the GitHub repository sdsrss/claude-mem-lite (56 stars, last pushed yesterday), licensed MIT. It adds 16 tokens to every session and 590 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.