Memory Transfer — Cross-Agent Migration for OpenClaw
Migrate memories, preferences, writing style, and workflow data from any AI assistant into OpenClaw. Zero learning curve — just say where you came from.
Language Rule
All user-facing messages in this skill MUST match the user's language (from USER.md or detected from conversation). The examples below show both English and Chinese variants — pick the one that matches.
Quick Reference
| Source | Method | User Effort |
|---|
| ChatGPT | ZIP data export (auto-parse) | Click export in settings, upload ZIP |
| ChatGPT (alt) |
Prompt-guided | Copy prompt → paste result back |
| Claude.ai | Prompt-guided | Copy prompt → paste result back |
| Gemini | Prompt-guided | Copy prompt → paste result back |
| Copilot | Prompt-guided | Copy prompt → paste result back |
| Perplexity | Prompt-guided | Copy prompt → paste result back |
| Claude Code | Auto-scan local files | None |
| Cursor | Auto-scan local files | None |
| Windsurf | Auto-scan local files | None |
Flow
Step 1: Identify Source
Ask the user one question:
EN: Which AI assistant are you coming from?
ZH: 你之前用的是哪个 AI 助手?
If the user already mentioned it (e.g., "I used ChatGPT for a year"), skip this step.
Determine the migration path:
- - Cloud AI (ChatGPT, Claude.ai, Gemini, Copilot, Perplexity) → Step 2A or 2B
- Local Agent (Claude Code, Cursor, Windsurf) → Step 2C
Step 2A: ChatGPT ZIP Export (Preferred for ChatGPT)
This is the easiest and most complete method for ChatGPT users.
EN version:
The easiest way — export your ChatGPT data:
- 1. Open ChatGPT → Settings → Data Controls → Export Data
- Click "Export" — you'll receive an email
- Download the ZIP file and send it to me
I'll automatically parse all your conversations, memories, and preferences.
ZH version:
最简单的方式——去 ChatGPT 导出你的数据:
- 1. 打开 ChatGPT → Settings → Data Controls → Export Data
- 点 "Export",你会收到一封邮件
- 下载 ZIP 文件,直接发给我
我会自动解析你所有的对话记录、记忆和偏好。
When the user uploads the ZIP, run the parser:
CODEBLOCK0
The parser outputs a structured JSON to stdout. Read and process it.
If the user doesn't want to wait for the email or prefers a faster method, fall back to Step 2B.
Step 2B: Prompt-Guided Export (All Cloud AIs)
Tell the user to open a new conversation with their old AI and send the export prompt.
Important: Give the prompt in the user's primary language. If the user chats in Chinese, give the Chinese prompt — this ensures the old AI responds in Chinese too, preserving the original context.
EN version — tell the user:
Go to your old AI, start a new chat, and send it this message. Then copy the response back to me.
ZH version — tell the user:
去你之前的 AI 那里,开一个新对话,把下面这段话发给它,然后把回复复制给我。
Export Prompt (English):
CODEBLOCK1
Export Prompt (中文):
CODEBLOCK2
When the user pastes the result back, proceed to Step 3.
Step 2C: Local Agent Auto-Scan
For local agents, scan files automatically. No user action needed.
Claude Code:
CODEBLOCK3
Cursor:
CODEBLOCK4
Windsurf:
CODEBLOCK5
Generic (AGENT.md / CLAUDE.md / rules files):
CODEBLOCK6
After scanning, present what was found and proceed to Step 3.
Step 3: Parse & Categorize
Process the imported data (whether from ZIP, prompt response, or local scan) into these categories:
KEEP:
- - Identity (name, profession, industry, language)
- Writing style and communication preferences
- Tools, platforms, tech stack
- Active projects and workflows
- Structural preferences (how to organize/present info)
- "Don't do this" rules and corrections
- Domain knowledge and expertise areas
- Behavioral patterns and habits
FILTER OUT:
- - Completed one-off tasks
- Outdated context (finished projects, old deadlines)
- Source-specific references ("as a ChatGPT user...")
- API keys, tokens, passwords — never migrate credentials
- Hallucinated or inaccurate memories (flag suspicious ones)
- Duplicate or redundant entries
Step 4: Review & Confirm
Present the cleaned data to the user, organized by destination:
EN:
📋 Migration Preview
Writing to USER.md (your profile):
- - Name: ...
- Profession: ...
- Language: ...
- Communication style: ...
Writing to MEMORY.md (long-term memory):
- - [project/knowledge/experience entries...]
Writing to TOOLS.md (tool preferences):
- - Tools: ...
- Platforms: ...
Anything to change? I'll write it once you confirm.
ZH:
📋 迁移预览
写入 USER.md(你的画像):
- - 姓名:...
- 职业:...
- 语言偏好:...
- 沟通风格:...
写入 MEMORY.md(长期记忆):
写入 TOOLS.md(工具偏好):
有什么要改的吗?确认后我就写入。
Wait for user confirmation. They can:
- - Approve all
- Remove specific items
- Edit entries
- Add things that were missed
Step 5: Write to Memory System
After confirmation, write to the appropriate files:
USER.md — Identity, communication preferences, language, timezone
MEMORY.md — Knowledge, projects, experience, behavioral patterns
TOOLS.md — Tools, platforms, environment-specific notes
Rules for writing:
- - Merge, don't overwrite — if these files already have content, integrate new data with existing
- Preserve structure — follow the existing format of each file
- Add a migration note — append a comment like INLINECODE0
- Use the user's language — write entries in the language the user communicates in
Step 6: Verify
After writing, confirm:
EN:
✅ Migration complete!
Here's what I now know about you:
[Brief summary of key imported info]
This info is now in my memory system — I'll use it naturally in our conversations.
Feel free to tell me if anything needs updating.
ZH:
✅ 迁移完成!
现在我知道的关于你的事:
[Brief summary of key imported info]
这些信息已经写入我的记忆系统,以后的对话中我会自然地使用它们。
随时可以告诉我补充或修正任何内容。
Special Cases
Multiple Sources
If the user used several AI assistants, handle them sequentially. Deduplicate across sources before writing.
Partial Migration
User might say "just bring over my writing preferences" — respect scope limits. Only migrate what they want.
Conflict Resolution
If imported data conflicts with existing memory (e.g., different profession noted), ask the user which is current.
Re-migration
If the user runs migration again later, merge new data with existing. Don't create duplicates.
Platform-Specific Notes
ChatGPT Data Export ZIP Structure
CODEBLOCK7
The parser (scripts/parse-chatgpt-export.js) extracts:
- - User messages patterns and topics
- Correction patterns (user said "no, I meant...")
- Frequently discussed subjects
- Writing style from user messages
- Tool/platform mentions (word-boundary-aware detection)
- Project references
Claude.ai
Users can access their memory at claude.ai → Settings → Memory. They can either:
- 1. Use the prompt method (Step 2B)
- Manually copy their memory entries
Gemini
Gemini stores "Saved Info" in Settings. Prompt method works best.
Copilot
Limited memory capabilities. Prompt method captures what's available.
Security
- - NEVER migrate API keys, tokens, or credentials
- Warn user if imported text contains what looks like secrets (regex:
/(?:sk-|ghp_|token|password|secret|key)\s*[:=]/i) - All imported data is shown to user before writing — no silent imports
- ZIP files are processed in temp directory with path traversal protection, cleaned up after
记忆迁移 — 面向 OpenClaw 的跨智能体迁移
将任何 AI 助手的记忆、偏好、写作风格和工作流数据迁移到 OpenClaw。零学习成本——只需说明你来自哪里。
语言规则
本技能中所有面向用户的消息必须与用户的语言一致(来自 USER.md 或从对话中检测)。以下示例同时展示英文和中文版本——选择匹配的版本使用。
快速参考
| 来源 | 方法 | 用户操作 |
|---|
| ChatGPT | ZIP 数据导出(自动解析) | 在设置中点击导出,上传 ZIP |
| ChatGPT(备选) |
提示引导 | 复制提示 → 粘贴回复 |
| Claude.ai | 提示引导 | 复制提示 → 粘贴回复 |
| Gemini | 提示引导 | 复制提示 → 粘贴回复 |
| Copilot | 提示引导 | 复制提示 → 粘贴回复 |
| Perplexity | 提示引导 | 复制提示 → 粘贴回复 |
| Claude Code | 自动扫描本地文件 | 无需操作 |
| Cursor | 自动扫描本地文件 | 无需操作 |
| Windsurf | 自动扫描本地文件 | 无需操作 |
流程
第一步:识别来源
向用户提一个问题:
EN: 你之前用的是哪个 AI 助手?
ZH: 你之前用的是哪个 AI 助手?
如果用户已经提到(例如我用 ChatGPT 一年了),跳过此步骤。
确定迁移路径:
- - 云端 AI(ChatGPT、Claude.ai、Gemini、Copilot、Perplexity)→ 第二步 A 或第二步 B
- 本地智能体(Claude Code、Cursor、Windsurf)→ 第二步 C
第二步 A:ChatGPT ZIP 导出(ChatGPT 首选方法)
这是 ChatGPT 用户最简单且最完整的方法。
英文版本:
最简单的方式——去 ChatGPT 导出你的数据:
- 1. 打开 ChatGPT → Settings → Data Controls → Export Data
- 点 Export,你会收到一封邮件
- 下载 ZIP 文件,直接发给我
我会自动解析你所有的对话记录、记忆和偏好。
中文版本:
最简单的方式——去 ChatGPT 导出你的数据:
- 1. 打开 ChatGPT → Settings → Data Controls → Export Data
- 点 Export,你会收到一封邮件
- 下载 ZIP 文件,直接发给我
我会自动解析你所有的对话记录、记忆和偏好。
当用户上传 ZIP 文件时,运行解析器:
bash
node dir>/scripts/parse-chatgpt-export.js to_zip>
解析器将结构化 JSON 输出到标准输出。读取并处理。
如果用户不想等待邮件或更喜欢更快的方��,则回退到第二步 B。
第二步 B:提示引导导出(所有云端 AI)
告诉用户打开与旧 AI 的新对话并发送导出提示。
重要: 使用用户的母语提供提示。如果用户用中文聊天,提供中文提示——这确保旧 AI 也用中文回复,保留原始上下文。
英文版本——告诉用户:
去你之前的 AI 那里,开一个新对话,把下面这段话发给它。然后把回复复制给我。
中文版本——告诉用户:
去你之前的 AI 那里,开一个新对话,把下面这段话发给它,然后把回复复制给我。
导出提示(英文):
Im migrating to a new AI assistant and need a complete export of everything you know about me. Please provide ALL of the following in a single, well-structured response:
1. Stored Memories
List every memory you have stored about me. Output verbatim — do not summarize or paraphrase.
2. Custom Instructions
Reproduce my complete custom instructions / personalization settings. If empty, say so.
3. Identity & Context
- - My name, profession, industry
- Tools and platforms I use regularly
- Languages I work in
4. Communication Preferences
- - My writing style (tone, sentence length, vocabulary level, quirks)
- How I like information structured and presented
- Formatting preferences (bullet points vs prose, headers, code blocks)
5. Behavioral Patterns
- - What I ask you to help with most (rank by frequency)
- Recurring projects or workflows
- Strong opinions or preferences Ive expressed
- Things Ive told you NOT to do — list every correction
6. Topics & Interests
- - Subjects I discuss frequently
- Areas of expertise
- Curiosities and learning goals
Be exhaustive. Better to include too much than too little. Format as a reference document, not conversational text. This will be directly imported into another AIs memory system.
导出提示(中文):
我正在迁移到另一个 AI 助手,需要你把关于我的一切都导出来。请在一次回复中提供以下所有内容,用清晰的结构输出:
1. 存储的记忆
列出你存储的关于我的每一条记忆,原文输出,不要总结或改写。
2. 自定义指令
完整复现我的自定义指令/偏好设置。如果为空请说明。
3. 身份与背景
- - 我的姓名、职业、行业
- 我常用的工具和平台
- 我使用的语言
4. 沟通偏好
- - 我的写作风格(语气、句子长度、词汇水平、表达习惯)
- 我喜欢信息怎么组织和呈现
- 格式偏好(列表还是段落、标题、代码块)
5. 行为模式
- - 我最常让你帮忙做什么?按频率排序
- 反复出现的项目或工作流
- 我表达过的强烈观点或偏好
- 我纠正过你什么?让你不要做什么?列出所有别这样的模式
6. 话题与兴趣
- - 我经常讨论的话题
- 我的专业领域
- 我的好奇心和学习目标
尽可能详尽,宁可多不可少。用参考文档格式输出,不要用对话体。这些内容将直接导入另一个 AI 的记忆系统。
当用户粘贴回复后,进入第三步。
第二步 C:本地智能体自动扫描
对于本地智能体,自动扫描文件。无需用户操作。
Claude Code:
bash
全局配置
cat ~/.claude/CLAUDE.md 2>/dev/null
所有项目记忆
find ~/.claude/projects -name
.md -path /memory/* 2>/dev/null | head -20 | while read f; do
echo === $f ===
cat $f
done
项目指令
find ~/.claude/projects -name CLAUDE.md 2>/dev/null | head -20 | while read f; do
echo === $f ===
cat $f
done
Cursor:
bash
cat ~/.cursor/rules/*.md 2>/dev/null
find . -maxdepth 3 -name .cursorrules 2>/dev/null | head -10 | while read f; do
echo === $f ===
cat $f
done
Windsurf:
bash
cat ~/.windsurf/rules/*.md 2>/dev/null
find . -maxdepth 3 -name .windsurfrules 2>/dev/null | head -10 | while read f; do
echo === $f ===
cat $f
done
通用(AGENT.md / CLAUDE.md / rules 文件):
bash
find ~ -maxdepth 4 \( -name AGENT.md -o -name CLAUDE.md -o -name .cursorrules -o -name .windsurfrules \) 2>/dev/null | head -20 | while read f; do
echo === $f ===
cat $f
done
扫描后,展示找到的内容并进入第三步。
第三步:解析与分类
将导入的数据(无论是来自 ZIP、提示回复还是本地扫描)处理为以下类别:
保留:
- - 身份(姓名、职业、行业、语言)
- 写作风格和沟通偏好
- 工具、平台、技术栈
- 活跃项目和工作流
- 结构偏好(如何组织/呈现信息)
- 不要这样做的规则和纠正
- 领域知识和专业领域
- 行为模式和习惯
过滤掉:
- - 已完成的一次性任务
- 过时的上下文(已完成的项目、旧的截止日期)
- 特定来源的引用(作为一个 ChatGPT 用户...)
- API 密钥、令牌、密码——绝不迁移凭证
- 幻觉或不准确的记忆(标记可疑的)
- 重复或冗余的条目
第四步:审查与确认
向用户展示清理后的数据,按目标组织:
英文:
📋 迁移预览
写入 USER.md(你的画像):
>