/chatgpt-importer:capture-via-apifrom chatgpt-importer
Capture 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.
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.
Runs a fetch in the page's own context, so it inherits the logged-in session. Returns the complete conversation: every message, timestamps, model slugs, tool calls, artifact payloads and all branches.
ToolSearch "select:mcp__claude-in-chrome__tabs_context_mcp,mcp__claude-in-chrome__tabs_create_mcp,mcp__claude-in-chrome__navigate,mcp__claude-in-chrome__javascript_tool"
tabs_context_mcp for tab ids, then tabs_create_mcp for a fresh tab
unless the user asked to use one they already have open.navigate to the conversation URL. Wait for it to settle.${CLAUDE_PLUGIN_ROOT}/scripts/browser/capture-via-api.js and pass its
contents to javascript_tool.Success looks like:
{"ok":true,"filename":"chatgpt-conversation-<id>.json","bytes":126173,
"nodes":35,"roles":{"user":17,"assistant":17},"branch_points":0,"leaves":1}
Only the summary comes back. The conversation body goes to disk on purpose — returning it would copy a private thread into the transcript and spend a large amount of context on something no one needs to read in-band.
branch_points > 0 means the thread has edited or regenerated turns. The
normalizer renders the branch the UI last displayed and reports the rest in
stats. Say so when reporting, because the user may want a different branch.
Do not assume ~/Downloads. Chrome's download directory is a per-profile
setting and is not always the default — ~/Desktop is a common alternative.
Locate the file by name instead:
find ~ -maxdepth 3 -name 'chatgpt-conversation-*.json' -mmin -3 2>/dev/null
Move it out of the download directory before working on it — those folders get cleaned, and the file is private.
| Returned | Meaning | Do next |
|---|---|---|
{} | The snippet lost its await prefix | Re-run with the file's exact contents |
not_authenticated | No accessToken from /api/auth/session | Ask the user to log in to chatgpt.com in this Chrome profile; do not attempt to log in yourself |
http_401 / http_403 | Token expired, or the conversation belongs to another account | Ask the user to reload the tab |
http_404 | Wrong id, or a deleted conversation | Re-check the URL |
not_on_a_conversation_page | Tab is on the chat list, not a thread | Navigate to the /c/<id> URL |
no_mapping_in_payload | Response shape changed | Fall back to capture-via-dom and flag that the API route needs updating |
Never enter credentials. If the account is logged out, that is the user's job.
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-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./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.chatgpt-importer@danielrosehill is listed by danielrosehill/claude-code-plugins — review the source before installing
npx claudepluginhub danielrosehill/claude-code-plugins --plugin chatgpt-importer