twitter-x-hub

Read and write Twitter/X data via internal GraphQL API using cookie authentication.

1|Updated Jun 20, 2026
One-click install
npx skills add https://github.com/riipandi/minis-skills --skill twitter-x-hub-riipandi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: twitter-x-hub
Source: https://github.com/riipandi/minis-skills/tree/main/twitter-x-hub
Command: npx skills add https://github.com/riipandi/minis-skills --skill twitter-x-hub-riipandi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Accessing Twitter/X data programmatically normally requires paid API tiers or heavy third-party libraries. This Skill lets you read timelines, bookmarks, search results, and user profiles — and perform write actions like posting or liking — using only Python's standard library and your browser cookies. ## Core Features & Use Cases - Timeline & Content Reading: Fetch home For-You/Following feeds, bookmarks (including bookmark folders), user tweets, user likes, tweet details with reply threads, List timelines, and followers/following lists. - Write Operations: Post tweets and replies, delete tweets, like/unlike, retweet/unretweet, and bookmark/unbookmark directly from the CLI or Python API. - Zero-Dependency Design: Pure standard library (urllib, argparse, dataclasses) with UV project config, plus a three-level QueryId resolution system (cache → hardcoded fallbacks → live JS bundle scan) that auto-recovers when X rotates API query IDs. - Use Case: Ask the assistant to pull your latest 50 bookmarks as JSON, then summarize the top threads — cookies are fetched automatically via the browser_use tool in the Minis environment. ## Quick Start Use the twitter-x-hub skill to fetch my home timeline and show the 20 most recent tweets with their like and retweet counts.

Frequently Asked Questions about twitter-x-hub

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fetch my Twitter timeline with Python without the official API?

Use the internal GraphQL API authenticated with your auth_token and ct0 browser cookies. Run 'uv run python -m scripts.cli feed --max 30 --json' after exporting TWITTER_AUTH_TOKEN and TWITTER_CT0 environment variables.

How do I get Twitter auth_token and ct0 cookies?

In the Minis environment, use the browser_use tool to navigate to x.com and call get_cookies, which saves them to an environment file without exposing values. Alternatively, copy them manually from browser DevTools under Application > Cookies > x.com.

Why does Twitter search return 404 with this client?

X now requires an x-client-transaction-id header for SearchTimeline, generated by the xclienttransaction C extension that cannot install on iSH/Alpine. The workaround is using browser_use to open the search page and extract results from the DOM.

What happens when Twitter changes its GraphQL query IDs?

The client resolves query IDs through three levels: in-memory cache, hardcoded fallback IDs, then live lookup from the fa0311/twitter-openapi repository or regex scanning of x.com JS bundles. A 404 response automatically invalidates the cache and triggers re-resolution.

Is it safe to post tweets programmatically with cookie auth?

Write operations work but carry higher account risk than reads. The client adds 1.5–4 second random delays before writes, and the documentation recommends using a dedicated alt account to avoid risk flags on your main account.