← 返回 Skills 市场
hajekt2

X Grok to Obsidian

作者 hajekt2 · GitHub ↗ · v0.1.0
cross-platform ✓ 安全检测通过
410
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install 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...
使用说明 (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.
安全使用建议
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.
功能分析
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.
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install x-grok-to-obsidian
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /x-grok-to-obsidian 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
Initial release: network capture + markdown conversion + resume/checkpoint + rate-limit handling
元数据
Slug x-grok-to-obsidian
版本 0.1.0
许可证
累计安装 0
当前安装数 0
历史版本数 1
常见问题

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... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 410 次。

如何安装 X Grok to Obsidian?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install x-grok-to-obsidian」即可一键安装,无需额外配置。

X Grok to Obsidian 是免费的吗?

是的,X Grok to Obsidian 完全免费(开源免费),可自由下载、安装和使用。

X Grok to Obsidian 支持哪些平台?

X Grok to Obsidian 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 X Grok to Obsidian?

由 hajekt2(@hajekt2)开发并维护,当前版本 v0.1.0。

💬 留言讨论