mem0

mem0 is a skill for Claude Code from IvanWng97/dotfiles. It costs 50 tokens per session (688 once invoked), scanned A, original, MIT.

A guide for storing and retrieving shared project memory through the mem0 service. It explains how to keep personal and repository-specific facts separated.

In plain words
What is it for?
Use it when adding, searching, or reading shared memories with mem0-mcp.
Why use it?
It prevents different coding tools from losing context or mixing memories from unrelated repositories.

Skill for Claude Code

Written for Claude Code: SessionStart hook event. Also seen: mentions CLAUDE.md; mentions AGENTS.md; mentions Codex.

Good fit Use it when adding, searching, or reading shared memories with mem0-mcp.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ivanwng97/dotfiles/mem0
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 IvanWng97/dotfiles --skill mem0
Clone the repo
git clone --depth 1 https://github.com/IvanWng97/dotfiles

Made for: Claude Code.

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 mem0

README.md
[![agentmods](https://agentmods.dev/badge/skills/ivanwng97/dotfiles/mem0/github.svg)](https://agentmods.dev/skills/ivanwng97/dotfiles/mem0)
Your own site
<a href="https://agentmods.dev/skills/ivanwng97/dotfiles/mem0"><img src="https://agentmods.dev/badge/skills/ivanwng97/dotfiles/mem0/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.

agentmods 80×15 button for mem0

Your own site · 80×15
<a href="https://agentmods.dev/skills/ivanwng97/dotfiles/mem0"><img src="https://agentmods.dev/badge/skills/ivanwng97/dotfiles/mem0.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 688 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.00050 $0.00688
Opus 5.5 $0.00020 $0.00275
Sonnet 5.5 $0.00010 $0.00138
Haiku 4.5 $0.00005 $0.00069

Measured yesterday against content hash 792728ca2070, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mem0 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 yesterday.

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.

home/dot_claude/skills/mem0/SKILL.md · 20 lines

What it actually says

mem0

  • Shared cross-tool memory lives in the mem0 MCP server mem0-mcp (hosted, https://mcp.mem0.ai/mcp), shared by Claude, Codex, and openclaw. Free tier = 1 project, so partition logically with metadata — never by separate projects.
  • Identity: always pass user_id: "ivanwng97" on every call (add_memory/search_memories/get_memories); the hosted endpoint has no pinned default. Never set agent_id (fragments scope, breaks reads) and never AND two entity IDs — e.g. AND(user_id, app_id) returns empty due to null-default mismatch.
  • Repo scoping lives in metadata, not entity IDs. Every write carries metadata.scope:
    • cross-repo profile fact → metadata={"scope":"global"}
    • repo-specific fact (architecture, bug root-cause, runbook, local convention) → metadata={"scope":"repo","repo":"<repo-name>"}
  • Reads must AND the metadata — a bare user_id filter mixes global + every repo together. Metadata keys MUST be nested under a metadata clause; a bare top-level {"repo":…}/{"scope":…} ERRORS (only user_id/agent_id/app_id/run_id/metadata/categories/timestamps are valid top-level filter keys — verified vs the live hosted API 2026-06-30):
    • repo: filters={"AND":[{"user_id":"ivanwng97"},{"metadata":{"repo":"<repo-name>"}}]}
    • profile: filters={"AND":[{"user_id":"ivanwng97"},{"metadata":{"scope":"global"}}]}
  • Free-tier budget: ~1,000 searches/mo (~33/day) is the binding limit; 10,000 writes/mo. Guard searches, not writes. ≤1 search_memories per session (top_k=3, default threshold, no rerank); reuse it. Use get_memories(filters=...) (list op) for "everything in scope". The SessionStart hook already loads the global profile.
  • Write: batch durable facts into one add_memory with infer=true (extracts atomic memories + MD5-dedups). Store only durable signal — preferences, decisions, env, corrections — never secrets, scratch output, or speculation. No per-turn chatter; writes are model-judged (no auto Stop-hook). Don't mix infer=true/false for the same fact (double-stores).
  • Verify a write for free via get_event_status(event_id); never re-search to confirm.
  • A repo's own metadata.repo tag is declared in that repo's agent guide (AGENTS.md, or CLAUDE.md where the repo has one; one line).
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. yesterday First seen · 20 lines · 50 tokens per session scan A 792728ca2070

Subscribe to this mod's changes

mem0 is a skill published in the GitHub repository IvanWng97/dotfiles (94 stars, last pushed 2d ago), licensed MIT. It adds 50 tokens to every session and 688 once invoked, about $0.0002 per session on Opus 5.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-12-03.

Related

mem0 compared with skills from other repositories

mem0 next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mem0IvanWng97/dotfilesSkill942d agoMITA50Claude Code
save-pipeline-memorymagic3007/dotfilesSkill112d agoMITA154Claude Code, Codex
save-memoryaiya000/dotfilesSkill211mo agoMITA34Claude Code
sync-memoryaiya000/dotfilesSkill211mo agoMITA92Claude Code
apply-to-agents-md-git-rootaiya000/dotfilesSkill211mo agoMITA77Claude Code
decline-handoff-suggestionaiya000/dotfilesSkill211mo agoMITA61Claude Code
apply-to-claude-md-home-rootaiya000/dotfilesSkill211mo agoMITA66Claude Code