/export
Exports all project memories to a portable Markdown file for backup or migration. Use when backing up memories, migrating to another project, sharing memory state with teammates, or archiving before cleanup.
$ npx -y skills add mem0ai/mem0 --skill export --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/export
Context preview
The summary Claude sees to decide when to auto-load this skill.
Exports all project memories to a portable Markdown file for backup or migration. Use when backing up memories, migrating to another project, sharing memory state with teammates, or archiving before cleanup.
SKILL.md
export.SKILL.mdname: export
description: Exports all project memories to a portable Markdown file for backup or migration. Use when backing up memories, migrating to another project, sharing memory state with teammates, or archiving before cleanup.
Mem0 Export
Export all memories for the current project to a portable Markdown file.
Execution
Step 1: Resolve identity
Determine the active identity:
- `user_id` from `MEM0_USER_ID` env var, else `$USER`, else `"default"`
- `project_id` (used as `app_id`) from `MEM0_PROJECT_ID` env 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.
- `files` and `categories` are 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_memories` returns 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.
Read more
name: export description: Exports all project memories to a portable Markdown file for backup or migration. Use when backing up memories, migrating to another project, sharing memory state with teammates, or archiving before cleanup.
Mem0 Export
Export all memories for the current project to a portable Markdown file.
Execution
Step 1: Resolve identity
Determine the active identity:
- `user_id` from `MEM0_USER_ID` env var, else `$USER`, else `"default"`
- `project_id` (used as `app_id`) from `MEM0_PROJECT_ID` env 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.
- `files` and `categories` are 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_memories` returns 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.
Mem0 ("mem-zero") enhances AI assistants and agents with an intelligent memory layer, enabling personalized AI interactions.
Repo: mem0ai/mem0
Other skills on mem0.
- /context-loader
Searches and injects relevant memories into context before starting work on a task. Use when beginning a new task, switching context, or when project history, past decisions, or coding conventions need to be loaded.
Open skill - /dream
Consolidates stored memories by merging duplicates, resolving contradictions, and pruning stale entries. Use when memory count is high, search results feel noisy or repetitive, or periodic cleanup is needed to maintain memory quality.
Open skill - /forget
Deletes memories by search query or memory ID with confirmation before removal. Use when removing outdated decisions, incorrect memories, sensitive data, or cleaning up after experiments. Also handles undo of recent additions.
Open skill - /health
Diagnoses mem0 connectivity, API key validity, and memory read/write functionality. Use when memory operations fail, searches return empty, add_memory errors occur, MCP connection drops, or to verify the plugin is working correctly.
Open skill - /import
Imports memories from an exported Markdown file or MEMORY.md into the current project. Use when migrating from another project, restoring from backup, importing Claude Code native MEMORY.md content, or setting up a new project with existing knowledge.
Open skill - /list-projects
Lists all projects with stored memories for the current user, showing memory counts and last activity dates. Use when checking which projects have memories, comparing memory distribution across repos, or finding a specific project scope.
Open skill

