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/exportnpx skills add mem0ai/mem0 --skill exportgit 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.00039 | $0.00559 |
| Opus 5 | $0.00019 | $0.00280 |
| Sonnet 5 | $0.00008 | $0.00112 |
| Haiku 4.5 | $0.00004 | $0.00056 |
Grade A, and why
export 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 — 77 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Mem0 Export
Export all memories for the current project to a portable Markdown file.
Execution
Step 1: Resolve identity
Determine the active identity:
user_idfromMEM0_USER_IDenv var, else$USER, else"default"project_id(used asapp_id) fromMEM0_PROJECT_IDenv var, or via the project resolver
Step 2: Fetch all memories
Call get_memories with:
filters={"AND": [{"user_id": "<active_user_id>"}, {"app_id": "<active_project_id>"}]}page_size=200
If the response is paginated (i.e. the result contains a next cursor or the count equals page_size), continue fetching pages until all memories are retrieved.
Step 3: Format each memory as a YAML-frontmatter block
For each memory record, produce a block in this exact format:
---
id: <memory.id>
created_at: <memory.created_at>
type: <memory.metadata.type or "">
confidence: <memory.metadata.confidence or "">
branch: <memory.metadata.branch or "">
files: <memory.metadata.files joined with ", " or "">
categories: <memory.categories joined with ", " or "">
---
<memory.memory or memory content string>
Notes:
- The
---delimiters must be on their own lines with no extra whitespace. filesandcategoriesare written as comma-separated values on a single line.- Leave a blank line after the content before the next
---(for readability). - If a field is missing or null, write an empty string (not "null").
Step 4: Write the export file
Determine the output filename:
mem0-export-<project_id>-<YYYY-MM-DD>.md
Where <YYYY-MM-DD> is today's date in UTC.
Write all formatted blocks to this file using the Write tool (or equivalent). The file is written to the current working directory.
Step 5: Print summary
Exported <N> memories to <filename>
Where <N> is the total number of memory blocks written.
Error Handling
- If
get_memoriesreturns an error or zero memories, print:No memories found for project <project_id>. Nothing exported. - If the write fails, report the error to the user.
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 · 77 lines · 39 tokens per session scan A e308fd0de8c3
export is a skill published in the GitHub repository mem0ai/mem0 (64,535 stars, last pushed today), licensed Apache-2.0. It adds 39 tokens to every session and 559 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.