Agent skill

Migrating Memory

by letta-ai in letta-ai/letta-code

Migrate memory blocks from an existing agent to the current agent.

Apache-2.0Auto-check passed

Install Migrating Memory

skills CLI
$ npx skills add letta-ai/letta-code --skill migrating-memory -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install letta-ai/letta-code migrating-memory --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/letta-ai/letta-code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/src/skills/builtin/migrating-memory .claude/skills/migrating-memory && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
migrating-memory
GitHub stars
3.6k
Token cost
~829 tokens
SKILL.md length
331 words
Files
1
Skills in repo
25
Repo updated
First seen
Licence
Apache-2.0

At a glance

Migrate memory blocks from an existing agent to the current agent.

  • Works in 3 steps: Export the source agent's memfs to a… → Copy the files you want into your own… → Commit and push the memory repo
  • The user wants to copy
  • SKILL.md covers When to Use This Skill, Migration Method (memfs-first), If MemFS Is Disabled and Workflow, plus 1 more section
  • Calls git

What it does

Migrating Memory is an agent skill from letta-ai/letta-code. Migrate memory blocks from an existing agent to the current agent. Use when the user wants to copy or share memory from another agent, or during /init when setting up a new agent that should inherit memory from an existing one.

Its SKILL.md is about 830 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: Stateful agents that are like people, with memory, identity, and the ability to learn and adapt. The licence is Apache-2.0.

When your agent uses it

  • The user wants to copy
  • Share memory from another agent
  • During /init when setting up a new agent that should inherit memory from an existing one

Example prompts

  • “/migrating-memory”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Export the source agent's memfs to a temp directory
  2. Copy the files you want into your own memfs
  3. Commit and push the memory repo

What it can do on your machine

Read from SKILL.md and the folder at commit 253a3bc. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Migrating Memory loads about 829 tokens when it runs. Until then it costs about 61 tokens; SKILL.md has 331 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~61
When it runs · the whole SKILL.md, loaded when a task matches
~829

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from letta-ai/letta-code at commit 253a3bc, republished under its Apache-2.0 licence (© letta-ai). 331 words, ~829 tokens.

Download SKILL.mdSave it as .claude/skills/migrating-memory/SKILL.md (or your agent's skills folder).
name
migrating-memory
description
Migrate memory blocks from an existing agent to the current agent. Use when the user wants to copy or share memory from another agent, or during /init when setting up a new agent that should inherit memory from an existing one.

Migrating Memory

This skill helps migrate memory blocks from an existing agent to a new agent, similar to macOS Migration Assistant for AI agents.

Requires Memory Filesystem (memfs)

This workflow is memfs-first. If memfs is enabled, do not use the legacy block commands — they can conflict with file-based edits.

To check: Look for a memory_filesystem block in your system prompt. If it shows a tree structure starting with /memory/ including a system/ directory, memfs is enabled.

To enable: Ask the user to run /memfs enable, then reload the CLI.

When to Use This Skill

  • User is setting up a new agent that should inherit memory from an existing one
  • User wants to share memory blocks across multiple agents
  • User is replacing an old agent with a new one
  • User mentions they have an existing agent with useful memory

Migration Method (memfs-first)

Export → Copy → Sync

This is the recommended flow:

  1. Export the source agent's memfs to a temp directory

    bash
    letta memory export --agent <source-agent-id> --out /tmp/letta-memory-<source-agent-id>
  2. Copy the files you want into your own memfs

    • system/ = attached blocks (always loaded)
    • root = detached blocks

    Example:

    bash
    cp -r /tmp/letta-memory-agent-abc123/system/project ~/.letta/agents/$LETTA_AGENT_ID/memory/system/
    cp /tmp/letta-memory-agent-abc123/notes.md ~/.letta/agents/$LETTA_AGENT_ID/memory/
  3. Commit and push the memory repo

    bash
    cd ~/.letta/agents/$LETTA_AGENT_ID/memory
    git add system/project notes.md
    git commit -m "Import memory from source agent"
    git push

This gives you full control over what you bring across and keeps everything consistent with memfs.

Show full SKILL.md (157 more words)Show less

If MemFS Is Disabled

The legacy block-level CLI commands have been removed. Enable MemFS first, then use the export → copy → sync workflow above.

If you run into duplicate filenames while copying memory files, rename the incoming file or merge its contents manually before committing.

Workflow

Step 1: Identify Source Agent

Ask the user for the source agent's ID (e.g., agent-abc123).

If they don't know the ID, invoke the finding-agents skill to search:

Skill({ skill: "finding-agents" })

Example: "What's the ID of the agent you want to migrate memory from?"

Example: Migrating Project Memory

Scenario: You're a new agent and want to inherit memory from an existing agent "ProjectX-v1".

  1. Get source agent ID from user: User provides: agent-abc123

  2. Export their memfs:

    bash
    letta memory export --agent agent-abc123 --out /tmp/letta-memory-agent-abc123
  3. Copy the relevant files into your memfs:

    bash
    cp -r /tmp/letta-memory-agent-abc123/system/project ~/.letta/agents/$LETTA_AGENT_ID/memory/system/
  4. Commit and push:

    bash
    cd ~/.letta/agents/$LETTA_AGENT_ID/memory
    git add system/project
    git commit -m "Import project memory"
    git push

© letta-ai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in src/skills/builtin/migrating-memory of letta-ai/letta-code.

Open the folder on GitHubat commit 253a3bc

Compare with similar skills

Migrating Memory next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Migrating Memory compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Migrating Memory this skillletta-ai/letta-code3.6k—~829Automated safety check: PassApache-2.0
Reversible MigrationJuliusBrussee/caveman111k1 repos~196Automated safety check: PassApache-2.0
Database Migrationsaffaan-m/ECC276k4 repos~3kAutomated safety check: PassMIT
Database Migrationsaffaan-m/ECC276k1 repos~2.4kAutomated safety check: PassMIT
Database Migration Reviewrohitg00/ai-engineering-from-scratch66k—~315Automated safety check: PassMIT
Safe Database Migration Patternsaffaan-m/ECC276k—~3.3kAutomated safety check: PassMIT

Similar skills

  • Reversible Migration

    JuliusBrussee/caveman

    Implement reversible compatibility-safe transitions. Use for schema, data, API, protocol, configuration, or dependency migrations requiring rollback and…

    111k GitHub starsUsed in 1 repo~196 tokens
    DevelopmentAuto-check passed
  • Safe, reversible database migration patterns: forward-only production changes, expand-contract zero-downtime renames, concurrent indexes, batched backfills, and per-tool workflows for PostgreSQL…

    276k GitHub starsUsed in 4 repos~3k tokens
    DatabasesAuto-check passed
  • Şema değişiklikleri, veri migration'ları, rollback'ler ve PostgreSQL, MySQL ve yaygın ORM'ler (Prisma, Drizzle, Django, TypeORM, golang-migrate) arasında sıfır kesinti deployment'ları için…

    276k GitHub starsUsed in 1 repo~2.4k tokens
    DatabasesAuto-check passed
  • Database Migration Review

    rohitg00/ai-engineering-from-scratch

    Reviews database migration files before merge, collecting forward, rollback, locking and data-safety evidence, with a decision that is blocked whenever evidence is missing.

    66k GitHub stars~315 tokensUpdated today
    DatabasesAuto-check passed
  • Rules and examples for safe, reversible schema changes in production: zero-downtime column and index changes, large data backfills and ORM migration workflows.

    276k GitHub stars~3.3k tokensUpdated 4 days ago
    DatabasesAuto-check passed
  • Migrate Create

    ruvnet/ruflo

    Create a new sequentially numbered database migration with up/down SQL files

    74k GitHub stars~583 tokensUpdated today
    DatabasesAuto-check: notes

More from letta-ai/letta-code

All 25 skills in this repo
  • Creating Skills

    letta-ai/letta-code

    Guide for creating effective skills. An agent skill from letta-ai/letta-code.

    3.6k GitHub stars~4.6k tokensUpdated today
    Auto-check passed
  • Generating Mod Envs

    letta-ai/letta-code

    Generates and reviews mod learning env JSON files for Letta Code local mods.

    3.6k GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Initializing Memory

    letta-ai/letta-code

    Comprehensive guide for initializing or reorganizing agent memory.

    3.6k GitHub stars~4.8k tokensUpdated today
    Auto-check passed
  • Self Configuration

    letta-ai/letta-code

    Inspect or modify Letta Code's own memory, model, context window, system prompt, compaction, permissions, toolsets, mods, skills, channels, schedules, agent secrets, and local runtime settings.

    3.6k GitHub stars~7k tokensUpdated today
    Auto-check passed
  • Browser Use

    letta-ai/letta-code

    Control a real browser to navigate pages, click, type, fill forms, inspect rendered UI, take screenshots, or record video.

    3.6k GitHub stars~3.3k tokensUpdated today
    Auto-check passed
  • Creating Mods

    letta-ai/letta-code

    Creates and edits trusted local Letta Code mods, including tools, slash commands, local-only model providers, lifecycle/turn events, scoped conversation helpers, panels, and capability-gated behavior.

    3.6k GitHub stars~2.5k tokensUpdated today
    Auto-check passed

Questions about Migrating Memory

What does Migrating Memory do?

Migrate memory blocks from an existing agent to the current agent. Migrating Memory is an agent skill from letta-ai/letta-code. Migrate memory blocks from an existing agent to the current agent.

When should I use Migrating Memory?

Migrating Memory fits situations like: the user wants to copy; share memory from another agent; during /init when setting up a new agent that should inherit memory from an existing one.

How do I install Migrating Memory in Claude Code?

Run `npx skills add letta-ai/letta-code --skill migrating-memory -a claude-code`. Or copy the skill folder (src/skills/builtin/migrating-memory in letta-ai/letta-code) into .claude/skills/migrating-memory in your project. Claude Code loads it when a task matches its description.

How do I install Migrating Memory in Codex?

Run `npx skills add letta-ai/letta-code --skill migrating-memory -a codex`. Or copy the skill folder (src/skills/builtin/migrating-memory in letta-ai/letta-code) into .agents/skills/migrating-memory in your project. Codex loads it when a task matches its description.

Can I use Migrating Memory in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add letta-ai/letta-code --skill migrating-memory -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/migrating-memory, .gemini/skills/migrating-memory, .github/skills/migrating-memory and .opencode/skills/migrating-memory in your project.

What does Migrating Memory need to run?

Going by SKILL.md and its folder, Migrating Memory needs the command-line tools its instructions call (git).

Does Migrating Memory access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Migrating Memory safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Migrating Memory use?

Migrating Memory is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Migrating Memory use?

About 829 tokens (SKILL.md is roughly 3.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Migrating Memory?

Skills that share tags, products or a category with Migrating Memory: Reversible Migration (JuliusBrussee/caveman, 111k stars), Database Migrations (affaan-m/ECC, 276k stars), Database Migrations (affaan-m/ECC, 276k stars) and Database Migration Review (rohitg00/ai-engineering-from-scratch, 66k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Migrating Memory?

letta-ai (a GitHub organization) maintains it in letta-ai/letta-code, which has 3,552 GitHub stars. The repository holds 25 skills in this directory. The repository was last updated on October 9, 2026.

Source: letta-ai/letta-code on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.