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.
npx agentmods add skills/mem0ai/mem0/statsnpx skills add mem0ai/mem0 --skill statsgit clone --depth 1 https://github.com/mem0ai/mem0What 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 | $0.00043 | $0.01191 |
| Opus 5 | $0.00022 | $0.00596 |
| Sonnet 5 | $0.00009 | $0.00238 |
| Haiku 4.5 | $0.00004 | $0.00119 |
Grade A, and why
stats 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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 131 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Mem0 Stats
Show session and lifetime memory statistics.
Execution
Step 1: Gather session stats
Run the session stats reporter:
SCRIPT_DIR="${CLAUDE_PLUGIN_ROOT:-${CODEX_PLUGIN_ROOT:-${CURSOR_PLUGIN_ROOT:-}}}/scripts"
python3 "$SCRIPT_DIR/session_stats.py" peek 2>/dev/null || echo "{}"
The peek command returns JSON without clearing the stats file (unlike report).
If the script returns empty or errors, note "No session data available" and continue.
Step 2: Fetch lifetime and session stats from API
Lifetime stats:
Call get_memories to fetch all memories for this project:
filters={"AND": [{"user_id": "<active_user_id>"}, {"app_id": "<active_project_id>"}]}, page_size=100
Group by:
categories[0](platform-assigned) — primary groupingmetadata.type(agent-assigned) — secondary if no categoriescreated_atdate — for age analysis
Category normalization: Merge auto_capture and uncategorized into a single uncategorized row. These are memories where the platform didn't assign a meaningful content category. Do NOT show auto_capture as its own row in the table.
Session stats (local only):
Session stats come from the local stats file read in Step 1. Do NOT query the API with
run_id or metadata.session_id filters — these return unreliable results because
memories are stored without run_id and metadata filters on session_id are inconsistent.
The local stats file tracks adds and searches for the current session accurately.
Also run a search_memories MCP tool call with query="project", filters={"AND": [{"user_id": "<active_user_id>"}, {"app_id": "<active_project_id>"}]}, top_k=1 to measure round-trip latency. Note the time before and after the MCP call — do NOT attempt raw HTTP calls to the API.
Step 3: Display
Print a minimal dashboard. No ASCII bar charts — use a clean table layout:
## mem0 stats
**Session** (<session_id, first 12 chars>) — 3 written, 5 searches, categories: decision, convention
**Project: my-project** — 55 memories, API: 84ms
| Category | Count |
|----------------------|-------|
| decision | 24 |
| convention | 15 |
| anti_pattern | 6 |
| task_learning | 5 |
| user_preference | 3 |
| session_state | 2 |
**Age** — oldest: 2026-02-15, newest: 2026-05-23
< 7 days: 5 · 7–30d: 12 · 30–90d: 10 · > 90d: 8
**Identity** — user: kartik · project: my-project · branch: main
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.
- 3d ago First seen · 131 lines · 43 tokens per session scan A de987418433f
stats is a skill published in the GitHub repository mem0ai/mem0 (64,535 stars, last pushed today), licensed Apache-2.0. It adds 43 tokens to every session and 1,191 once invoked, about $0.0002 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.
Other skills, from other repositories
dcf-model
Build discounted cash flow valuation workbooks in Excel.
openhands
Delegate coding to OpenHands CLI (model-agnostic, LiteLLM).
pixel-art
Pixel art w/ era palettes (NES, Game Boy, PICO-8).
mcporter
List, auth, and call MCP servers/tools from the terminal.
security-review
Complete a security review of the pending changes on the current branch.
one-three-one-rule
1-3-1 decision briefs: problem, three options, one pick.