Skip to content
Development
Skill

/memem

Show memem status for returning users, or the full welcome for brand-new users. Use when the user wants to check memem or learn about it.

From plugin
memem
326 skills4 hooks

Claude Code

$ npx -y skills add TT-Wang/memem --skill memem --agent claude-code

SKILL.md

memem.SKILL.md
name: memem
description: Show memem status for returning users, or the full welcome for brand-new users. Use when the user wants to check memem or learn about it.
allowed-tools: [Bash, Read]

Show memem's current state. Follow these steps in order.

**Step 1 — Detect user type.** Run these commands:

[ -f ~/.memem/last-error.md ] && echo "HAS_ERROR" || echo "NO_ERROR"
[ -f ~/.memem/.welcome-shown ] && echo "WELCOME_SHOWN" || echo "WELCOME_NEW"
[ -f ~/.memem/.migrated_from_cortex ] && echo "LEGACY" || echo "NO_LEGACY"
find ~/obsidian-brain/memem/memories -maxdepth 1 -name "*.md" -type f 2>/dev/null | wc -l | tr -d ' '

Read the four outputs. The user is **brand new** only if ALL of these are true:

  • `NO_ERROR`
  • `WELCOME_NEW`
  • `NO_LEGACY`
  • Memory count is `0`

Otherwise the user is **returning** (even with 0 memories — if they migrated from cortex or dismissed the welcome, they're not brand new).

**Step 2 — If there is a bootstrap error, show it first** regardless of user type. Run `cat ~/.memem/last-error.md` and display the output under a heading like `### ⚠️ memem bootstrap failed`. Then continue to the appropriate branch.

---

Branch A — Brand new user

Show the full welcome:

**A1. Print the banner:**

  ███╗   ███╗███████╗███╗   ███╗███████╗███╗   ███╗
  ████╗ ████║██╔════╝████╗ ████║██╔════╝████╗ ████║
  ██╔████╔██║█████╗  ██╔████╔██║█████╗  ██╔████╔██║
  ██║╚██╔╝██║██╔══╝  ██║╚██╔╝██║██╔══╝  ██║╚██╔╝██║
  ██║ ╚═╝ ██║███████╗██║ ╚═╝ ██║███████╗██║ ╚═╝ ██║
  ╚═╝     ╚═╝╚══════╝╚═╝     ╚═╝╚══════╝╚═╝     ╚═╝
  persistent memory for Claude Code

**A2. Write the one-sentence pitch:** > memem gives Claude Code persistent memory across sessions. It extracts durable lessons (decisions, conventions, bug fixes, preferences) from your completed sessions into markdown files, then surfaces the relevant ones at the start of each new session.

**A3. Show the two mining options prominently:**

Check the past session count first:

find ~/.claude/projects/ -name "*.jsonl" ! -path "*/subagents/*" -size +5k 2>/dev/null | wc -l | tr -d ' '

Then show:

> ### 🟡 memem is installed — choose how to start > > memem won't mine anything until you start it. Two options: > > - **Mine only new sessions going forward.** Every completed Claude Code session will be extracted into durable memories from now on. No API cost for past history. > - Say **"start mining new sessions"** — or type `/memem-mine` > > - **Mine everything, including your past [N] Claude Code sessions.** Extracts memories from your full history plus all new sessions going forward. Uses Claude Haiku API credits; large histories may take up to an hour. > - Say **"start mining everything including history"** — or type `/memem-mine-history` > > Replace `[N]` with the session count. If the count is 0, drop the second option entirely. > > If the user sounds unsure, recommend the first option as the default.

**A4. Tail:**

> **Optional:** Memories are plain markdown at `~/obsidian-brain/memem/memories/`. Open that folder as an Obsidian vault for graph view. memem works identically without Obsidian. > > Commands: `/memem-status`, `/memem-doctor`, `/memem-mine`, `/memem-mine-history`

If useful, add one final plain-English line:

> If you just want the safe default, start with `/memem-mine`.

**A5. Mark welcome as shown so future `/memem` invocations use the compact view:**

mkdir -p ~/.memem && touch ~/.memem/.welcome-shown

---

Branch B — Returning user

Show only current state. No pedagogy, no ASCII art, no tutorials.

**B1. Run the status command:**

PYTHONPATH="${CLAUDE_PLUGIN_ROOT}" python3 -m memem.server --status

Display the output in a code block.

**B2. Check the miner state:**

[ -f ~/.memem/.miner-opted-in ] && echo "OPTED_IN" || echo "NOT_OPTED_IN"
pgrep -f "memem.server --mine-all" > /dev/null && echo "MINING_HISTORY" || echo "NOT_MINING_HISTORY"

Then show a single one-line state summary matching what the signals show:

  • If `OPTED_IN` + `MINING_HISTORY`: "⚙️ memem active — backfilling past history in the background. New sessions are mined automatically on each Stop event."
  • If `OPTED_IN` + `NOT_MINING_HISTORY`: "✅ memem active — event-triggered mining enabled, new sessions extracted on each Stop event."
  • If `NOT_OPTED_IN`: "🟡 memem has N memories but mining is opted out. Type `/memem-mine` to enable, or `/memem-welcome` to re-read the intro."

**B3. Tail (always, for returning users):**

> Commands: `/memem-status`, `/memem-doctor`, `/memem-mine`, `/memem-mine-history`, `/memem-welcome` (re-show intro)

**Do NOT** print the ASCII banner, "how memem works" explainer, Obsidian note, MCP tool list, or mining-option walkthrough. Returning users don't need them.

Read more
@tt-wang
Ships withmemem

Persistent, self-evolving memory for Claude Code. Stop re-explaining your project every session. The Glama badge URL below intentionally uses the legacy cortex-plugin slug.

Stars on GitHub

Momentum

stars in total
32
Star history of TT-Wang/memem on GitHub, a chart by star-history.com

Other skills on memem.

memem-doctor

memem-doctor

Run a preflight health check on memem — Python version, mcp dep, claude CLI, vault writability, capabilities. Use when the user…

@tt-wang@tt-wangInstall Skill
memem-mine

memem-mine

Opt in to memem's event-triggered mining. New sessions are mined automatically via the Stop hook.

@tt-wang@tt-wangInstall Skill
memem-status

memem-status

Show detailed memem memory system status — memory count, projects, search DB, miner health.

@tt-wang@tt-wangInstall Skill
memem-welcome

memem-welcome

Re-show the full memem welcome screen regardless of whether the user has seen it before. Use when the user wants to see the…

@tt-wang@tt-wangInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills12d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc13d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about memem.

Which coding agents can use memem?
memem installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.