vault-x-bookmarks
Vault X Bookmarks
Use the bundled TypeScript helper to review a bounded slice of the authenticated
user's X bookmarks and capture selected items into raw/sources/.
This is source-first: the helper writes external source records, records
captured bookmark IDs in raw/state/x-bookmarks/, and leaves organization to a
follow-up vault-ingest run.
Command
Run from this skill directory:
npx tsx scripts/x-bookmarks.ts [--limit N] [--max-pages N] [--head-pages N] [--path PATH]
Parameters
--limit N(default:15, range:1..100): maximum selected bookmarks to evaluate and capture in one run.--max-pages N(default:10, range:1..100): maximum bookmark pages to fetch across the head scan and catch-up scan.--head-pages N(default:2, range:1..100): newest bookmark pages to scan before resuming backlog pagination.--path PATH(default: current working directory): vault root containingraw/sources/andraw/state/x-bookmarks/.
There is no report mode. This helper is apply-only and bounded by --limit. It
writes source records, appends reviewed/run state, and updates the catch-up
checkpoint after successful runs.
Authentication
Install xurl, authenticate it with OAuth 2.0 for the X account whose bookmarks
should be captured, and verify it before running the helper:
xurl auth status
xurl whoami
Required scopes:
bookmark.readtweet.readusers.readoffline.access
Do not use an app-only bearer token. The helper resolves the authenticated user
through xurl whoami; do not pass a manual user ID.
Behavior
- Load reviewed IDs from
raw/state/x-bookmarks/reviewed.jsonl. - Fetch bookmark pages by shelling out to
xurl --auth oauth2. - Always scan newest
--head-pagesfirst so newly saved bookmarks are found even after backlog has been processed. - If backlog remains and the head scan does not fill
--limit, continue from the saved catch-up pagination token until--max-pagesor--limitis reached. - Advance the saved catch-up token only past pages whose unreviewed bookmarks
have all been captured or recorded; if
--limitstops mid-page, save the token for that same page. - Select the oldest unreviewed bookmarks reachable in the combined scan, up to
--limit. - Process the selected slice oldest-to-newest.
- Capture every selected bookmark to
raw/sources/as markdown taggedexternal. - Append every captured bookmark to
reviewed.jsonl. - Append the run summary to
runs.jsonland updatecheckpoint.jsononly after reviewed entries are durable.
Never mutate X bookmarks. Never route captured files directly into permanent vault folders.
Capture Policy
Capture every selected bookmark. Do not apply regex scoring, string scoring, or filtering; the user's bookmark action is the relevance signal. Manually delete unwanted source records after a run.
Output
The command prints a JSON summary with the authenticated X user ID, pages fetched, evaluated and captured counts, created source paths, state files updated, and errors or partial failures.
Examples
Regular run:
npx tsx scripts/x-bookmarks.ts --limit 15
Catch up more backlog in one run:
npx tsx scripts/x-bookmarks.ts --limit 75 --max-pages 25 --head-pages 2
Override the vault path:
npx tsx scripts/x-bookmarks.ts --path /path/to/vault --limit 20
More from markphelps/agent-plugins
vault-lint
Hygiene pass over notes/ and projects/ surface
9vault-research
Research a note - find competitors, discussions, and market signals
8vault-compact
Merge clusters of small related notes into consolidated files
7vault-concept-promoter
Promote repeated themes into canonical concept pages under notes/concepts
6vault-maintain
Weekly bounded maintenance loop across ingestion, hygiene, tracking, and
6vault-cleanup
Audit processed-source archives for integrity and hygiene
5