/memem-mine
Opt in to memem's event-triggered mining. New sessions are mined automatically via the Stop hook.
Claude Code
$ npx -y skills add TT-Wang/memem --skill memem-mine --agent claude-code
Codex
$ npx skills add TT-Wang/memem --skill memem-mine -a codex -y
Cursor
$ npx skills add TT-Wang/memem --skill memem-mine -a cursor -y
Gemini CLI
$ npx skills add TT-Wang/memem --skill memem-mine -a gemini-cli -y
GitHub Copilot
$ npx skills add TT-Wang/memem --skill memem-mine -a github-copilot -y
OpenCode
$ npx skills add TT-Wang/memem --skill memem-mine -a opencode -y
Windsurf
$ npx skills add TT-Wang/memem --skill memem-mine -a windsurf -y
SKILL.md
memem-mine.SKILL.mdname: memem-mine description: Opt in to memem's event-triggered mining. New sessions are mined automatically via the Stop hook. allowed-tools: [Bash]
Opt in to memem mining. In v2.1.0+ mining is event-triggered: it fires on every Claude Code Stop event when the opt-in marker exists. There is no daemon to start.
1. Create the opt-in marker:
mkdir -p ~/.memem && touch ~/.memem/.miner-opted-in
2. Tell the user:
- Mining is now active — every Stop event spawns a detached `mine_delta` subprocess that extracts memories from new turns since the last invocation
- Hook overhead is ~50ms; the Haiku call runs in background
- Run `/memem-status` to check Stop-hook registration, opt-in marker, and last mine run
- Safety net: SessionStart fires a stale-session sweep for any JSONLs > 10 min old not yet in `~/.memem/.mined_sessions` (catches sessions where Stop never fired)
- To opt out: `rm ~/.memem/.miner-opted-in` (no daemon to stop — the hook just no-ops)
For backfilling pre-existing sessions, use `/memem-mine-history`.
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.
Other skills on memem.
More skills from other plugins.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
ask-matt
Ask which skill or flow fits your situation. A router over the skills in this repo.
Questions about memem-mine.
- Which coding agents can use memem-mine?
- memem-mine 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.

