claude-desktop-chat-export
БесплатноЗапускает вложенные скриптыНе проверенExport a claude.ai (Claude Desktop / web) conversation and convert it to a Claude Code CLI JSONL session so it becomes resumable via `claude -r <sessionId>`…
от vicnaum★ 53 звезды на GitHubОб этом скилле
claude-desktop-chat-export
claude.ai chats aren't resumable — once you hit context limit or close the tab, the conversation is read-only. Claude Code CLI stores every session as JSONL at ~/.claude/projects/<encoded-cwd>/<sessionId>.jsonl and resumes via claude -r <sessionId>. This skill bridges the two: export a claude.ai conversation, convert it to CC's format, keep talking.
Same underlying model. Only the harness differs (system prompt, declared tools, output-length rules).
Workflow
Three stages: grab from the browser → organize → convert. The converter is scripts/convert_to_cli.py.
Two transport options for the "grab" stage:
- DevTools console — downloads
conversation.jsonandchat-images.zipto~/Downloadsvia the browser's download mechanism. Works when the user runs the snippets manually. - MCP + local relay — works when driving the browser via the
claude-in-chromeMCP. The MCP'sjavascript_toolreturn filters block cookie-like and base64 payloads, and extension-drivena.click()downloads don't land on disk. Solution: runscripts/relay_server.pylocally, have the browser POST each blob to it. See MCP path below.
1. Grab the conversation JSON + images from claude.ai
Requires an authenticated browser session at claude.ai. Use DevTools console or the claude-in-chrome MCP.
First, identify the org and conversation UUIDs:
- Org UUID: from
/api/bootstrap→memberships[0].organization.uuid - Conversation UUID: from the chat URL
Run in the browser console (on claude.ai, already logged in):
const ORG = '<your-org-uuid>';
const CONV = '<conversation-uuid>';
// Fetch full conversation
fetch(`/api/organizations/${ORG}/chat_conversations/${CONV}?tree=True&rendering_mode=messages&render_all_tools=true`,
{credentials:'include'})
.then(r => r.blob())
.then(b => { const a = document.createElement('a'); a.href = URL.createObjectURL(b); a.download = 'conversation.json'; a.click(); });
For images (API only serves webp previews — no originals):
// Load JSZip once:
await new Promise((res,rej)=>{ const s=document.createElement('script'); s.src='https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js'; s.onload=res; s.onerror=rej; document.head.appendChild(s); });
// Fetch + zip all images:
const convo = await (await fetch(`/api/organizations/${ORG}/chat_conversations/${CONV}?tree=True&rendering_mode=messages&render_all_tools=true`, {credentials:'include'})).json();
const images = [];
for (const m of convo.chat_messages) for (const f of (m.files||[])) if (f.file_kind==='image') images.push(f);
const zip = new JSZip();
for (const img of images) {
const r = await fetch(`/api/${ORG}/files/${img.file_uuid}/preview`, {credentials:'include'});
if (r.ok) zip.file(`${img.file_uuid}.webp`, await r.arrayBuffer());
}
const blob = await zip.generateAsync({type:'blob'});
const a = document.createElement('a'); a.href = URL.createObjectURL(blob); a.download = 'chat-images.zip'; a.click();
Chrome blocks a second auto-download from the same page — either run the two snippets in separate fresh tabs, or click "Allow" on the download-permission prompt.
MCP path (via relay)
When driving the browser via the claude-in-chrome MCP, use the bundled relay. Start it pointing at the target export directory:
python3 <skill-dir>/scripts/relay_server.py <export-dir>/<new-uuid>/ &
It listens on http://127.0.0.1:8765 by default and writes each POST body to <out-dir>/<X-Filename>. Nested paths like files/<uuid>.webp are preserved; .. / absolute paths are rejected.
Then, via javascript_tool on a claude.ai tab, POST the conversation JSON and each image blob:
// Conversation JSON
(async () => {
const ORG = '<org-uuid>';
const CONV = '<conversation-uuid>';
const r = await fetch(`/api/organizations/${ORG}/chat_conversations/${CONV}?tree=True&rendering_mode=messages&render_all_tools=true`, {credentials:'include'});
const blob = await r.blob();
const up = await fetch('http://127.0.0.1:8765/upload', {
method:'POST',
headers:{'Content-Type':'application/json','X-Filename':'conversation.json'},
body: blob
});
return {size: blob.size, relay: up.status};
})()
// All image previews, written to files/<uuid>.webp
(async () => {
const ORG = '<org-uuid>';
const CONV = '<conversation-uuid>';
const convo = await (await fetch(`/api/organizations/${ORG}/chat_conversations/${CONV}?tree=True&rendering_mode=messages&render_all_tools=true`, {credentials:'include'})).json();
const imgs = [];
for (const m of convo.chat_messages) for (const f of (m.files||[])) if (f.file_kind==='image') imgs.push(f.file_uuid);
let ok=0, fail=0;
for (const uuid of imgs) {
try {
const r = await fetch(`/api/${ORG}/files/${uuid}/preview`, {credentials:'include'});
if (!r.ok) { fail++; continue; }
const up = await fetch('http://127.0.0.1:8765/upload', {
method
Установить claude-desktop-chat-export в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл claude-desktop-chat-export?
Export a claude.ai (Claude Desktop / web) conversation and convert it to a Claude Code CLI JSONL session so it becomes resumable via `claude -r <sessionId>`. Use when the user wants to: (1) continue a claude.ai/Claude Desktop chat in Claude Code CLI, (2) import a web conversation into CC, (3) archive a claude.ai conversation locally with images and attachments, (4) unfreeze a claude.ai chat that hit its context limit, or (5) convert conversation.json from the claude.ai API to CC's JSONL envelope format. Triggers on mentions of exporting/importing Claude Desktop chats, resuming a web chat in CLI, conversation.json → JSONL, or claude.ai chat archival.
Как установить скилл claude-desktop-chat-export?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл claude-desktop-chat-export запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic