New to Claude Skills? Learn how to install them →

mem0ai on GitHub

Mem0 Export

Free

Easily back up and migrate project memories to Markdown.

by mem0ai63k stars on mem0ai/mem0
1 views
Updated Aug 7, 2026
Get this skill

Free · Opens the source repo

What Mem0 Export does

Mem0 Export is a utility designed for developers and designers who need to manage their project memories effectively. This skill allows users to export all memories associated with a specific project into a portable Markdown file, making it easy to back up, share, or migrate project data. The structured format ensures that all relevant information is preserved, which can be particularly useful when transitioning between projects or archiving data for future reference.

The export process involves a series of straightforward steps. First, the skill determines the active user and project identity, ensuring that the correct memories are fetched. It then retrieves all memories using a paginated approach to handle large datasets efficiently. Once the memories are collected, each record is formatted into a YAML-frontmatter block, which includes essential metadata such as creation date, type, and associated files. This structured output not only aids in readability but also facilitates easier integration with other tools and systems.

Users can benefit from this skill in various scenarios, such as when they need to back up their memories before a significant project change, share the current state of memories with team members, or simply archive data before performing a cleanup. The resulting Markdown file is named systematically, making it easy to identify and manage exports over time.

Overall, Mem0 Export is an essential tool for anyone looking to maintain a clean and organized workflow while ensuring that their project memories are safely stored and easily accessible for future use.

When to use it

Use this tool when you need to create backups of your project memories or share them with collaborators.

When not to use it

This skill is not suitable for real-time memory management or for projects that do not utilize the Mem0 framework.

What you can build with it

Backing Up Project Data

Use Mem0 Export to create a backup of your project's memories before making significant changes.

Sharing with Team Members

Easily share the current state of your project memories with teammates by exporting them to a Markdown file.

Archiving for Cleanup

Archive your project memories in a structured format before performing a cleanup or restructuring of your project.

How to install Mem0 Export

View source

1. Install with the skills CLI

npx skills add mem0ai/mem0/export --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by mem0ai

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.

Frequently asked questions about Mem0 Export

Similar skills