| name | x-bookmark-analysis |
| description | Scrape X (Twitter) bookmarks to local files, then analyze them with an agent. Bundles a Chrome MV3 extension under extension/ for full import and optional live bookmark/unbookmark sync (toggle in popup). Produces machine JSON and human-readable JSONL for analysis. Triggers: X bookmarks, Twitter bookmarks, scrape bookmarks, live sync toggle, export bookmarks for analysis, x-bookmarks-live, readable.jsonl, bookmark analysis, /x-bookmark-analysis.
|
X Bookmark Analysis
Purpose: scrape the user’s X Bookmarks library to local files, then let an agent analyze that corpus.
This skill ships a complete Chrome extension under extension/. After Load unpacked, the extension pulls bookmarks off x.com and writes them to disk; the agent reads those files (prefer .readable.jsonl) for analysis.
Pipeline
X Bookmarks (x.com)
→ Chrome extension (full import + optional live sync)
→ local JSON / JSONL
→ agent reads files and analyzes
| Stage | Who | Output |
|---|
| 1. Scrape | Extension on logged-in Chrome | Full library on disk |
| 2. Keep current (optional) | Live sync On + bookmark/unbookmark on X | Overwrites live files |
| 3. Analyze | Agent | Summaries, themes, search, recommendations, etc. |
0. Setup (once)
Package layout
x-bookmark-analysis/
SKILL.md
references/
extension/ ← Load unpacked here
manifest.json
content/
background/
popup/
icons/
utils/
{skill_dir} = folder that contains this SKILL.md
- Extension path =
{skill_dir}/extension (must contain manifest.json)
Install extension
- Chrome →
chrome://extensions/
- Enable Developer mode
- Load unpacked → select
{skill_dir}/extension
- Confirm X Bookmarks Manager is enabled; Service Worker is not invalid
Full scrape (required before analysis)
- Log in to x.com
- Open
https://x.com/i/bookmarks and wait for the list to render
- Open the extension popup → start full import
- Do not close or reload that tab while importing (other tabs are OK)
- When finished, use the paths shown in the popup (or default downloads folder)
Default download location (typical):
%USERPROFILE%\Downloads\x-bookmarks\
If Chrome uses a custom download directory, use the absolute paths from the popup.
1. Files for the agent
| File | Role for analysis |
|---|
*.readable.jsonl | Preferred for agents — one bookmark per line, slim fields |
*.json | Full machine schema when you need media variants, counts, etc. |
x-bookmarks-live.json | Current full library after live add/remove |
x-bookmarks-live.readable.jsonl | Current readable library (best live input for analysis) |
Order: same as X Bookmarks top-to-bottom (bookmark-action order), not tweet publish time.
Readable line (agent-friendly)
{
"id": "2078488413045747814",
"text": "Full post text…",
"author": "Display Name (@handle)",
"url": "https://x.com/.../status/...",
"media": [{ "type": "video", "url": "https://video.twimg.com/....mp4" }]
}
Schema details: references/data-schema.md
2. Agent analysis workflow
After scrape (or after live files update):
- Locate input — prefer newest
*.readable.jsonl or x-bookmarks-live.readable.jsonl
- Load — stream/read line by line; each line is one JSON object
- Analyze as requested, for example:
- themes / topics clustering
- authors and domains most saved
- media vs text-only ratio
- search for keywords or products
- summarize a subset (e.g. last N lines = most recently bookmarked)
- Cite
id and url when referring to specific posts
- Do not invent bookmarks not present in the file
Example analysis prompts the agent can serve:
- “What topics dominate my bookmarks?”
- “List AI/video-related posts with URLs”
- “Summarize the 20 most recent bookmarks (top of the file)”
3. Keeping data fresh
Live bookmark sync toggle (popup)
| State | Behavior |
|---|
| Off (default) | Do not listen for bookmark add/remove; no live file rewrite |
| On | Listen for add/remove by tweetId and overwrite live files (~1s debounce) |
Full import always works whether the toggle is on or off.
| Action | Effect |
|---|
| Full import again | New timestamped JSON + JSONL snapshot |
| Toggle On + bookmark on X | Live files update; new item at top |
| Toggle On + unbookmark on X | Live files update; item removed by tweetId |
| Toggle Off + bookmark/unbookmark | Ignored by extension (no storage/file change) |
| Manual export | New timestamped snapshot from current library |
Live fixed paths (typical, only when sync is On):
…/Downloads/x-bookmarks/x-bookmarks-live.json
…/Downloads/x-bookmarks/x-bookmarks-live.readable.jsonl
Import warning: do not close/reload the X bookmarks tab during full import.
4. Agent automation checklist
- Ensure extension is Load unpacked from
{skill_dir}/extension
- Open
https://x.com/i/bookmarks, user logged in
- Run full import (popup or page):
window.__xbmInstalled === true
window.__xbmBookmarksRequestTemplate
window.__xbmImportEngine.importAll({ delayMs: 350 })
window.__xbmImportEngine.getState()
- Resolve output path from popup or downloads folder
- Read
.readable.jsonl and perform the user’s analysis task
agent-browser note: bundled Chrome often does not load local extensions. Prefer the user’s Chrome where the extension is already loaded.
5. Acceptance criteria
| Check | Pass if |
|---|
| Ready after download | Load unpacked works with skill extension/ only |
| Scrape done | Plausible count + json/jsonl on disk |
| Agent-ready | .readable.jsonl readable line-by-line with id/text/url |
| Live OK | With toggle On, live files track bookmark/unbookmark by tweetId; with Off, events are ignored |
6. Distribution
Copy the entire package (must include extension/):
x-bookmark-analysis/
SKILL.md
references/
extension/
Install under:
~/.agents/skills/x-bookmark-analysis/
- or
~/.grok/skills/x-bookmark-analysis/
- or project
.agents/skills/x-bookmark-analysis/
Then: Load unpacked → extension/ → scrape bookmarks → agent analyzes local files.
Folder name must match frontmatter name: x-bookmark-analysis.