Skip to content
Development
Command

/mem

Use when: querying past work, managing memories, or checking project history

From plugin
claude-mem-lite
688 skills8 commands7 hooks1 MCP
> /plugin marketplace add sdsrss/claude-mem-lite
> /plugin install claude-mem-lite@sdsrss

Command definition

mem.md
name: mem
description: "Use when: querying past work, managing memories, or checking project history"

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 `node "${CLAUDE_PLUGIN_ROOT}/cli.mjs" maintain scan` via Bash and report the pending purge and stale counts to the user. Then run the purge command below without `--confirm` first: it prints how many rows it would delete and deletes nothing. If that count is 0, tell the user nothing is old enough to purge yet and stop. Otherwise report that count, not the scan's pending count, which includes rows too recent to purge. Ask for confirmation, and if confirmed run `node "${CLAUDE_PLUGIN_ROOT}/cli.mjs" maintain execute --ops purge_stale --confirm` via Bash. **`--confirm` is required and is not optional politeness:** without it the command prints a dry-run PREVIEW and deletes nothing, while still succeeding — so you would report a cleanup that never happened.
  • `/mem cleanup Nd` (e.g. `60d`) → same as above but add `--retain-days N` to both purge runs to only purge items older than N days. **`--retain-days` must be between 7 and 365**; the CLI rejects anything outside that range, so `/mem cleanup 3d` cannot be honoured — say so rather than silently substituting the default.
  • `/mem cleanup keep Nd` (e.g. `keep 14d`) → same as above with `--retain-days N`, same 7–365 range.
  • `/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.

Read more
@sdsrss
Ships withclaude-mem-lite

claude-mem-lite is a persistent memory (also called long-term memory or cross-session context) system for Claude Code — Anthropic's CLI coding agent.

Stars on GitHub

Momentum

stars in total
68
Star history of sdsrss/claude-mem-lite on GitHub, a chart by star-history.com

Other commands on claude-mem-lite.

adopt

adopt

Command

Use when: user asks to put the claude-mem-lite steering block into the current project's CLAUDE.md (for example to share it with…

@sdsrss@sdsrssInstall Command
bug

bug

Command

Use when: logging a known bug + repro steps you can't fix right now. Writes a searchable observation (findable via mem_search +…

@sdsrss@sdsrssInstall Command
lesson

lesson

Command

Use when: capturing a non-obvious lesson/gotcha/workaround after a tricky fix or surprising behavior. Writes a searchable…

@sdsrss@sdsrssInstall Command
memory

memory

Command

Use when: user asks to remember something, after solving a non-obvious problem, or to capture key session findings

@sdsrss@sdsrssInstall Command
unadopt

unadopt

Command

Use when: user wants to remove the claude-mem-lite steering block from the current project (or from every project Claude Code…

@sdsrss@sdsrssInstall Command

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command