Search

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 source installs☆ 0 Repository stars

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

SkillHub CLI

skillhub install hajekt2/x-grok-to-obsidian

Inspect the source and compatibility requirements, then follow its installation steps.

Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.

View source ↗Guides

Skill instructions

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 information

Source
github
Repository
openclaw/skills
Path
skills/hajekt2/x-grok-to-obsidian
Version
—
Commit
5dee8dde68c38edd5fe7834056ec7d3c9615e870
Classification source
rules
Status
active
Visibility
public

These signals come from indexed source analysis and may lag behind changes. Check the current source files.

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

Extracted content

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

Related skills

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