← 返回 Skills 市场
djc00p

Chat History Importer

作者 Deonte Cooper · GitHub ↗ · v1.1.1 · MIT-0
linuxdarwinwin32 ✓ 安全检测通过
220
总下载
1
收藏
0
当前安装
9
版本数
在 OpenClaw 中安装
/install chat-history-importer
功能描述
Import AI conversation exports (OpenAI ChatGPT and Anthropic Claude) into your agent's episodic memory. Parses export files, writes daily memory summaries, a...
使用说明 (SKILL.md)

Chat History Importer

Import years of AI conversations into searchable episodic memory. Parse ChatGPT and Claude exports and create dated daily memory files your agent can search and reference. Perfect for onboarding new agents with rich historical context or preserving important conversations for future recall. Pairs well with the chat-learnings-extractor skill for a complete conversation analysis workflow.

Quick Start

  1. Export from OpenAI: Settings → Data Controls → Export data → conversations.json
  2. Export from Anthropic: Settings → Privacy → Export data → conversations.json in zip
  3. Dry run first: python3 scripts/batch.py --dir ~/Downloads/chat_exports --dry-run
  4. Import: python3 scripts/batch.py --dir ~/Downloads/chat_exports

Key Concepts

  • Auto-detection: Identifies OpenAI vs Anthropic format automatically — no flags needed
  • Episodic memory: Writes daily summaries to memory/episodic/YYYY-MM-DD.md
  • Deduplication: Chat IDs tracked — re-running the same export never creates duplicates
  • OPENCLAW_WORKSPACE: Set this env var to point imports to the right agent workspace
  • Human speaker names: Memories are written as Kael: / Deonte: instead of assistant: / user: — auto-read from IDENTITY.md and USER.md in the workspace, making imported history feel like recalled conversations rather than raw log files

Common Usage

# Dry run — preview what would be imported without writing anything
python3 scripts/batch.py --dir ~/Downloads/chat_exports --dry-run

# Import all conversations
python3 scripts/batch.py --dir ~/Downloads/chat_exports

# Import only conversations since a date
python3 scripts/batch.py --dir ~/Downloads/chat_exports --since 2025-01-01

# Force a specific format (auto-detects by default)
python3 scripts/batch.py --dir ~/Downloads/chat_exports --format anthropic

# Override speaker names if IDENTITY.md / USER.md aren’t set up yet
python3 scripts/batch.py --dir ~/Downloads/chat_exports --agent-name "Ayo" --user-name "Deonte"

# Verbose — show message count + first user message per chat
python3 scripts/batch.py --dir ~/Downloads/chat_exports --dry-run --verbose

Tip: Use --dry-run --verbose first to see message counts and previews — great for identifying meaty conversations worth deeper analysis.

References

  • references/export-formats.md — Detailed OpenAI and Anthropic export formats, normalization rules

Original implementation by @djc00p

安全使用建议
This skill is internally consistent and does what it says: it parses local OpenAI/Anthropic export JSON files and appends daily summaries into an agent workspace. Before installing or running: 1) Run a dry run (python3 scripts/batch.py --dir <exports> --dry-run --verbose) to preview what will be written. 2) Note it will read IDENTITY.md and USER.md in your workspace (if present) and write to memory/episodic/YYYY-MM-DD.md — back up your workspace if you want. 3) The skill uses the OPENCLAW_WORKSPACE env var if set (not declared in metadata) to pick the workspace; set it explicitly if you want output to go somewhere specific. 4) There are no network calls or secret/env var requirements, so risk of silent exfiltration is low. If you need higher assurance, inspect and run the scripts in an isolated environment before adding to a long-running agent.
功能分析
Type: OpenClaw Skill Name: chat-history-importer Version: 1.1.1 The chat-history-importer skill is designed to parse OpenAI and Anthropic conversation exports and write them into an agent's episodic memory. The code in scripts/batch.py, scripts/parse_anthropic.py, and scripts/parse_openai.py performs standard JSON processing and file I/O consistent with the stated purpose. While batch.py uses subprocess.run to call internal parsing scripts, the inputs are validated or derived from local file discovery, and there is no evidence of network activity, data exfiltration, or malicious prompt injection.
能力评估
Purpose & Capability
Name/description align with the code: scripts parse OpenAI and Anthropic exports and write daily memory summaries. Minor inconsistency: SKILL.md documents use of OPENCLAW_WORKSPACE, but the skill metadata lists no required environment variables — the skill will still honor that env var at runtime but it is not declared in requires.env.
Instruction Scope
Runtime instructions and scripts operate on local export JSON files and the agent workspace: they read IDENTITY.md and USER.md (if present) and write summaries to memory/episodic/YYYY-MM-DD.md. The instructions do not reference unrelated system files, external endpoints, or broad data collection beyond imported conversations. The tool runs parser scripts via python3 subprocesses (local files).
Install Mechanism
No install spec — code is instruction-only and run locally with python3. There are no downloads or external installers, which is low risk. Ensure python3 is available on PATH as required.
Credentials
The skill requests no secrets or credentials and does not contact network endpoints. The only environment variable used is OPENCLAW_WORKSPACE (documented in SKILL.md but not declared in requires.env). This env var is proportionate to the task (selecting an agent workspace) but its absence from declared requirements is a minor metadata mismatch.
Persistence & Privilege
always is false and the skill does not attempt to modify other skills or global agent configuration. It writes to the agent workspace (memory/episodic) which is expected for its function; autonomous invocation is allowed by default but not accompanied by broad privileges or credential access.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install chat-history-importer
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /chat-history-importer 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.1
fix: sync local files after mid-publish cutoff — humanize speaker names now fully shipped. Reads IDENTITY.md + USER.md to write 'Kael:'/'Deonte:' instead of 'assistant:'/'user:' in episodic memory.
v1.1.0
feat: humanize speaker names — reads IDENTITY.md + USER.md to replace 'assistant:'/'user:' with real names (e.g. 'Kael:'/'Deonte:'). New --agent-name and --user-name CLI overrides.
v1.0.6
- No changes detected in this version; documentation and functionality remain unchanged.
v1.0.5
- Improved documentation in SKILL.md with expanded usage instructions and practical examples - Clarified key features, including auto-detection, episodic memory summaries, and deduplication - Added quick start guide for exporting data from OpenAI and Anthropic - Enhanced tips for dry runs and verbose mode to preview imports - Provided references to export format documentation for advanced users
v1.0.4
- Expanded SKILL.md documentation with improved explanations of use cases. - Added description of use for onboarding new agents and preserving conversations. - Included suggestion to pair with the chat-learnings-extractor skill. - No changes to core functionality or code.
v1.0.3
Fix OpenAI export parsing: handle new mapping-based message format (author.role + content.parts), skip metadata files (user.json, user_settings.json, export_manifest.json)
v1.0.2
Fix display name (no version number in title)
v1.0.1
Add --verbose flag: shows message count and first user message preview per chat. Useful for identifying conversations worth deeper analysis before running a learnings extractor.
v1.0.0
Initial release. Import OpenAI and Anthropic conversation exports into episodic memory. Auto-detects format, deduplicates on re-runs.
元数据
Slug chat-history-importer
版本 1.1.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 9
常见问题

Chat History Importer 是什么?

Import AI conversation exports (OpenAI ChatGPT and Anthropic Claude) into your agent's episodic memory. Parses export files, writes daily memory summaries, a... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 220 次。

如何安装 Chat History Importer?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install chat-history-importer」即可一键安装,无需额外配置。

Chat History Importer 是免费的吗?

是的,Chat History Importer 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Chat History Importer 支持哪些平台?

Chat History Importer 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(linux, darwin, win32)。

谁开发了 Chat History Importer?

由 Deonte Cooper(@djc00p)开发并维护,当前版本 v1.1.1。

💬 留言讨论