Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add TT-Wang/memem/plugin install mememWrote 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.
[](https://agentmods.dev/skills/tt-wang/memem/memem-mine-history)<a href="https://agentmods.dev/skills/tt-wang/memem/memem-mine-history"><img src="https://agentmods.dev/badge/skills/tt-wang/memem/memem-mine-history/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/tt-wang/memem/memem-mine-history"><img src="https://agentmods.dev/badge/skills/tt-wang/memem/memem-mine-history.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00022 | $0.00379 |
| Opus 5 | $0.00011 | $0.00189 |
| Sonnet 5 | $0.00004 | $0.00076 |
| Haiku 4.5 | $0.00002 | $0.00038 |
Grade B, and why
memem-mine-history scanned grade B with 1 finding 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 12d 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
find ~/.claude/projects/ -name "*.jsonl" ! -path "*/subagents/*" -size +5k | wc -l What it actually says
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.
- Show how many sessions exist:
find ~/.claude/projects/ -name "*.jsonl" ! -path "*/subagents/*" -size +5k | wc -l
-
Tell the user approximately how long it will take (~3-5 seconds per session, plus Haiku API costs).
-
Confirm with the user before starting — this can take hours for large histories and makes many Haiku API calls.
-
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 $!)"
- 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_deltato 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-statusto check progress and Stop-hook registration - To opt out:
rm ~/.memem/.miner-opted-in(no daemon to stop)
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.
- 12d ago First seen · 32 lines · 22 tokens per session scan B 09549d3bcd2c
memem-mine-history is a skill published in the GitHub repository TT-Wang/memem (32 stars, last pushed 10d ago), licensed MIT. It adds 22 tokens to every session and 379 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
skills
Your next session starts cold. No memory of what you built, what broke, what you decided. Every memory you write is a gift to that future session. The richer the memory, the less time re-learning.
stats
Show Captain Memo's corpus statistics (chunks per channel, observation counts, indexing progress, embedder info). Use when the user types /captain-memo:stats.
observations
List recent captured session observations (the Haiku-summarized voyage logs). Use when the user wants to see what Captain Memo has logged from past sessions.
captain-memo
Persistent cross-session, cross-tool memory for this project via captain-memo. Use at the START of any non-trivial task to recall prior context, decisions, conventions, and past bugs/fixes, and whenever you'd ask "have we done / decided / hit this before?". Searches a shared local memory corpus (past session…
forget
Delete a Wenlan memory by exact id from Codex. Destructive and confirmation gated. Invoked as /forget .
team-memory-protocol
A shared-memory process for teams of coding agents working on the same build. It stores project knowledge, shared context, and task progress in separate files or repositories.