chat-history-importer

Pass

Import AI conversation exports (OpenAI ChatGPT and Anthropic Claude) into your agent's episodic memory. Parses export files, writes daily memory summaries, and deduplicates on re-runs. Trigger phrases: import chat history, ingest conversation export, import chatgpt export, import claude export, load AI conversation history.

@openclaw
MIT4/29/2026
72out of 100
(0)
4.5k
1
1

Install Skill

Skills are third-party code from public GitHub repositories. SkillHub scans for known malicious patterns but cannot guarantee safety. Review the source code before installing.

Install globally (user-level):

npx skillhub install openclaw/skills/chat-history-importer

Install in current project:

npx skillhub install openclaw/skills/chat-history-importer --project

Suggested path: ~/.claude/skills/chat-history-importer/

AI Review

Instruction Quality75
Description Precision76
Usefulness65
Technical Soundness72

SKILL.md Content

---
name: chat-history-importer
description: "Import AI conversation exports (OpenAI ChatGPT and Anthropic Claude) into your agent's episodic memory. Parses export files, writes daily memory summaries, and deduplicates on re-runs. Trigger phrases: import chat history, ingest conversation export, import chatgpt export, import claude export, load AI conversation history."
metadata: {"clawdbot":{"emoji":"πŸ“₯","requires":{"bins":["python3"]},"env":[],"os":["linux","darwin","win32"],"homepage":"https://clawhub.com/djc00p/chat-history-importer"}}
---

# 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](https://clawhub.ai/djc00p/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

```text
# 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**