Logo Extract Chatgpt Transcript

Extract Chatgpt Transcript

Cộng đồng
ShawhinT
extract-chatgpt-transcript

Extract the full text of a shared ChatGPT conversation and save it as a clean Markdown transcript. Use whenever Shaw shares a chatgpt.com/share/... link (or asks to "scrape this convo", "save this ChatGPT chat", "grab the transcript", "pull the full conversation", "copy this whole chat to a file"). Also fires when a naive copy/paste or reader-mode grab of a ChatGPT share only returns part of the thread and Shaw says "that's not the full thing." Handles the virtualization gotcha that hides most turns from a single read. Do NOT use for Claude share links, generic web articles (use a normal fetch), or live (non-shared) ChatGPT sessions that require login.

Tổng quan

Nhà phát hànhShawhinT
Kho mãnon-coding-skills
Tên kỹ năngextract-chatgpt-transcript
Sao
39
Bản fork
6
Tệp đi kèm
Chỉ có hướng dẫn
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Đầy đủ trong hướng dẫn

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được ShawhinT công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Extract Chatgpt Transcript trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/ShawhinT/non-coding-skills/tree/main/extract-chatgpt-transcript
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ShawhinT/non-coding-skills.git /tmp/non-coding-skills
mkdir -p .claude/skills
cp -r /tmp/non-coding-skills/extract-chatgpt-transcript .claude/skills/extract-chatgpt-transcript
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Extract Chatgpt Transcript trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Extract Chatgpt Transcript ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Extract Chatgpt Transcript không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Extract ChatGPT Transcript

Turn a shared ChatGPT conversation into a complete, faithful Markdown transcript.

The core problem: virtualization

ChatGPT share pages (chatgpt.com/share/...) are client-rendered AND virtualized: only the handful of conversation turns near the viewport are mounted in the DOM at any moment (often ~7 of 80+). Everything else is an empty wrapper. This is why the easy methods fail:

  • A plain web_fetch returns only the page shell (no conversation — it's JS-rendered).
  • get_page_text / reader-mode returns only the currently-rendered slice, usually the bottom of the thread.
  • Manual select-all + copy misses off-screen turns for the same reason.

So the reliable method is: scroll the whole thread top-to-bottom and capture each turn as it mounts, keyed by turn ID so nothing is deduped or lost.

Procedure

Use the Claude in Chrome tools (load via ToolSearch if deferred: mcp__claude-in-chrome__navigate, mcp__claude-in-chrome__javascript_tool, mcp__claude-in-chrome__tabs_context_mcp, mcp__claude-in-chrome__computer).

1. Navigate

Open the share URL in a new MCP tab. Note the returned tabId.

2. Probe the structure

Confirm the turn selector and find the scroll container:

js
(() => {
  const turns = document.querySelectorAll('[data-testid^="conversation-turn"]');
  const scrollers = [...document.querySelectorAll('*')]
    .filter(e => e.scrollHeight > e.clientHeight + 400 && e.clientHeight > 200)
    .map(e => ({tag:e.tagName, sh:e.scrollHeight, ch:e.clientHeight}));
  return JSON.stringify({turnCount: turns.length,
    withText: [...turns].filter(t=>(t.innerText||'').trim()).length, scrollers});
})()

Turns are [data-testid^="conversation-turn"] with ids like conversation-turn-1. Roles live on a child [data-message-author-role]. The scroll container is the element with the largest scrollHeight (usually a DIV wrapping <main>).

3. Install a persistent collector

Set up a Map keyed by turn testid so identical short turns ("Mmm.", "Right.") are NOT collapsed, and scroll to the top:

js
(() => {
  window.__map = new Map();
  window.__scroller = [...document.querySelectorAll('*')]
    .filter(e => e.scrollHeight > e.clientHeight + 400 && e.clientHeight > 200)
    .sort((a,b)=>b.scrollHeight-a.scrollHeight)[0];
  window.__collect = () => {
    document.querySelectorAll('[data-testid^="conversation-turn"]').forEach(t => {
      const key = t.getAttribute('data-testid');
      const roleEl = t.querySelector('[data-message-author-role]');
      const role = roleEl ? roleEl.getAttribute('data-message-author-role') : '';
      const text = (t.innerText||'').trim();
      if (text) window.__map.set(key, {role, text});
    });
  };
  window.__scroller.scrollTop = 0;
  window.__collect();
  return JSON.stringify({sh: window.__scroller.scrollHeight, size: window.__map.size});
})()

4. Sweep top-to-bottom

Run this loop, then wait and re-check window.__map.size. The Chrome javascript_tool does NOT await an async IIFE's return (it returns {} immediately), but the loop keeps running in the background — so fire it, wait ~8s, then read the size. Re-run the sweep if not yet at the bottom.

js
(async () => {
  const s = window.__scroller;
  for (let i=0;i<40;i++){
    window.__collect();
    if (s.scrollTop + s.clientHeight >= s.scrollHeight - 5) break;
    s.scrollTop += 550;
    await new Promise(r=>setTimeout(r,350));
  }
  window.__collect();
})()

Check progress: JSON.stringify({size: window.__map.size, top: window.__scroller.scrollTop, sh: window.__scroller.scrollHeight, atBottom: (window.__scroller.scrollTop+window.__scroller.clientHeight >= window.__scroller.scrollHeight-5)})

Keep sweeping until size equals the turnCount from step 2 and atBottom is true.

5. Serialize

Order turns by the numeric suffix of their testid and build the output string:

js
(() => {
  const entries = [...window.__map.entries()].sort((a,b)=>
    parseInt((a[0].match(/(\d+)$/)||[])[1]||0) - parseInt((b[0].match(/(\d+)$/)||[])[1]||0));
  window.__out = entries.map(([k,v]) => {
    const role = v.role==='user' ? 'USER' : v.role==='assistant' ? 'ASSISTANT' : (v.role?v.role.toUpperCase():'MSG');
    return `**${role}:** ${v.text}`;
  }).join('\n\n');
  return JSON.stringify({turns: entries.length, chars: window.__out.length});
})()

6. Pull the text out in slices

javascript_tool caps each response at ~1,000 chars, so read window.__out in ~900-char windows, batched several per browser_batch call:

js
window.__out.slice(0,900)     // then 900..1800, 1800..2700, ...

Concatenate the slices, then write to a .md file in outputs and present it.

Output format

Save as Markdown (<slug>-transcript.md). Header with the title (from document.title) and the source link. Then turn-by-turn with **USER:** / **ASSISTANT:** labels. Preserve voice-transcribed answers verbatim, including disfluencies — do not clean them up unless asked. Group into logical sections (e.g. "Voice Interview", "Extraction") only if the conversation clearly has them.

Gotchas checklist

  • Don't trust a single get_page_text — always compare its turn count to the [data-testid^="conversation-turn"] count. If it's short, virtualization bit you.
  • Keying by testid (not by text) is essential; podcast-style threads repeat short backchannels that a text-based Set would merge.
  • The async sweep returns {} — that's normal. Poll window.__map.size after a wait.
  • If the account requires login or it's a live (non-share) chat, this won't work; ask Shaw to use the share link.

Câu hỏi thường gặp

Kỹ năng AI Extract Chatgpt Transcript làm được gì?

Extract the full text of a shared ChatGPT conversation and save it as a clean Markdown transcript. Use whenever Shaw shares a chatgpt.com/share/... link (or asks to "scrape this convo", "save this ChatGPT chat", "grab the transcript", "pull the full conversation", "copy this whole chat to a file"). Also fires when a naive copy/paste or reader-mode grab of a ChatGPT share only returns part of the thread and Shaw says "that's not the full thing." Handles the virtualization gotcha that hides most turns from a single read. Do NOT use for Claude share links, generic web articles (use a normal fe...

Vì sao nên dùng Extract Chatgpt Transcript trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Extract Chatgpt Transcript là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Extract Chatgpt Transcript trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/ShawhinT/non-coding-skills/tree/main/extract-chatgpt-transcript. TypingMind đọc tệp SKILL.md và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Extract Chatgpt Transcript?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Extract Chatgpt Transcript với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Extract Chatgpt Transcript với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Extract Chatgpt Transcript có miễn phí không?

Kỹ năng này được ShawhinT phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇