YMind Chat Visualizer
by @yslenjoy
Turn AI chat transcripts into interactive D3.js thinking maps with reasoning nodes, thinking shifts, and action items. Invoke this skill when the user shares...
clawhub install chat-visualizer-ymind๐ About This Skill
name: chat-visualizer-ymind description: Turn AI chat transcripts into interactive D3.js thinking maps with reasoning nodes, thinking shifts, and action items. Invoke this skill when the user shares a public share link from any AI chatbot or assistant (ChatGPT, Gemini, Claude, DeepSeek, Doubao, etc.), or pastes conversation text directly. Also applies when the user wants to visualize, analyze, or extract insights from a chat, even without explicit mention of a graph (e.g. "help me understand this chat", "what was decided here", "summarize the key takeaways").
Chat Visualizer - YMind
Version Check
Run once at the start of each skill session. First locate the script (works regardless of which client installed the skill):
find ~/.codex/skills ~/.claude/skills ~/.openclaw/skills ~/skills -maxdepth 3 -name "check-version.py" 2>/dev/null | head -1
Then run it with python3 .
UPDATE|X.X.X|Y.Y.Y|| โ tell the user in English:cd && git fetch && git checkout vY.Y.Y โ continue with current version?"
Wait for their reply before proceeding.Input
Two ways to get conversation data:
Way 1: Share URL (auto-fetch)
Requires Playwright. Check first:
python3 -c "import playwright" 2>/dev/null && echo "OK" || echo "NOT INSTALLED"
If not installed, ask: "Playwright ๅฏไปฅ่ชๅจๆๅๅฏน่ฏๅ
ๅฎน๏ผ่ฆ่ฃ
ๅ๏ผ๏ผpip install playwright && playwright install chromium๏ผไธๆฌกๆงๆไฝ๏ผ" If they decline, use Way 2.If available, fetch:
bash scripts/run.sh fetch ""
prints RUN_DIR โ read /raw_chat.json, use items[0].messages
ChatGPT 403: script retries with Playwright headed mode. If still fails, fall back to Way 2.
Way 2: Paste text (universal fallback)
User opens the conversation in browser โ Ctrl+A โ Ctrl+C โ pastes into chat. No share link needed โ any conversation page works.
When handling pasted text or a local JSON file:
1. Create run_dir manually. The suffix must always be _paste โ do not use the filename, title, or any other label:
YMIND_DIR="${YMIND_DIR:-$HOME/ymind-ws}"
RUN_DIR="$YMIND_DIR/$(date +%Y%m%d-%H%M%S)_paste"
mkdir -p "$RUN_DIR"
2. Parse the pasted text into messages (identify user vs AI turns by context), then write raw_chat.json in the same format as fetch produces:
{
"fetched_at": "...",
"items": [{
"url": null,
"provider": "paste",
"title": "...",
"messages": [{"role": "user", "content": "..."}, {"role": "assistant", "content": "..."}, ...],
"message_count": N
}]
}
3. Write meta.json: {"provider": "paste", "url": null, "created_at": "..."}
4. Proceed to Extract Graph using the parsed messages.Share Link Guide (Way 1 only)
Users often give the wrong link type. Correct them if needed:
| Platform | Share link โ | Wrong link โ |
|----------|-------------|-------------|
| ChatGPT | chatgpt.com/share/xxx | chatgpt.com/c/xxx (private chat URL) |
| Claude | claude.ai/share/xxx | claude.ai/chat/xxx (private chat URL) |
| Gemini | gemini.google.com/share/xxx or g.co/gemini/share/xxx | gemini.google.com/app/xxx (app URL) |
| DeepSeek | chat.deepseek.com/share/xxx | chat.deepseek.com/a/xxx (private chat URL) |
| Doubao | www.doubao.com/thread/xxx | www.doubao.com/chat/xxx (private chat URL) |
Note: g.co/gemini/share/... short links work โ script auto-resolves them.
Extract Graph
Read references/graph-schema.md for node types, edge types, label rules, and output schema.
Critical rules (non-obvious):
turn_id: assign actual turn number (1-based). One user message + one AI response = 1 turn โ not one message per turn. A 3-round conversation yields turn_id 1, 2, 3 only. Never default all nodes to the same value โ this drives horizontal spread in the D3 visualization.ใใ not curly quotes "" inside JSON values โ curly quotes break JSON parsing.Output
1. Write
Before proceeding: verify graph.json exists and contains at least one node. If extraction failed or produced an empty graph, delete entirely and stop โ do not render, do not update the index.
2. Render (path consistency rule: index root is auto-locked to dirname(, so graph and index always stay in the same workspace tree):
bash scripts/run.sh render
validates JSON, renders graph.html + graph.png (screenshot, requires Playwright)
then rebuilds /index.json and /index.html automatically
graph.html is a split-view output when raw_chat.json is present in : left panel shows the original conversation, right panel shows the thinking map. If raw_chat.json is absent, only the graph is shown (no split).
3. Output Markdown summary (format in references/graph-schema.md).
4. If running as a bot with chat output capability, send the graph image โ see Bot Send below.
Run dir files: raw_chat.json, graph.json, graph.html, graph.png (requires Playwright), meta.json.
Workspace files (auto-updated after every render, in the same root as ):
/index.json โ machine-readable session registry/index.html โ visual timeline index, opens each session's graph.htmlTo rebuild the index manually at any time:
bash scripts/run.sh index
Bot Send
If message tool is available and graph.png was generated, send the graph image (works on OpenClaw, Kimi Claw, and similar โ detect by tool availability):
graph.png is outside the bot's media allow-roots, copy it to /.outbox/ first, then send the copied path.message tool using the filePath (or media) field โ not as plain text, not as base64.Language Rule
All output (labels, summaries, analysis) must match the conversation language.
Setup
Minimal (paste text only โ zero dependencies):
No pip install needed. render-html.py is stdlib-only, and the paste path skips fetch-chat.py entirely.
Full (auto-fetch URLs + screenshot):
pip install requests playwright && playwright install chromium
Without Playwright: paste works fully, render produces graph.html but skips graph.png screenshot.
Notes
โ๏ธ Configuration
Minimal (paste text only โ zero dependencies):
No pip install needed. render-html.py is stdlib-only, and the paste path skips fetch-chat.py entirely.
Full (auto-fetch URLs + screenshot):
pip install requests playwright && playwright install chromium
Without Playwright: paste works fully, render produces graph.html but skips graph.png screenshot.