memem-doctor
Run a preflight health check on memem — Python version, mcp dep, claude CLI, vault writability, capabilities. Use when the user reports memem misbehaving, has…
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.
$ npx -y skills add TT-Wang/memem --skill memem --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/mememContext preview
The summary Claude sees to decide when to auto-load this skill.
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.
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:
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.
---
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
---
Show only current state. No pedagogy, no ASCII art, no tutorials.
**B1. Run the status command:**
PYTHONPATH="${CLAUDE_PLUGIN_ROOT}" python3 -m memem.server --statusDisplay 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:
**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.
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.
Run a preflight health check on memem — Python version, mcp dep, claude CLI, vault writability, capabilities. Use when the user reports memem misbehaving, has…
Mine ALL existing Claude Code sessions, including history from before memem was installed.
Opt in to memem's event-triggered mining. New sessions are mined automatically via the Stop hook.
Show detailed memem memory system status — memory count, projects, search DB, miner health.
Re-show the full memem welcome screen regardless of whether the user has seen it before. Use when the user wants to see the intro, tutorial, or welcome again.