agentleFS
ss2codess2code/nanoclaw-ops/.claude/skills/migrate-memory/SKILL.md

migrate-memory

Skill1 starsChanged 40 days agoMITView on GitHub

Carry an agent group's memory across a provider switch, in either direction (e.g. Claude ↔ Codex, or any provider to/from another). Run after the operator switches a group's provider with `ncl groups config update --provider`. The coding agent reads the source provider's memory store, distills it into the target provider's store, and restarts the group. Triggers on "migrate memory", "carry memory over", "the agent forgot everything after the switch".

7 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use add-anydoc, add-clidash and 5 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • TomGranotSkill

    add-anydoc

    Add local office-document-to-Markdown conversion to NanoClaw agent containers with the pinned Firecrawl AnyDoc CLI. Use when agents need to read attached Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, or text-based PDF files without uploading them to a hosted parser.

    Also in 5 projects that use this

  • TomGranotSkill

    add-clidash

    Add clidash — a zero-dependency, read-only web dashboard that derives its tabs and tables at runtime from any CLI that lists resources as JSON. Ships pre-wired for NanoClaw's ncl CLI (agent groups, sessions, channels, users, roles), plus message-activity charts, a log tail, and a read-only file viewer for group skills/CLAUDE.md/profiles.

    Also in 5 projects that use this

  • +5 more from TomGranot

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read groups/<folder>/CLAUDE.local.md and any workspace files it references.

    line 30
  2. Very specific:

    If memory/memories/imported-agent-memory.md already exists, a previous import happened — show the operator what's there and ask before …

    line 31
  3. Very specific:

    If memory/index.md exists, add the following:

    line 33
  4. Distinctive:

    Leave the source store exactly as it is.

    line 34
  5. Very specific:

    Read memory/index.md, then the files it points to under memory/memories/ (and memory/data/ where durable).

    line 38

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Migrate memory across a provider switch

NanoClaw does not migrate memory at runtime — each provider keeps its own store, and carrying content across is the operator's move, executed by you (the coding agent). This skill is the whole mechanism: read the source store, infer what is durable, write it into the target store, restart.

You translate between store shapes, not provider names. There are two:

  • Flat file — CLAUDE.local.md at the group workspace root (the Claude provider; may reference satellite files in the workspace).
  • Scaffold tree — memory/ (any provider with usesMemoryScaffold, e.g. Codex). memory/index.md is the index; durable notes live under memory/memories/; memory/memories/imported-agent-memory.md is the conventional landing file for imported memory.

A switch only needs migration when it crosses shapes. Two providers that both use the scaffold share the same memory/ tree, so switching between them carries nothing — the memory is already there. The work is always one of: flat → scaffold, or scaffold → flat.

Principles: copy, never move (the source store stays intact — it IS the rollback), idempotent (re-running must not duplicate), distill, don't dump (you are the inference step: keep identity/seed instructions, user preferences, durable facts; drop conversational residue).

Step 1: Identify the group, both providers, and the direction

  • ncl groups list, then ncl groups config get --id <group-id> — note the current (target) provider. Ask the operator which group, and which provider it switched from, if either is ambiguous.
  • Map each provider to its store shape (flat CLAUDE.local.md vs memory/ scaffold), then inspect groups/<folder>/:
    • Same shape on both sides (e.g. scaffold → scaffold) → the store is shared; nothing to migrate. Tell the operator and stop.
    • Flat → scaffold (source has CLAUDE.local.md content, target uses the scaffold) → Step 2.
    • Scaffold → flat (source has a memory/ tree, target is Claude) → Step 3.
    • Source missing or empty → nothing to migrate; tell the operator and stop.

Step 2: flat → scaffold (CLAUDE.local.md → memory/)

  1. Read groups/<folder>/CLAUDE.local.md and any workspace files it references.
  2. If memory/memories/imported-agent-memory.md already exists, a previous import happened — show the operator what's there and ask before overwriting; integrate only what's new.
  3. Distill the content into groups/<folder>/memory/memories/imported-agent-memory.md (create the directories if missing — the container scaffolds the rest of the tree at boot and never clobbers your files). Lead with anything that defines who the agent is or how it must behave; references to satellite files keep their workspace-root paths.
  4. If memory/index.md exists, add the following: - [Imported agent memory](memories/imported-agent-memory.md) — seed instructions and memory carried over from a previous provider. Read it first and treat it as binding; it may define who you are and how to behave. Integrate its facts into your memory as you work; never modify files that belong to another provider's memory system.
  5. Leave the source store exactly as it is.

Step 3: scaffold → flat (memory/ → CLAUDE.local.md)

  1. Read memory/index.md, then the files it points to under memory/memories/ (and memory/data/ where durable).
  2. Integrate the durable facts into groups/<folder>/CLAUDE.local.md under a clearly marked section (e.g. ## Imported from memory/ (<date>)), deduplicating against what's already there. If the section already exists, update it instead of appending a second one.
  3. Leave the source store exactly as it is.

Step 4: Restart and verify

ncl groups restart --id <group-id>

Tell the operator to send the group a quick test message that depends on a migrated fact (a preference, a project name). If the agent doesn't know it, re-check that the target file landed in the right group folder.

Note: switching the provider is an operator action — ncl groups config update --id <group-id> --provider <name> from the host. See docs/provider-migration.md for what carries over automatically.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.