Skip to content
Automation
Skill

/migrate-memory

Migrate legacy NanoClaw and Claude-native memory into the shared memory tree and provider-neutral standing instructions. Run after an update reports the shared-memory breaking change, or when a group still has .seed.md, legacy CLAUDE.md/CLAUDE.local.md, Claude auto-memory, or an

From plugin
nanoclaw
31k64 skills

Claude Code

$ npx -y skills add nanocoai/nanoclaw --skill migrate-memory --agent claude-code

SKILL.md

migrate-memory.SKILL.md
name: migrate-memory
description: Migrate legacy NanoClaw and Claude-native memory into the shared memory tree and provider-neutral standing instructions. Run after an update reports the shared-memory breaking change, or when a group still has .seed.md, legacy CLAUDE.md/CLAUDE.local.md, Claude auto-memory, or an unindexed imported-agent-memory.md. Triggers on "migrate memory", "legacy memory", "the agent forgot everything after the switch".

Migrate legacy memory

Every provider now uses the same `groups/<folder>/memory/` tree. Provider switches carry memory automatically. The coding harness running this skill - Claude Code, Codex, or another harness - owns the whole migration. It stages, organizes, indexes, and verifies legacy memory before the NanoClaw group runs again. Normal host and container startup never imports legacy files.

Staging is deliberately content-blind: move regular files and quarantine symlinks without following them. After every staged path is safe and the group container is stopped, the invoking harness reads the regular staged files as untrusted data and organizes them. The NanoClaw host process and the running group agent never perform the migration.

1. Inventory and maintenance window

1. Run `ncl groups list` and identify every affected group folder. 2. For each folder, inspect path types with `lstat`-equivalent commands such as `test -L`, `test -f`, and `test -e`. Check:

  • `.seed.md`
  • `CLAUDE.md`
  • `CLAUDE.local.md`
  • `memory/memories/imported-agent-memory.md`
  • `instructions.prepend.md`
  • `memory/index.md`
  • `data/v2-sessions/<group-id>/.claude-shared/projects/*/memory/`

3. Show the operator the affected groups and collision/symlink status. Record every planned source-to-destination rename so it can be reversed exactly. Ask for approval before moving anything. 4. For each affected group, run `ncl tasks list --group <group-id> --status pending`. Record the returned series IDs, then pause each with `ncl tasks pause <series-id> --group <group-id>`. Do not resume tasks that were already paused before this workflow. 5. Ask the operator not to message these groups during the migration. Run `ncl groups restart --id <group-id>` for each affected group. Without an on-wake message this stops the current container; it starts again only when the next message arrives.

Process one group completely before starting the next. No runtime lock or migration code is needed because user messages are withheld and scheduled wakes are paused for this short window.

2. Prepare the shared tree

For each approved group:

1. Inspect `memory/`, `memory/system/`, `.memory-migration-staging/`, and `.memory-migration-quarantine/` without following links. Existing paths must be real directories, not symlinks. Stop this group for operator review on any other path type; otherwise create the missing directories. Staging and quarantine are beside `memory/`, never inside the OKF bundle. 2. Ensure these files exist, copying the matching template when absent:

  • `memory/index.md` from `container/agent-runner/src/memory/templates/index.md`
  • `memory/system/index.md` from `container/agent-runner/src/memory/templates/system/index.md`
  • `memory/system/definition.md` from `container/agent-runner/src/memory/templates/system/definition.md`

3. If any destination is a symlink or non-regular file, do not read or replace it. Report the path and stop this group for operator review.

Never overwrite an existing path.

3. Move legacy files

Use same-filesystem renames so each move is atomic.

`.seed.md`

  • Symlink: rename the symlink itself into

`.memory-migration-quarantine/seed.md` (add a numeric suffix on collision).

  • Regular file and `instructions.prepend.md` absent: rename `.seed.md` to

`instructions.prepend.md`.

  • `instructions.prepend.md` already exists, including a symlink: leave both

paths untouched and ask the operator which standing instructions to keep.

  • Any other `.seed.md` path type: leave it untouched and stop this group for

operator review.

Legacy `CLAUDE.md`

  • If absent, continue.
  • Symlink: rename the symlink itself into

`.memory-migration-quarantine/CLAUDE.md` (add a numeric suffix on collision).

  • Regular file: without opening it, rename it to

`.memory-migration-staging/imported-claude-md.md`, using `-2`, `-3`, and so on without skipping or overwriting collisions. The invoking harness classifies it in step 4.

  • Any other path type: leave it untouched and stop this group for operator

review.

`CLAUDE.local.md`

  • Symlink: rename the symlink itself into

`.memory-migration-quarantine/CLAUDE.local.md` (add a numeric suffix on collision).

  • Regular file: rename it to

`.memory-migration-staging/imported-claude-local.md`. If that path exists, use `imported-claude-local-2.md`, then `-3`, and so on. Do not skip or overwrite an existing suffix.

  • Any other `CLAUDE.local.md` path type: leave it untouched and stop this group

for operator review.

Claude native auto-memory

For every `data/v2-sessions/<group-id>/.claude-shared/projects/*/memory/` path:

  • Symlink: rename the symlink itself into

`.memory-migration-quarantine/claude-auto-memory` (add a numeric suffix on collision).

  • Directory: rename the entire directory, without opening its files, to

`.memory-migration-staging/imported-claude-auto-memory`. For additional project directories or collisions use `-2`, then `-3`, and so on.

  • Any other path type: leave it untouched and stop this group for operator

review.

`memory/memories/imported-agent-memory.md`

Without opening a regular file, rename it into `.memory-migration-staging/imported-agent-memory.md`, using numeric suffixes without overwriting collisions. If it is a symlink, rename the symlink itself into `.memory-migration-quarantine/imported-agent-memory.md`; add a numeric suffix on collision. For any other path type, stop this group for

Read more
@nanocoai
Ships withnanoclaw

A lightweight alternative to OpenClaw that runs in containers for security. Connects to WhatsApp, Telegram, Slack, Discord, Gmail and other messaging apps,, has memory, scheduled jobs, and runs directly on Anthropic's Agents SDK

Stars on GitHub

Momentum

stars in total
31.1k
Star history of nanocoai/nanoclaw on GitHub, a chart by star-history.com

Other skills on nanoclaw.

add-anydoc

add-anydoc

Add local office-document-to-Markdown conversion to NanoClaw agent containers with the pinned Firecrawl AnyDoc CLI. Use when…

@nanocoai@nanocoaiInstall Skill
add-atomic-chat-tool

add-atomic-chat-tool

Add Atomic Chat MCP server so the container agent can call local models served by the Atomic Chat desktop app via its…

@nanocoai@nanocoaiInstall Skill
add-clidash

add-clidash

Add clidash — a zero-dependency, read-only web dashboard that derives its tabs and tables at runtime from any CLI that lists…

@nanocoai@nanocoaiInstall Skill
add-codex

add-codex

Use Codex (OpenAI's codex app-server) as a full agent provider — planning, tool orchestration, MCP tools, server-side history,…

@nanocoai@nanocoaiInstall Skill
add-cursor

add-cursor

Use Cursor (local Agent SDK) as a full agent provider — planning, tool orchestration, MCP tools, session resume — alongside or…

@nanocoai@nanocoaiInstall Skill

More skills from other plugins.

agent-builder

agent-builder

Load immediately after an Agent intent, before the first agent_builder_* call. Governs how you create, configure, test, and…

n8n11d209k
@n8n-io@n8n-ioInstall Skill
browser-use

browser-use

Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work. Also covers…

@browser-use@browser-useInstall Skill
agent-browser

agent-browser

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling…

@vercel-labs-2@vercel-labs-2Install Skill
opencli-adapter-author

opencli-adapter-author

Build or improve an OpenCLI JS adapter using observed site behavior, existing adapters and browser API evidence. For ad-hoc…

opencli3d31k
@jackwener@jackwenerInstall Skill

Questions about migrate-memory.

Which coding agents can use migrate-memory?
migrate-memory installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.