Launch deal: $99 lifetime for your first always-on AI system.
Build Lean SaaS cube logoBuild Lean SaaS
Back to Skills
xX APIGitHub IssuesOpenClaw

Installable agent skill

X Bookmark Capture Sync

An installable OpenClaw/Codex-style skill that captures your X bookmarks on a cron job and turns them into raw GitHub Issues labeled inbox.

Austin Witherow
4 min read

Installable Source

The website page is the guide. The install command downloads the curated source files from Build Lean SaaS. Maintainers can also copy skills/x/bookmark-capture-sync from the repository root.

This is a small installable skill for turning X bookmarks into GitHub inbox work.

By default, new captures become GitHub issues in:

The website page is documentation. The useful part is the source folder:

That folder contains the SKILL.md file an agent can read and a bundled Node script that can run from cron.

What it does

  • Authenticates against the X API with OAuth 2.0.
  • Checks GitHub inbox capacity before making any paid X API bookmark/user calls.
  • Reads your own bookmarks with GET /2/users/:id/bookmarks.
  • Creates or reuses one GitHub issue per new bookmark.
  • Labels each raw capture with existing repo labels, defaulting to inbox and agent-ready in buildleansaas/obsidian-vault.
  • Stores processed tweet IDs in local JSON so the same bookmark is not sent twice.
  • Stores GitHub issue numbers and URLs for captured bookmarks.
  • Leaves X bookmarks untouched in v1.

Install

Install the curated public source files into your local skills directory.

For OpenClaw-style repositories, keep the same folder shape and point the tool at the installed SKILL.md.

Configure

Create an X API app with OAuth 2.0 enabled. Configure the callback URL you want to use for local authorization.

Set these environment variables:

Optional:

Before any non-dry-run sync calls X, the script counts open GitHub issues matching the configured inbox labels in GITHUB_REPOSITORY. If the count is at or above GITHUB_ISSUE_CAP, it exits early so a full inbox does not burn X API credits.

The X OAuth scopes are:

Authorize X

From the copied skill folder:

Open the printed URL, approve access, and copy the returned code and state values from your callback URL.

Then exchange it:

Run the sync

Preview what would happen without creating GitHub issues:

For the daily job:

For a warmer daily job that stops once it sees a bookmark already in local state:

To reduce the maximum paid reads on the daily job:

To inspect more than one page:

For the first backlog clear:

If you want a bounded first run:

For a safe backlog preview:

Commands and flags

Options:

  • --pages all|<n> controls how many pages to fetch.
  • --page-size <1-100> controls how many bookmarks to request per page.
  • --dry-run prints planned issues without calling GitHub or saving processed state.
  • --stop-after-seen stops paging after the first already-processed bookmark.

The environment variable GITHUB_ISSUE_CAP defaults to 200. Set it higher if your GitHub inbox can hold more active work, or set 0 only when you intentionally want to disable the pre-X-fetch guard.

State file

The default state file is:

It stores:

  • X OAuth token data.
  • Processed tweet IDs.
  • Captured tweet URLs.
  • GitHub issue numbers and URLs when issues are created.

Dry runs do not mark bookmarks as processed.

Cron

GitHub output

The script creates a raw capture issue.

The title is short:

The issue body includes:

  • Source marker
  • X URL
  • Author
  • Tweet text
  • Tweet ID
  • Posted date when available

The labels default to:

The script intentionally does not use an LLM in v1. It gets the bookmark into the inbox first. A person or agent can process the item later.

Follow-up workflow

The next skill should process these raw GitHub x-inbox items with Hermes, Codex, or another agent heartbeat.