memem-mine

memem-mine is a skill for Claude Code from TT-Wang/memem. It costs 26 tokens per session (272 once invoked), scanned A, original, MIT.

An opt-in memory-mining feature for memem that extracts memories from Claude Code sessions when a session ends.

In plain words
What is it for?
Enabling or disabling automatic session mining, checking its status, and processing older sessions separately.
Why use it?
It records useful information from new sessions automatically, without requiring a separate background service.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Claude Code.

Part of the memem plugin — 6 skills, 4 hooks, 1 MCP server shipped together

Good fit Enabling or disabling automatic session mining, checking its status, and processing older…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tt-wang/memem/memem-mine
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add TT-Wang/memem --skill memem-mine
Clone the repo
git clone --depth 1 https://github.com/TT-Wang/memem

Made for: Claude Code.

Or install memem, the plugin that ships this one along with the rest of its 6 skills, 4 hooks, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for memem-mine

README.md
[![agentmods](https://agentmods.dev/badge/skills/tt-wang/memem/memem-mine.svg)](https://agentmods.dev/skills/tt-wang/memem/memem-mine)
Your own site
<a href="https://agentmods.dev/skills/tt-wang/memem/memem-mine"><img src="https://agentmods.dev/badge/skills/tt-wang/memem/memem-mine.svg" alt="Measured on agentmods" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 272 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00026 $0.00272
Opus 5 $0.00013 $0.00136
Sonnet 5 $0.00005 $0.00054
Haiku 4.5 $0.00003 $0.00027

Measured 7d ago against content hash fa88cb77ec90, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

memem-mine scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/memem-mine/SKILL.md · 22 lines

What it actually says

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
  1. 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.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 22 lines · 26 tokens per session scan A fa88cb77ec90

Subscribe to this mod's changes

memem-mine is a skill published in the GitHub repository TT-Wang/memem (32 stars, last pushed 5d ago), licensed MIT. It adds 26 tokens to every session and 272 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.