Skip to content
Development
Command

/adopt

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 the team), or to (re)install it there. Writes a sentinel-wrapped managed block into <cwd>/CLAUDE.md plus a <cwd>/.claude/plugin_claude_mem_lite.md

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

adopt.md
name: adopt
description: "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 the team), or to (re)install it there. Writes a sentinel-wrapped managed block into <cwd>/CLAUDE.md plus a <cwd>/.claude/plugin_claude_mem_lite.md detail doc, removes the auto-written local copy (CLAUDE.local.md or .claude/rules/claude-mem-lite.md) when run at the repository root, and migrates away any legacy memory-dir sentinel. Auto-adopt never adds the block to CLAUDE.md itself; it only keeps an existing one in sync. Run /unadopt to remove."

/adopt

Install the claude-mem-lite **steering block** into the current project's `CLAUDE.md` (the canonical home for project instructions — Claude Code loads it into every session, in a message after the system prompt). It does not go in the project's memory-dir `MEMORY.md`: that index belongs to the user's own memories.

Auto-adopt does not add the block to `CLAUDE.md`: in a git repository it keeps the same block in `CLAUDE.local.md` at the repository root, excluded from git through `.git/info/exclude`. Where Claude Code already loads the current block from a `CLAUDE.md` or `CLAUDE.local.md` above the repository root (outside git, above the session's directory; in a `claude --worktree` session, the main checkout's `CLAUDE.local.md`), no local copy is written and nothing is added, unless your user or project settings set `claudeMdExcludes`. Otherwise, next to an `AGENTS.md` that file would switch off, and where it cannot be written (outside git, for example), it adds the text to each session's context instead; with `CLAUDE_MEM_RULES_STEERING=1` it keeps the block in `.claude/rules/claude-mem-lite.md` next to an `AGENTS.md`, excluded the same way. Run `/adopt` when you want the block in `CLAUDE.md` — a file that is normally committed, so your team gets it too. Run at the repository root, it removes the local copy so the text does not load twice. While auto-adopt is on, a session started in the directory whose `CLAUDE.md` carries the block refreshes it when the shipped template changes and, where that file holds nothing but the block, adds the `AGENTS.md` import described below.

What it writes

1. **`<cwd>/CLAUDE.md`** — a concise `<!-- claude-mem-lite:begin v1 -->…<!-- :end -->` managed block (trigger table → `mem_recall` / `mem_save` / `mem_defer`). Slug-scoped: only this block, and the import below in a file adopt created, are managed; the rest of your `CLAUDE.md` is preserved verbatim. Auto-refreshes when the shipped content drifts. Claude Code stops reading `AGENTS.md` once a `CLAUDE.md` exists, so a `CLAUDE.md` adopt creates next to an `AGENTS.md` (or `.claude/AGENTS.md`) starts with a marker comment and `@AGENTS.md`, which keeps it loading. An `AGENTS.md` above the directory or tracked below it cannot be imported; the output names it with the setting that keeps it. 2. **`<cwd>/.claude/plugin_claude_mem_lite.md`** — the full contract (tool tables, CLI cheatsheet, citation/decay + save discipline). First line is a `<!-- managed-by: claude-mem-lite -->` marker. Not auto-loaded; the CLAUDE.md block points to it and Claude reads it on demand. 3. **`<cwd>/.claude/.plugin_claude_mem_lite_state.json`** — drift-tracking sidecar.

It also **migrates** this project's legacy memory-dir sentinel away (strips the `claude-mem-lite:*` block from `MEMORY.md` and deletes the old memory-dir detail doc). Other plugins' blocks (e.g. `code-graph-mcp:*`) and your own prose survive.

Flags

  • `--force` — also force-clean a legacy memory-dir block lacking a state sidecar
  • `--dry-run` — print intended writes without touching disk
  • `--all` — legacy-cleanup sweep: strip the old memory-dir sentinel across **every**

project at once. (It does NOT write CLAUDE.md blocks for other projects — their real paths can't be recovered from the encoded memdir slug; those adopt per-project on each one's next SessionStart.)

  • `--status` — show this project's adoption + count of memdirs awaiting migration
  • `--disable` / `--enable` — per-project opt-out of automatic SessionStart adopt

(`--enable` also lets the plugin write a removed local block again; beside an `AGENTS.md` that `CLAUDE.local.md` would switch off, only with `CLAUDE_MEM_RULES_STEERING=1`)

Removal & opt-out

  • `/unadopt` removes the CLAUDE.md block + `.claude/` detail doc (your prose stays),

and the local block. The next session writes a local file if the plugin never created one in this repository; one it created before is not written back (the text is injected instead) until `node "${CLAUDE_PLUGIN_ROOT}/cli.mjs" adopt --enable`. Beside an `AGENTS.md` that `CLAUDE.local.md` would switch off, no file is written unless `CLAUDE_MEM_RULES_STEERING=1`.

  • `node "${CLAUDE_PLUGIN_ROOT}/cli.mjs" adopt --disable` permanently stops auto-adopt for this project

(also for sessions started in its subdirectories) and removes the local block; a `CLAUDE.md` block stays until `/unadopt`.

  • `MEM_NO_AUTO_ADOPT=1` disables auto-adopt globally; blocks already written stay.
  • `CLAUDE_MEM_NO_TEMPLATE_REFRESH=1` freezes the block against drift-refresh

(keeps your hand-edits to the managed block).

Conservative layer still active

Adoption does NOT remove the hook-based injection (SessionStart context, UserPromptSubmit related-memory). Those remain as fallback. Post-adopt the MCP `WHEN TO USE` section + the `File Lessons` / `Key Context` sections auto-trim, since the CLAUDE.md block already carries the triggers.

Restart caveat for the MCP-instructions trim

The CLAUDE.md block + hook-layer trim apply on the **next SessionStart**. The MCP server builds its instructions once at boot, so the MCP-instructions trim (`WHEN TO USE` / `Decision rules`) only takes effect after Claude Code restarts (or re-attaches the mem-lite MCP server). A `/exit` + fresh session is enough. Same caveat applies in reverse for `/unad

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.

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
mem

mem

Command

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

@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