x-grok-to-obsidian
Export Grok conversations from X (x.com) via browser-network capture and convert them into Obsidian-ready Markdown files. Use when a user wants to back up Grok chat history, preser…
Tomas Hajek
@hajekt2
What This Skill Does
Exports Grok conversations from X (x.com) by capturing network responses in the browser, then converts the saved JSON into Obsidian Markdown files with YAML frontmatter and preserved User/Grok turn structure.
Replaces manually copying and formatting Grok chat history by automating the capture and conversion into structured Obsidian notes.
When to Use It
- Back up your Grok conversation history from X to local Markdown files
- Archive Grok chats for offline reference or note-taking in Obsidian
- Convert a specific Grok conversation into a formatted Obsidian note with metadata
- Preserve the full turn-by-turn structure of a Grok chat, including user and assistant messages
- Export multiple Grok conversations at once using batch capture and conversion
Install
$ openclaw skills install @hajekt2/x-grok-to-obsidianExport Grok conversations in two stages.
Stage 1 — Capture conversation JSON from X/Grok
Run the browser script in Chrome DevTools Console on https://x.com/i/grok while logged in.
Use script: scripts/export_grok_items_capture.js
Behavior:
- Intercept only
GrokConversationItemsByRestIdresponses (fetch+XHR) - Load chat history with multi-pass scrolling
- Open each discovered conversation to trigger backend responses
- Save one JSON file with conversation metadata + ordered item payload
Quick settings (edit at top of script before run):
INDEX_PASSES(default3)CAPTURE_PASSES(default3)MAX_CHATS(null= all, or number for test)
Output:
grok-network-capture-<timestamp>.jsondownloaded by browser
Stage 2 — Convert JSON to Obsidian Markdown
Run Python converter locally:
python3 scripts/convert_grok_capture_to_md.py \
--input /path/to/grok-network-capture-*.json \
--out /path/to/output-folder
Converter defaults:
- Frontmatter fields:
URL,created - Body starts immediately with
# <title>(no blank line before header) - Turn headings:
## User/## Grok(no numbering) - Turn separator:
--- - Turn order: reverse API item order (API is newest-first)
- Reasoning/deepsearch omitted by default
Useful flags:
--include-reasoningincludethinking_traceblocks--separator "---"customize turn separator--overwriteoverwrite same-title files instead of creatingTitle 2.md
Notes
- Prefer several index/capture passes because X history rendering is lazy and inconsistent.
- If discovered chat count is unexpectedly low, re-run Stage 1 with higher pass counts.
- Keep scripts generic; avoid user-specific absolute paths.
Top skills in this category
Proactive Agent Lite
@bestrockyTransform AI agents from task-followers into proactive partners with memory architecture, reverse prompting, and self-healing patterns. Lightweight version f...
Planning with files
@othmanadiManus-style persistent file-based planning for AI coding agents: keeps task_plan.md, findings.md, and progress.md on disk so work survives context loss and /clear. Use when asked to plan out, break down, or organize a multi-step project, research task, or any work requiring 5+ tool calls. Supports a
Session-logs
@guogang1024Search and analyze your own session logs (older/parent conversations) using jq.
Performs web searches using DuckDuckGo to retrieve real-time information from the internet. Use when the user needs to search for current events, documentation, tutorials, or any information that requires web search capabilities.
@10e9928aPerforms web searches using DuckDuckGo to retrieve real-time information from the internet. Use when the user needs to search for current events, documentation, tutorials, or any information that requires web search capabilities.
Computer Use
@ram-raghav-sFull desktop computer use for headless Linux servers. Xvfb + XFCE virtual desktop with xdotool automation. 17 actions (click, type, scroll, screenshot, drag,...