OpenClaw 内存迁移器

一种以验证为先的 CLI 工作流,用于将 OpenClaw 内存后端迁移到官方 memory-core,同时避免数据丢失,并保留可追溯性和回滚选项。

airbing11
2026年9月11日
0 收藏
62 下载

安装与下载

1 ClawHub CLI

从源直接安装技能的最快方式。

npx clawhub@latest install memory-core-migrator

2 手动安装

将技能文件夹复制到以下位置之一

全局模式 ~/.openclaw/skills/
工作区 {'/skills/'}

优先级:工作区 › 全局 › 内置

3 提示词安装

将此提示词复制到 Openclaw 即可自动安装。

请帮我使用 Clawhub 安装 skill-memory-core-migrator。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。

更倾向于下载?

获取包含原生技能文件的ZIP压缩包。

下载技能 (.zip)

基本信息

名称 OpenClaw 内存迁移器
Slug memory-core-migrator
创建者 airbing11
创建时间 2026-09-11 05:30:51
更新时间 2026-09-11 05:30:51
收藏数 0
使用量 62
浏览量 13

安装指南

  1. ClawHub CLI 从源直接安装技能的最快方式。
    npx clawhub@latest install memory-core-migrator
  2. 手动安装 将技能文件夹复制到以下位置之一
    全局模式
    ~/.openclaw/skills/
    工作区
    /skills/
    优先级:工作区 > 本地 > 内置
  3. 提示词安装 将此提示词复制到 OpenClaw 即可自动安装。
    请帮我使用 Clawhub 安装 memory-core-migrator。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
    更倾向于下载?
    获取包含原生技能文件的ZIP压缩包。
    下载技能 (.zip)

name: openclaw-memory-migrator description: Safely migrates OpenClaw memory from LanceDB Pro, official LanceDB list captures, QMD, or Markdown into memory-core. Use when an owner asks to migrate, audit, deduplicate, benchmark, cut over, or roll back an OpenClaw memory backend. disable-model-invocation: true metadata: openclaw: emoji: "🧠" requires: bins: - node - openclaw

OpenClaw Memory Migrator

Move the memory. Keep the proof.

Use this Skill when an owner wants a safer, verifiable, and practical path from a third-party memory backend back to OpenClaw's official memory-core.

Safety rules

Run only in an authenticated owner DM, Control UI, or local operator shell. Refuse execution from group or channel chats.
Default to read-only discovery and --dry-run.
Never copy source vectors into memory-core SQLite. Export authoritative text and metadata, then let memory-core rebuild derived indexes.
Never delete a source database, SQLite file, WAL/SHM sidecar, Markdown file, or backup.
Before writes, require a verified OpenClaw backup and a run-bound approval: APPROVE .
A previous approval, an approval for another action, or an approval from another run is invalid.
Stop on count, ID, hash, scope, agent, configuration, or capability drift.
Keep state and reports outside indexed memory paths.
Do not enable two dreaming writers during cutover.
Do not publish logs or fixtures containing user memory, credentials, channel IDs, or personal data.

Supported paths

Stable: memory-lancedb-pro JSON capture to memory-core Markdown.
Stable: Markdown or QMD-owned Markdown to memory-core Markdown.
Beta: captured official memory-lancedb ltm list JSON to memory-core Markdown.
Unsupported: direct opaque LanceDB database parsing, vector transfer, arbitrary backend-to-backend sync.

Read references/compatibility.md before selecting an adapter.

Workflow

  1. Discover

Resolve rather than assume:

OpenClaw version and executable path

state directory, agents, workspaces, memory slot
source plugin version and CLI help
source scopes and record counts
memory-core availability
embedding provider/model/dimensions
dreaming jobs and maintenance window
free disk and backup destination

Run preflight against explicit export files. Keep the surrounding run directory outside the workspace:

node bin/openclaw-memory-migrator.js preflight
--input export/global.json
--output canonical/memory-records.jsonl

If a required capability is unknown, stop. Do not invent a command.
  1. Back up

Use the current OpenClaw backup CLI. A backup is accepted only when:

command exit is zero;
JSON reports verified: true;
the exact returned archivePath exists;
SHA-256 is recorded and verifies.

Also inventory source databases and configured agent roots. Follow references/operations.md.

  1. Export read-only

Select one adapter:

node bin/openclaw-memory-migrator.js normalize
--adapter lancedb-pro
--input export/global.json
--input export/main.json
--output canonical/memory-records.jsonl

For LanceDB Pro, inspect memory-pro export --help and export every non-empty scope separately. Set an explicit limit only when that installed version supports it. memory-lancedb-pro v1.1.0-beta.10 export is capped at 1,000 records; when a scope exceeds the detected cap, paginate memory-pro list with --limit and --offset. Exported totals must equal the immediately preceding scoped stats.

For QMD and Markdown, migrate the authoritative Markdown rather than QMD's derived index. OpenClaw 2026.9.x retired QMD backend configuration, so use the official Doctor migration where applicable rather than restoring legacy QMD keys. Official LanceDB has no export command in verified 2026.9.x releases; capture openclaw ltm list --agent for every agent and wrap each array in the versioned lancedb-official-list-beta manifest documented in references/compatibility.md. Never reverse-engineer a live database.

  1. Audit node bin/openclaw-memory-migrator.js audit
    --adapter canonical-v1
    --input canonical/memory-records.jsonl
    --output reports/audit.json

Require:

source/export/canonical non-empty counts reconcile;
source IDs reconcile where the source supplies IDs;
no silent empty-text drops;
exact duplicates and approximate duplicate groups are reported;
secret-like metadata is rejected or redacted.

Deduplication is report-only in v0.1. Never delete automatically.

  1. Render for memory-core node bin/openclaw-memory-migrator.js render
    --adapter canonical-v1
    --input canonical/memory-records.jsonl
    --output staged-memory/imports/

Render durable records separately from dated records. Do not append imports directly to root MEMORY.md. Review generated Markdown before cutover.

  1. Establish recall baseline

Create at least eight owner-approved queries covering:

durable identity or preference
recent event
source-only fact
multilingual/CJK phrase
operational rule
channel or agent-scoped fact

Record top-k source, score, latency, and expected evidence. Never index the evaluation report as memory. Follow docs/benchmark-methodology.md.

  1. Request cutover approval

Write the proposed configuration diff, affected agents, backup SHA, manifest SHA, baseline, rollback commands, and maintenance window into the run report.

Request exactly:

APPROVE CUTOVER

After receiving it, re-run preflight. If anything material changed, invalidate the approval and generate a new run.

  1. Cut over

Follow references/operations.md:

Enable memory-core and validate a staged config.
Disable the old memory writer and old dreaming schedules.
Change the single memory slot.
Restart through the verified service owner.
Confirm channel and Gateway health before indexing.
Build memory-core indexes for every configured agent.
Run the baseline and source-only probes.

If health or recall gates fail, stop and request:

APPROVE ROLLBACK

  1. Soak and retire

Keep source data cold and plugins disabled during the soak period. Verify channels, indexes, recall, dreaming output, and long-term file diffs daily.

Request APPROVE PROMOTION before the first promotion-capable dreaming run. Request APPROVE RETIRE before uninstalling plugins. Retirement still preserves source data for the declared rollback window.

Report contract

Every phase report includes:

run ID, phase, timestamps, host fingerprint
versions, adapter, agents, scopes
backup path and SHA-256
source/export/canonical/rendered counts
duplicate and rejected-record counts
slot, indexing, channel, and recall status
exact next approval or blocker

Never describe a partial or unverified result as successful.

Open YouTube

headhunter-pro-link