/chatgpt-importer:capture-via-domfrom chatgpt-importer
Fallback capture of a ChatGPT conversation by scraping the rendered DOM with scrolling. Use only when capture-via-api fails. Lossy - no timestamps, branches, tool messages or artifact payloads.
Ships in chatgpt-importer. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Fallback only. Use after capture-via-api has actually failed, not
instead of trying it. When you use this route, tell the user the capture is
lossy and why.
The message list is virtualised. On a 34-message thread only about five
messages exist in the DOM at any scroll position, and data-testid indices
start wherever the viewport happens to be — conversation-turn-6, not -1.
A single-pass querySelectorAll therefore returns a handful of messages and
looks like a complete short conversation. That is the failure worth guarding
against: it does not error, it just silently returns a fraction.
The script scrolls the container from the top and accumulates by
data-message-id, which handles the virtualisation. It still cannot recover:
created_at is null throughout)${CLAUDE_PLUGIN_ROOT}/scripts/browser/capture-via-dom.js and pass it
to javascript_tool. Scrolling takes several seconds on a long thread.normalize_conversation.py and go straight to a
renderer.Scroll capture is the kind of thing that half-works. Before rendering, sanity check:
python3 -c "import json,sys; d=json.load(open(sys.argv[1])); s=d['stats']; \
print(s['total_turns'],'turns',s['user_messages'],'user',s['assistant_messages'],'assistant')" <file>
Compare against what the user says the thread contains, and against the turn counter visible in the ChatGPT UI. If the count looks short, scroll to the top of the thread manually and re-run rather than accepting it.
stats.capture_is_lossy is true in every file this route produces, and
unhandled carries a note explaining what is missing. Leave both in place —
they are how a later reader knows the transcript is partial.
What SKILL.md sets; muted values are Claude Code's defaults
12 skills in this plugin
/capture-via-apiCapture a ChatGPT conversation as raw JSON by calling the authenticated backend API from inside the browser tab. Use when importing from a chatgpt.com/c/ URL or a /share/ link. This is the primary, complete capture route./conversation-to-contextImport a ChatGPT conversation into the current repository as agent context. Use when the user wants to bring a ChatGPT thread into a project, pull a chat into context, or save a conversation for Claude to read later. Writes a Markdown transcript to context/ with the human labelled User./export-all-conversationsBatch-export ChatGPT conversations (a priority subset, or incremental updates; a whole large history is rate-limited, so use the official export for that) (every chat, archived chats and chats inside Projects, all workspaces the login sees) from a logged-in chatgpt.com tab, then build one Parquet table with a row per conversation and a date column, optionally pushed to a private Hugging Face dataset. Use on "export all my ChatGPT chats", "batch export", "mine my ChatGPT history", "make a dataset of my chats", or when the official export is slow or refused./extract-artifactsPull generated documents, canvas docs, code blocks, images and attachments out of an imported ChatGPT conversation and save them as real files. Use when a conversation produced a document, code, or images worth keeping separately./extract-sourcesCollect the sources a ChatGPT conversation cited into a de-duplicated list, as a sources section, footnotes, or a standalone bibliography. Use when the user wants the references, links or citations from a chat./import-chatgpt-conversationImport a ChatGPT conversation into local files. Use when the user gives a chatgpt.com URL or shared link, asks to save/export/archive a ChatGPT chat, wants a transcript with user and assistant turns marked, or wants a ChatGPT thread as Markdown, JSON or PDF. Routes to the right capture and render path.Other plugins' skills for the same job
chatgpt-importer@danielrosehill is listed by danielrosehill/claude-code-plugins — review the source before installing
npx claudepluginhub danielrosehill/claude-code-plugins --plugin chatgpt-importer