← Back to Skills Marketplace
djc00p

Chat History Importer

by Deonte Cooper · GitHub ↗ · v1.1.1 · MIT-0
linuxdarwinwin32 ✓ Security Clean
220
Downloads
1
Stars
0
Active Installs
9
Versions
Install in OpenClaw
/install 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, a...
README (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

Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install chat-history-importer
  3. After installation, invoke the skill by name or use /chat-history-importer
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug chat-history-importer
Version 1.1.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 9
Frequently Asked Questions

What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 220 downloads so far.

How do I install Chat History Importer?

Run "/install chat-history-importer" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Chat History Importer free?

Yes, Chat History Importer is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Chat History Importer support?

Chat History Importer is cross-platform and runs anywhere OpenClaw / Claude Code is available (linux, darwin, win32).

Who created Chat History Importer?

It is built and maintained by Deonte Cooper (@djc00p); the current version is v1.1.1.

💬 Comments