Archive Claude.ai conversations to local org-mode files and replace raw Claude URLs in your notes with proper Org id: links.
-
archiver.py— Syncs all your Claude chats (plain + project) to~/org/claude_exports/as.orgfiles, including thinking blocks, artifacts, attachments, and deep-research citations. Reads from your live Claude.ai session via Playwright — no API keys needed. -
claude-archiver.el— Emacs command that finds rawhttps://claude.ai/chat/<id>URLs across yourorg-directoryand replaces them with[[id:<id>][<title>]]links that resolve to the archived chat files.
# Install uv if you haven't
curl -LsSf https://astral.sh/uv/install.sh | sh
# Run (symlink run.sh to ~/bin/claude-archiver for convenience)
./run.sh ~/org/claude_exportsRequirements:
- Playwriter Chrome extension installed and enabled on your Claude.ai tab
playwriterCLI on PATH (npm i -g playwriter)pandocon PATH (for markdown → org conversion)
;; In your Emacs config:
(load-file "/path/to/claude-archiver.el")
;; Required: archived chat files must be in org-id-extra-files
(setq org-id-track-globally t)
(setq org-id-extra-files
(directory-files-recursively "~/org/claude_exports" "\\.org\\'"))
;; Keep exports dir out of org-agenda-filesThen run M-x claude-archiver-replace-links. First invocation previews; second invocation applies.
M-x claude-archiver-replace-links→ select your exports directory- Preview buffer shows each raw Claude URL with its proposed
[[id:...][Title]]replacement RETjumps to source,n/pnavigate entries- Run
M-x claude-archiver-replace-linksagain to apply all resolved replacements - If any source buffer is modified, you'll be prompted before editing
Replacements use id: links backed by the :ID: property that archiver.py already writes in each chat file's top heading. No new GUIDs are generated.
URLs inside source blocks, example blocks, comments, drawers, existing bracket links, and inline code/verbatim are not touched.
claude_exports/
manifest.json
chats/
My Chat/
My Chat.org
attachments/
artifacts/
projects/
My Project/
instructions.txt
memory.org
docs/
files/
chats/
Project Chat/
Project Chat.org
Each .org chat file has a top-level heading with :ID:, :URL:, and :ARCHIVED: properties, followed by ** Human / ** Claude subtrees with timestamps.
Re-running the archiver only fetches chats whose current_leaf_message_uuid has changed since the last run. Project instructions, memory, docs, and files are synced by content hash.
archiver.py — Python orchestrator
claude-archiver.el — Emacs link replacement
regenerable-api/
api_client.js — JS helpers injected into Claude.ai (GENERATED — see .opencode/skills/)
pyproject.toml
run.sh