/chatgpt-importer:import-chatgpt-conversationfrom chatgpt-importer
Import 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.
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.
The entry point. Pick a capture route, normalize, then render. Do not improvise a parser — the scripts exist and have been tested against the real format.
Every route converges on one intermediate file, then diverges into renderers:
capture ──> raw JSON ──> normalize_conversation.py ──> normalized JSON ──┬─> render_conversation.py (Markdown)
├─> render_pdf.py (PDF via Typst)
└─> redact_conversation.py (then render)
Normalized JSON is the thing to keep. It is the only format that holds turn roles, timestamps, artifacts, citations and stats together, and every renderer reads it.
| Input the user gives you | Route | Skill |
|---|---|---|
chatgpt.com/c/<id> URL, or "the chat I have open" | Authenticated backend API in the browser | capture-via-api |
chatgpt.com/share/<id> link | Same script, no token needed | capture-via-api |
An export .zip or conversations.json | Local file, no browser | import-export-archive |
| API route failed or was removed | DOM scrape | capture-via-dom |
Always try capture-via-api first for a URL. It returns the complete thread
including branches, timestamps and artifact payloads. The DOM route is lossy
and is a fallback, not an alternative — see capture-via-dom for what it
cannot get.
Ask only if the user has not already implied it:
conversation-to-context. This is the
common case. Label the human User, write Markdown to context/.render-typst-pdf.render-markdown.redact-conversation first.If the conversation contains generated documents or images, mention
extract-artifacts; canvas documents are worth saving as their own files.
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/normalize_conversation.py" \
<raw.json> -o <normalized.json> --url "<source url>"
The script prints N turns (U user / A assistant), K artifacts to stderr.
Check that against what the capture reported. A mismatch means the
branch walk picked a different leaf, not that messages vanished.mapping is a DAG, not a list. It contains abandoned edit branches and
regenerated answers that were never part of the thread the user saw.
Iterating mapping.values() produces a transcript that reads as if the user
said contradictory things. The normalizer walks parent links from
current_node; do not replace that with a flat iteration..gitignore covers
the usual output paths, but check before staging anything.grep -cE '<(box|row|Cite|Entity|AsyncImage|Link)\b|[\ue200-\ue203]' <out.md>
should print 0. The normalizer handles these (stats.rich_ui_turns counts
them), but a new component type would show up here before it reaches
.unhandled. If any remain, extend resolve_pua_markers /
convert_genui_tags and document the new kind in
references/chatgpt-conversation-format.md.normalize_conversation.py warns about unhandled content blocks, look at
.unhandled in the output. It means OpenAI shipped a content type the
importer does not know, and something is missing from the transcript.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
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./capture-via-domFallback 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./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.chatgpt-importer@danielrosehill is listed by danielrosehill/claude-code-plugins — review the source before installing
npx claudepluginhub danielrosehill/claude-code-plugins --plugin chatgpt-importer