← Back to Skills Marketplace
hajekt2

X Grok to Obsidian

by hajekt2 · GitHub ↗ · v0.1.0
cross-platform ✓ Security Clean
410
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install x-grok-to-obsidian
Description
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 Gr...
README (SKILL.md)

Export 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 GrokConversationItemsByRestId responses (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 (default 3)
  • CAPTURE_PASSES (default 3)
  • MAX_CHATS (null = all, or number for test)

Output:

  • grok-network-capture-\x3Ctimestamp>.json downloaded 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 # \x3Ctitle> (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-reasoning include thinking_trace blocks
  • --separator "---" customize turn separator
  • --overwrite overwrite same-title files instead of creating Title 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.
Usage Guidance
This skill is coherent: the capture script intercepts only a specific Grok API response, and the Python converter formats that JSON into Markdown. However, you must be careful before pasting/running third‑party JavaScript in your browser console: that JS runs with the page's JavaScript privileges and can read DOM state, in-page data, and localStorage. Before running: - Review the full export_grok_items_capture.js content yourself (or have someone you trust do so). Ensure the final part of the script only triggers a local download (Blob) rather than POSTing to any remote endpoint. - Prefer running the capture in a dedicated browser profile or temporary session that contains only the account you want to export. This limits exposure of other cookies/storage/credentials. - Be aware the capture JSON contains your conversation contents and may include 'thinking_trace' (model reasoning). Use the converter without --include-reasoning by default unless you explicitly want internal traces. - After a completed run, check and remove the localStorage checkpoint key (CHECKPOINT_KEY) if you don't want the capture persisted in your profile; the README says the script clears it on success but verify manually. - If you are uncomfortable with running the JS in a logged-in live profile, consider inspecting the script and simulating network responses or using a controlled environment (separate VM/browser profile). If you want me to double-check the very end of the capture script (download/exfil logic) or scan for any network POSTs to external hosts, paste the remainder of the file here and I will review that section specifically.
Capability Analysis
Type: OpenClaw Skill Name: x-grok-to-obsidian Version: 0.1.0 The skill bundle is benign. It provides a two-stage workflow to export Grok conversations from X.com and convert them to Markdown. The `export_grok_items_capture.js` script runs in the user's browser, intercepts specific network requests on X.com, and downloads the captured JSON data locally. It does not exfiltrate data to external endpoints. The `convert_grok_capture_to_md.py` script processes this local JSON into Markdown files, performing only local file I/O. Neither the code nor the `SKILL.md`/`README.md` contain any prompt injection attempts, malicious instructions, data exfiltration, persistence mechanisms, or other harmful behaviors.
Capability Assessment
Purpose & Capability
The name/description match the included assets: a browser DevTools capture script that intercepts GrokConversationItemsByRestId responses and a Python converter that turns the captured JSON into Obsidian-ready Markdown. No unrelated binaries, env vars, or services are requested.
Instruction Scope
SKILL.md tells the agent/user to paste and run the provided export_grok_items_capture.js in the DevTools console while logged in and then run the local Python script. The browser script intercepts fetch/XHR for a specific GraphQL response type, navigates the SPA (history.pushState / clicking), stores checkpoints in localStorage, and downloads a JSON capture. All of these actions are consistent with the stated capture purpose. Caveat: running arbitrary third-party JS in your console grants that code access to whatever the page's JavaScript environment exposes (DOM, localStorage, in-page JavaScript objects and responses). The script also persists captured checkpoints in localStorage, which may retain sensitive content until cleared.
Install Mechanism
No install steps or external downloads are declared; this is an instruction-only skill with two included scripts. That minimizes installer risk. Files are run by the user (paste into console / run Python locally).
Credentials
The skill requests no environment variables or credentials. It does require you be logged into X in the browser to capture responses — which is appropriate for capturing your Grok chats. The script does not declare or require unrelated secrets. Note that the captured JSON will contain the conversation content (including optional thinking_trace blocks) and should be protected accordingly.
Persistence & Privilege
The script writes checkpoints into browser localStorage under a clearly named key (CHECKPOINT_KEY) and is designed to clear them on successful completion. It does not request always:true or system-wide privileges. Still, localStorage persistence means captured content may remain in your browser profile until explicitly cleared; use a disposable profile or clear the checkpoint key after use if desired.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install x-grok-to-obsidian
  3. After installation, invoke the skill by name or use /x-grok-to-obsidian
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.1.0
Initial release: network capture + markdown conversion + resume/checkpoint + rate-limit handling
Metadata
Slug x-grok-to-obsidian
Version 0.1.0
License
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is 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 Gr... It is an AI Agent Skill for Claude Code / OpenClaw, with 410 downloads so far.

How do I install X Grok to Obsidian?

Run "/install x-grok-to-obsidian" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is X Grok to Obsidian free?

Yes, X Grok to Obsidian is completely free (open-source). You can download, install and use it at no cost.

Which platforms does X Grok to Obsidian support?

X Grok to Obsidian is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created X Grok to Obsidian?

It is built and maintained by hajekt2 (@hajekt2); the current version is v0.1.0.

💬 Comments