搜索

PythonReactSEOPDF
OpenClaw

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, preserve User vs Grok turns, and generate Markdown notes with YAML frontmatter (URL, created) from captured JSON.

hajekt20 来源安装数☆ 0 仓库 Stars

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install hajekt2/x-grok-to-obsidian

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

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-<timestamp>.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 # <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-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.

来源信息

Source
github
Repository
openclaw/skills
Path
skills/hajekt2/x-grok-to-obsidian
Version
—
Commit
5dee8dde68c38edd5fe7834056ec7d3c9615e870
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

README

x-grok-to-obsidian

Reusable OpenClaw skill to export Grok conversations from X (x.com) and convert them into Obsidian-ready Markdown files.

What it does

Two-stage workflow:

  1. Capture JSON from X/Grok in browser (network-level capture of GrokConversationItemsByRestId).
  2. Convert captured JSON to Markdown with role-separated turns (User / Grok) and Obsidian frontmatter.

Skill structure

  • SKILL.md — skill metadata + usage instructions
  • scripts/export_grok_items_capture.js — browser capture script (run in DevTools)
  • scripts/convert_grok_capture_to_md.py — JSON → Markdown converter

Quick usage

1) Capture from X/Grok
  • Open https://x.com/i/grok while logged in.
  • Open browser DevTools Console.
  • Paste/run scripts/export_grok_items_capture.js.
  • Download output JSON: grok-network-capture-<timestamp>.json.
2) Convert to Markdown
python3 scripts/convert_grok_capture_to_md.py \
  --input /path/to/grok-network-capture-*.json \
  --out /path/to/output-folder

Converter defaults

  • Frontmatter: URL, created, optional source_tweets
  • Turn headings: ## User / ## Grok
  • Turn separator: ---
  • API item order reversed to conversation order
  • Reasoning/deepsearch excluded by default

Notes

  • X history loading is lazy; multi-pass discovery improves completeness.
  • This project intentionally avoids shipping personal data and auth artifacts.

Troubleshooting / operational notes

1) History count is too low (e.g., ~166 only)
  • Increase discovery passes in export_grok_items_capture.js (INDEX_PASSES).
  • Keep the tab focused while indexing.
  • Re-run once; X history rendering is inconsistent and can return different visible subsets between runs.
2) Script hangs during capture loop
  • The script uses per-conversation timeout watchdogs to avoid infinite waits.
  • If a specific chat times out, it is retried in later passes.
  • Blocking dialogs are auto-closed during waits.
3) 429 Too Man...

来源内容

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-<timestamp>.json` downloaded by browser

## Stage 2 — Convert JSON to Obsidian Markdown

Run Python converter locally:

```bash
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-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.
README
# x-grok-to-obsidian

Reusable OpenClaw skill to export Grok conversations from X (x.com) and convert them into Obsidian-ready Markdown files.

## What it does

Two-stage workflow:

1. **Capture JSON from X/Grok** in browser (network-level capture of `GrokConversationItemsByRestId`).
2. **Convert captured JSON to Markdown** with role-separated turns (`User` / `Grok`) and Obsidian frontmatter.

## Skill structure

- `SKILL.md` — skill metadata + usage instructions
- `scripts/export_grok_items_capture.js` — browser capture script (run in DevTools)
- `scripts/convert_grok_capture_to_md.py` — JSON → Markdown converter

## Quick usage

### 1) Capture from X/Grok

- Open `https://x.com/i/grok` while logged in.
- Open browser DevTools Console.
- Paste/run `scripts/export_grok_items_capture.js`.
- Download output JSON: `grok-network-capture-<timestamp>.json`.

### 2) Convert to Markdown

```bash
python3 scripts/convert_grok_capture_to_md.py \
  --input /path/to/grok-network-capture-*.json \
  --out /path/to/output-folder
```

## Converter defaults

- Frontmatter: `URL`, `created`, optional `source_tweets`
- Turn headings: `## User` / `## Grok`
- Turn separator: `---`
- API item order reversed to conversation order
- Reasoning/deepsearch excluded by default

## Notes

- X history loading is lazy; multi-pass discovery improves completeness.
- This project intentionally avoids shipping personal data and auth artifacts.

## Troubleshooting / operational notes

### 1) History count is too low (e.g., ~166 only)

- Increase discovery passes in `export_grok_items_capture.js` (`INDEX_PASSES`).
- Keep the tab focused while indexing.
- Re-run once; X history rendering is inconsistent and can return different visible subsets between runs.

### 2) Script hangs during capture loop

- The script uses per-conversation timeout watchdogs to avoid infinite waits.
- If a specific chat times out, it is retried in later passes.
- Blocking dialogs are auto-closed during waits.

### 3) 429 Too Man...

相关技能

OpenClaw

humanpages

human-pages-ai

Search and hire real humans for tasks — photography, delivery, research, and more

OpenClaw

openclaw-skills

zseven-w

Reusable skill templates for OpenClaw AI agents. Templates for API integration, data processing, web scraping, CLI tools, and file processing.

OpenClaw

0xarchive

0xfantommenace

Query historical crypto market data from 0xArchive across Hyperliquid, Lighter.xyz, and HIP-3. Covers orderbooks, trades, candles, funding rates, open interest, liquidations, and data quality. Use when the user...

OpenClaw

1sec-security

cutmob

Install, configure, and manage 1-SEC — an open-source, all-in-one cybersecurity platform (16 modules, single binary) on Linux servers and VPS instances. Use when the user asks to secure a server, install securi...