Logo von Chatgpt Chat Export

Chatgpt Chat Export

Community
vicnaum
chatgpt-chat-export

Export a chatgpt.com (ChatGPT web) conversation to disk with full fidelity: raw backend-api JSON, all attachments (user-uploaded images, PDFs), and a readable Markdown transcript. Use when the user wants to: (1) grab/download/archive a ChatGPT talk locally, (2) pull a chatgpt.com conversation's JSON via the API route, (3) download the images/PDFs attached to a ChatGPT chat, (4) convert a ChatGPT conversation to Markdown, or (5) feed a ChatGPT conversation into another tool/agent. Triggers on chatgpt.com URLs (/c/<uuid>), 'grab this talk', 'export this ChatGPT chat', 'ChatGPT conversation JSON', or ChatGPT attachment downloads.

Add to TypingMind

Übersicht

Herausgebervicnaum
Repositoryvics-agent-skills
Skill-Namechatgpt-chat-export
Sterne
53
Forks
5
Mitgelieferte Dateien
3
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • Mitgelieferte Dateien: 3

    Skripte, Vorlagen und Referenzmaterial, die das Modell bei der Arbeit lesen kann. Die Dateien sind schreibgeschützt und werden niemals ausgeführt.

  • Open Source

    Von vicnaum auf GitHub veröffentlicht. Prüfen Sie vor der Installation die Quelldateien.

Installation

Installieren Sie den KI-Skill Chatgpt Chat Export in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner. Dabei liest die App SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/vicnaum/vics-agent-skills/tree/main/skills/chatgpt-chat-export
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill hinzufügen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format unterstützt, kann diesen Skill nutzen. Kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/vicnaum/vics-agent-skills.git /tmp/vics-agent-skills
mkdir -p .claude/skills
cp -r /tmp/vics-agent-skills/skills/chatgpt-chat-export .claude/skills/chatgpt-chat-export
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Chatgpt Chat Export in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Chatgpt Chat Export automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Chatgpt Chat Export nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Schlüsseln.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

chatgpt-chat-export

ChatGPT's web UI has no full-fidelity export (Settings → Export mails a zip of everything, hours later). But the page itself talks to /backend-api/conversation/{id}, which returns the complete conversation as JSON — including edit branches, tool calls, reasoning scaffolding, and attachment references. This skill grabs that JSON plus every attachment from an authenticated Chrome session, and converts it to Markdown.

Output convention (one folder per conversation, named by UUID):

<project>/chat-exports/<conversation-uuid>/
├── conversation.json   ← raw /backend-api/conversation response, full fidelity
├── conversation.md     ← readable transcript (chatgpt2md.py)
├── FILES.md            ← attachment index: file id → name → local path
└── files/              ← binaries, by original filename

Workflow

Four stages: grab JSON → grab attachments → organize → convert. Two transport paths for the "grab" stages, depending on who drives the browser:

  • DevTools console (user runs snippets manually): Blob + <a download> clicks land in ~/Downloads. Simple, but Chrome blocks the 2nd+ programmatic download per tab — use a fresh tab per download, or bundle everything into one zip.
  • claude-in-chrome MCP (agent drives): a.click() downloads don't land on disk, javascript_tool results truncate at ~1000 chars, and the extension's DLP filter replaces JWT-shaped / base64 / query-string / long-uniform output with [BLOCKED: …]. Transport out via clipboard (primary — needs no network) or the bundled scripts/relay_server.py (blocked by uBlock's LAN-protection on some setups; see below).

Iron rule for the MCP path: never return the access token or a payload from javascript_tool. Stash everything in window.* and return only metadata (status, length, count).

1. Grab the conversation JSON

Conversation UUID comes from the URL: chatgpt.com/c/<uuid>. Open that page (logged in), then:

js
// In-page: token + conversation -> window.__conv. Returns only metadata.
const sess = await fetch('/api/auth/session').then(r => r.json());
window.__tok = sess.accessToken;
const CONV = '<conversation-uuid>';
window.__conv = await fetch('/backend-api/conversation/' + CONV,
  {headers: {Authorization: 'Bearer ' + window.__tok}}).then(r => r.json());
JSON.stringify({title: window.__conv.title, nodes: Object.keys(window.__conv.mapping || {}).length});

Transport — clipboard (MCP path). navigator.clipboard.writeText requires document focus and a user gesture, which javascript_tool doesn't have. Inject a full-page button and click it with the computer tool:

js
document.body.innerHTML = '<button id="copybtn" style="position:fixed;inset:0;width:100vw;height:100vh;font-size:40px">COPY</button><div id="st" style="position:fixed;bottom:0;left:0;background:#000;color:#0f0;padding:8px;z-index:9">waiting</div>';
window.__payload = JSON.stringify(window.__conv);
document.getElementById('copybtn').addEventListener('click', async () => {
  try { await navigator.clipboard.writeText(window.__payload);
        document.getElementById('st').textContent = 'COPIED ' + window.__payload.length; }
  catch (e) { document.getElementById('st').textContent = 'ERR ' + e.message; }
});
'ready';

Then: computer left_click anywhere on the page → verify via document.getElementById('st').textContent → on the shell side:

bash
pbpaste > chat-exports/<uuid>/conversation.json
python3 -c "import json; d=json.load(open('chat-exports/<uuid>/conversation.json')); print(d['title'], len(d['mapping']))"

Clipboard handles ~10 MB fine. Clear it afterwards (printf '' | pbcopy) — and warn the user their clipboard was overwritten.

Transport — console download (manual path):

js
const blob = new Blob([JSON.stringify(window.__conv)], {type: 'application/json'});
const a = document.createElement('a'); a.href = URL.createObjectURL(blob);
a.download = 'conversation.json'; a.click();

2. Grab the attachments

Attachment references live in two places in the JSON:

  • mapping[*].message.metadata.attachments[] → {id, name, mime_type, size} (user uploads: images, PDFs)
  • image parts' content.parts[*].asset_pointer → sediment://file_… (same files, by pointer)

Resolve each id to a download URL in-page:

GET /backend-api/conversation/{conv-id}/attachment/{file-id}/download   (Bearer auth)
→ {download_url, file_name, mime_type, file_size_bytes}

The download_url is NOT a signed CDN link — it's chatgpt.com/backend-api/estuary/content?id=…, which needs the browser's auth. curl from outside fails (exit 56). So fetch the bytes in-page and bundle them:

js
// window.__files = [{id, name}] built from window.__conv (dedupe by id first)
const toB64 = (blob) => new Promise((res, rej) => {
  const fr = new FileReader();
  fr.onload = () => res(fr.result.split(',')[1]); fr.onerror = rej;
  fr.readAsDataURL(blob);
});
const CONV = '<conversation-uuid>';
const bundle = {};
for (const f of window.__files) {
  const meta = await fetch('/backend-api/conversation/' + CONV + '/attachment/' + f.id + '/download',
    {headers: {Authorization: 'Bearer ' + window.__tok}}).then(r => r.json());
  const blob = await fetch(meta.download_url, {headers: {Authorization: 'Bearer ' + window.__tok}}).then(r => r.blob());
  bundle[f.name || f.id] = await toB64(blob);
}
window.__payload = JSON.stringify(bundle);
'bundled ' + Object.keys(bundle).length + ' files, ' + window.__payload.length + ' chars';

Then reuse the same copy button (it copies window.__payload), click, and unpack:

bash
python3 <skill-dir>/scripts/unpack_clipboard.py chat-exports/<uuid>/files/

On the manual console path, zip the bundle client-side instead (JSZip from CDN, one <a download> click for the whole zip — sidesteps the multi-download block; see the sibling claude-desktop-chat-export skill for the JSZip snippet).

Known 403: PDF page-preview pointers of the form sediment://<hash>#file_…#p_N.jpg (tool-rendered page images) are not downloadable — skip them; the source PDF itself downloads fine via its plain file_… id.

3. Convert to Markdown

bash
python3 <skill-dir>/scripts/chatgpt2md.py chat-exports/<uuid>/conversation.json
# → conversation.md + FILES.md next to the JSON; images/PDFs linked into files/

The converter walks the canonical branch only (current_node → .parent → root — the mapping is a tree with edit branches, not a list), keeps only visible turns (user × text|multimodal_text, assistant × text with recipient == 'all'), and drops internal scaffolding (thoughts, code/web.run tool calls, reasoning_recap, hidden system messages). ChatGPT embeds citation markers as private-use-area Unicode (… around citeturn0search1-style tokens) — these are stripped, as are leftover products{…} carousel blobs. Flags: --user-name, --files-dir, --out, --no-files-md.

Note: the generic ai-conversation-extractor skill does not handle this mapping-tree format — use this converter for chatgpt.com JSON.

Gotchas (hard-won)

  • MCP output filter: results truncate ~1000 chars; JWT/base64/query-string/long-uniform text → [BLOCKED: …]. Even 'x'.repeat(30000) triggers the base64 heuristic. Route data through window.* + clipboard/relay/download, never through tool results.
  • uBlock Origin (Lite) LAN-block: page fetches from chatgpt.com to http://127.0.0.1:* throw Failed to fetch (stack shows uBlock's fetch wrapper). This kills the relay transport — clipboard is the reliable default. (scripts/relay_server.py is bundled for setups without uBlock.)
  • Clipboard needs focus + gesture: writeText from bare javascript_tool fails with NotAllowedError: Document is not focused — hence the injected button + real computer click.
  • Chrome multi-download guard (manual path): the 2nd+ programmatic a.click() download in a tab silently does nothing. Fresh tab per download (reload is NOT enough), or one zip.
  • get_page_text fallback for text-only payloads: inject <pre> chunks (~45k chars each) into the DOM and read them back — works, but costs one round-trip per chunk and floods agent context; last resort.
  • Wiping the DOM is safe: document.body.innerHTML = … on the conversation page doesn't touch window.__conv / window.__tok, and auth cookies keep working for in-page fetches.

Requirements

  • Chrome logged into chatgpt.com; for the MCP path, the claude-in-chrome extension.
  • No external Python dependencies — stdlib only (Python 3.9+).
  • Clipboard shell access: pbpaste/pbcopy (macOS) or xclip/wl-paste (Linux, use --stdin on the unpacker).

Mitgelieferte Dateien

Das Modell liest diese Dateien bei Bedarf, während der Skill geladen ist. Sie werden als lesbare Dateien bereitgestellt und niemals ausgeführt.

Häufig gestellte Fragen

Was macht der KI-Skill Chatgpt Chat Export?

Export a chatgpt.com (ChatGPT web) conversation to disk with full fidelity: raw backend-api JSON, all attachments (user-uploaded images, PDFs), and a readable Markdown transcript. Use when the user wants to: (1) grab/download/archive a ChatGPT talk locally, (2) pull a chatgpt.com conversation's JSON via the API route, (3) download the images/PDFs attached to a ChatGPT chat, (4) convert a ChatGPT conversation to Markdown, or (5) feed a ChatGPT conversation into another tool/agent. Triggers on chatgpt.com URLs (/c/<uuid>), 'grab this talk', 'export this ChatGPT chat', 'ChatGPT conversation JS...

Warum Chatgpt Chat Export in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Chatgpt Chat Export besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Chatgpt Chat Export in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/vicnaum/vics-agent-skills/tree/main/skills/chatgpt-chat-export ein. TypingMind liest die Datei SKILL.md, bündelt die zugehörigen Dateien und installiert alles als Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Chatgpt Chat Export nutzen?

Jedes Modell, das Sie mit TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Chatgpt Chat Export verwenden?

So viele Sie möchten. In TypingMind können Sie Chatgpt Chat Export mit jedem Modell verwenden, das Skills unterstützt, etwa mit GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama. Dabei nutzen Sie Ihre eigenen API-Schlüssel.

Ist der KI-Skill Chatgpt Chat Export kostenlos?

Der Skill wird von vicnaum auf GitHub veröffentlicht. Prüfen Sie im Repository, ob dort Lizenzbedingungen angegeben sind. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: Die Datei SKILL.md enthält den Namen und die Beschreibung des Skills. Hinzu kommen bei Bedarf Skripte, Vorlagen oder Referenzdateien für das Modell. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und kommen daher ohne Server, API-Schlüssel und Laufzeitumgebung aus. Sie funktionieren mit jedem Modell.

Alle anzeigen

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇