Skip to content
Development
Skill

/memem-mine-history

Mine ALL existing Claude Code sessions, including history from before memem was installed.

From plugin
memem
326 skills4 hooks

Claude Code

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

SKILL.md

memem-mine-history.SKILL.md
name: memem-mine-history
description: Mine ALL existing Claude Code sessions, including history from before memem was installed.
allowed-tools: [Bash]

Mine all historical Claude Code sessions for knowledge. By default the Stop hook only handles new sessions; this command backfills existing JSONL transcripts. It also opts you in to event-triggered mining for future sessions.

1. Show how many sessions exist:

find ~/.claude/projects/ -name "*.jsonl" ! -path "*/subagents/*" -size +5k | wc -l

2. Tell the user approximately how long it will take (~3-5 seconds per session, plus Haiku API costs).

3. Confirm with the user before starting — this can take hours for large histories and makes many Haiku API calls.

4. Record the opt-in and start history backfill in the background:

mkdir -p ~/.memem && touch ~/.memem/.miner-opted-in
nohup PYTHONPATH="${CLAUDE_PLUGIN_ROOT}" python3 -m memem.server --mine-all > ~/.memem/mine-all.log 2>&1 &
echo "History mining started in background (PID $!)"

5. Tell the user:

  • History mining is running in the background (log at `~/.memem/mine-all.log`)
  • Future sessions will also be mined automatically — every Claude Code Stop event spawns `mine_delta` to extract new turns
  • They can continue working normally
  • New memories appear as they're extracted (Haiku-extracted, written to `~/obsidian-brain/memem/memories/`)
  • Run `/memem-status` to check progress and Stop-hook registration
  • To opt out: `rm ~/.memem/.miner-opted-in` (no daemon to stop)
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
memem

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…

@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,…

ecc2w293k
@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…

react3d252k
@facebook@facebookInstall Skill

Questions about memem-mine-history.

Which coding agents can use memem-mine-history?
memem-mine-history 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.