Agent skill

X API Reader

by ginlix-ai in ginlix-ai/LangAlpha

Reads public X (Twitter) content through five MCP tools: recent and historical post search, reply threads, user profiles and single-post lookup, for sentiment and event research.

Apache-2.0Auto-check passedBusiness, Finance & HR

Install X API Reader

skills CLI
$ npx skills add ginlix-ai/LangAlpha --skill x-api -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ginlix-ai/LangAlpha x-api --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ginlix-ai/LangAlpha.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/alternative_data/skills/x-api .claude/skills/x-api && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
x-api
GitHub stars
1.8k
Token cost
~1.2k tokens
SKILL.md length
433 words
Files
3
Skills in repo
38
Repo updated
First seen
Licence
Apache-2.0

At a glance

Reads public X (Twitter) content through five MCP tools: recent and historical post search, reply threads, user profiles and single-post lookup, for sentiment and event research.

  • Gauging recent public sentiment about a stock ticker on X
  • SKILL.md covers Auth, Tools at a glance, Examples and Post shape, plus 4 more sections
  • Needs X_BEARER_TOKEN
  • Researching how people reacted to a past event such as an earnings call

What it does

Access is read-only and comes through five tools. search_posts is the default and covers roughly the last week, search_all_posts reaches back to 2006 but needs a paid-tier X plan, get_conversation returns the replies under a root tweet, get_user_by_username returns a profile with metrics, and get_tweet_by_id fetches one post, mainly to find the conversation_id before reading its thread. Typical uses are sentiment on tickers, executive announcements, launches and event tracking next to SEC and market data.

Every tool needs a bearer token, which the code reads from the vault under X_BEARER_TOKEN; an empty value means the user has not added it yet, and TROUBLESHOOTING.md walks through setup and per-error fixes. The skill is not meant for looking up one post from a URL, where a plain web fetch is simpler, and is best for search, aggregation and thread traversal. Examples show queries that exclude retweets, filter by language and paginate large results.

When your agent uses it

  • Gauging recent public sentiment about a stock ticker on X
  • Researching how people reacted to a past event such as an earnings call
  • Reading the replies under a specific tweet
  • Pulling a user profile and metrics for an account

Example prompts

  • “Summarize what people on X are saying about NVDA over the past few days.”
  • “Find tweets about Tesla earnings from last October and summarize the reaction.”
  • “Pull the reply thread under this tweet and list the main objections.”

Requirements

  • An X API bearer token stored as X_BEARER_TOKEN in the vault
  • A paid-tier X plan for searching older posts

What it can do on your machine

Read from SKILL.md and the folder at commit 111a0f6. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • docs.x.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • X_BEARER_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

X API Reader loads about 1.2k tokens when it runs. Until then it costs about 73 tokens; SKILL.md has 433 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~73
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ginlix-ai/LangAlpha at commit 111a0f6, republished under its Apache-2.0 licence (© ginlix-ai). 433 words, ~1,241 tokens.

Download SKILL.mdSave it as .claude/skills/x-api/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
x-api
description
Search X (Twitter) posts, pull user profiles, fetch specific tweets, and read reply threads for sentiment, news, and event research. Triggers on 'X', 'Twitter', 'tweets about', 'sentiment on', 'what are people saying about', 'historical tweets', or any request to read public X content.

X (Twitter) API

Read-only access to X content via five MCP tools. Use for sentiment on tickers, exec announcements, launches, event tracking, and qualitative research alongside SEC/market data.

Not for single-post URL lookups. If the user hands you a specific X post URL and just wants its text or context, use web_fetch on the URL — no vault, no auth, no rate limit. Reach for this skill when the task is search, aggregation, or thread traversal.

Auth

Every tool requires a bearer_token. Read it once per code block from the vault:

python
from vault import get
token = get("X_BEARER_TOKEN")

If token is None or empty, the user hasn't added it yet. For the setup walkthrough and per-error fixes, see TROUBLESHOOTING.md.

Tools at a glance

The primary use case is search — the first two tools are what you'll reach for most.

ToolUse forPage sizeNotes
search_postsPosts from the last ~7 daysdefault 10, max 100Default choice. Query ≤512 chars.
search_all_postsPosts older than 7 days (back to 2006)default 10, max 500Paid-tier X plan only. Query ≤1024 chars.
get_conversationReply thread to a root tweetdefault 50, max 100Uses recent search — thread must be ≤7 days old. Root tweet not included.
get_user_by_usernameA user profile + metrics—Handle without @, ≤15 chars.
get_tweet_by_idHydrate a single post (mainly to find its conversation_id before get_conversation)—For a one-off URL the user already has, prefer web_fetch.

Examples

Recent sentiment on a ticker
python
res = search_posts(
    query="$NVDA -is:retweet lang:en",
    bearer_token=token,
    max_results=100,
)
posts = res["posts"]
posts.sort(key=lambda p: p["public_metrics"].get("impression_count", 0), reverse=True)
for p in posts[:10]:
    print(p["author"]["username"], p["public_metrics"].get("like_count"), p["text"][:140])
Historical reaction to a past event
python
res = search_all_posts(
    query="$TSLA earnings -is:retweet lang:en",
    bearer_token=token,
    max_results=500,
    start_time="2020-03-13T00:00:00Z",
    end_time="2020-03-20T00:00:00Z",
)
Full thread on a specific tweet
python
root = get_tweet_by_id(tweet_id="1700000000000000001", bearer_token=token)
thread = get_conversation(
    conversation_id=root["post"]["conversation_id"],
    bearer_token=token,
    max_results=100,
)
all_posts = [root["post"], *thread["posts"]]
Paginate through a large result
python
posts, next_tok = [], None
while len(posts) < 500:
    res = search_posts(
        query="from:FedSpeakers",
        bearer_token=token,
        max_results=100,
        next_token=next_tok,
    )
    if "error" in res:
        break
    posts.extend(res["posts"])
    next_tok = res.get("next_token")
    if not next_tok:
        break
Show full SKILL.md (182 more words)Show less

Post shape

Each post: id, text, created_at, lang, conversation_id, author_id, edit_history_tweet_ids, public_metrics (retweet/reply/like/quote/bookmark/impression counts), author — which is {id, username, name, verified}, {id, unresolved: true} for suspended/deleted users, or None if the tweet has no author_id.

Full per-tool response schemas (including user shape and error variants): reference.md.

Query syntax

$TSLA (cashtag), #hashtag, from:elonmusk, to:@SEC_News, -is:retweet, is:verified, has:links, has:media, lang:en, "exact phrase", parentheses + OR for alternation. Full list: https://docs.x.com/x-api/posts/search/introduction.

Errors

Every tool returns {"error": "...", ...} on failure — they never raise. Always check for error before accessing posts / user / post. For the per-error playbook (including setup fixes and tier gotchas), read TROUBLESHOOTING.md.

Do / Don't

  • Do read token = get("X_BEARER_TOKEN") once and reuse it across calls.
  • Do cross-reference with get_daily_prices and get_sec_filing when investigating price moves or disclosures.
  • Don't hardcode tokens. Ever.
  • Don't cache next_token across sessions — cursors can expire.
  • Don't assume every author is resolved — check for {unresolved: true} before reading username.
  • get_daily_prices — cross-reference X sentiment with price action
  • get_sec_filing — pair chatter with official disclosures
  • scrape scrape_page / scrape_pages — fallback for public pages when the API is blocked
  • web_search — broader news search that also indexes X posts

© ginlix-ai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files in plugins/alternative_data/skills/x-api of ginlix-ai/LangAlpha.

  • SKILL.md
  • TROUBLESHOOTING.md
  • reference.md

Open the folder on GitHubat commit 111a0f6

Compare with similar skills

X API Reader next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

X API Reader compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
X API Reader this skillginlix-ai/LangAlpha1.8k—~1.2kAutomated safety check: PassApache-2.0
Tiger Brokers OpenAPI SDKqusong0627/QuantMind1.7k—~1.4kAutomated safety check: PassApache-2.0
Tushare Plugin BuilderYourdaylight/stock_datasource188—~2.5kAutomated safety check: PassMIT
Multi-Symbol Market Scannertradesdontlie/tradingview-mcp6.8k2 repos~447Automated safety check: PassCustom licence
TradingView Chart Analysistradesdontlie/tradingview-mcp6.8k3 repos~515Automated safety check: PassCustom licence
Stock APIzhangxiangliang/stock-api2k—~507Automated safety check: PassMIT

Similar skills

  • Tiger Brokers OpenAPI SDK

    qusong0627/QuantMind

    Covers the Tiger Brokers OpenAPI Python SDK for market data, stock, futures and options trading, push subscriptions, a CLI and an MCP server, defaulting to paper trading.

    1.7k GitHub stars~1.4k tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Tushare Plugin Builder

    Yourdaylight/stock_datasource

    Turns a Tushare API doc URL into a full data plugin for the stock_datasource repo: extractor, ClickHouse schema, query service, config and curl examples.

    188 GitHub stars~2.5k tokensUpdated 1 mo ago
    Data & AnalyticsAuto-check passed
  • Multi-Symbol Market Scanner

    tradesdontlie/tradingview-mcp

    Scans a list of trading symbols in TradingView for setups, patterns or strategy results and reports them as a ranked comparison table.

    6.8k GitHub starsUsed in 2 repos~447 tokens
    Business, Finance & HRAuto-check passed
  • TradingView Chart Analysis

    tradesdontlie/tradingview-mcp

    Sets up a TradingView chart with a symbol, timeframe and indicators, marks key levels, takes a screenshot and reports price range, levels and overall bias.

    6.8k GitHub starsUsed in 3 repos~515 tokens
    Business, Finance & HRAuto-check passed
  • Stock API

    zhangxiangliang/stock-api

    Fetch real-time stock quotes, K-line (candlestick) history, and search symbols for China A-shares, Hong Kong, and US markets.

    2k GitHub stars~507 tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Tradingview MCP

    atilaahmettaner/tradingview-mcp

    AI Trading Intelligence — live prices, 30+ technical indicators, backtesting (6 strategies), walk-forward overfitting detection, trade logs, equity curves, licensed news sentiment (Marketaux), and…

    5k GitHub stars~1.3k tokensUpdated today
    Business, Finance & HRAuto-check passed

More from ginlix-ai/LangAlpha

All 38 skills in this repo
  • Investment Deck Check

    ginlix-ai/LangAlpha

    Quality-checks an investment deck in .pptx form before it goes out: number consistency, chart and narrative alignment, source coverage, language and a circulation verdict.

    1.8k GitHub stars~3.7k tokensUpdated today
    Auto-check passed
  • Equity Initiation Report

    ginlix-ai/LangAlpha

    Produces a first-time equity research initiation report in five tasks: company research, financial model, valuation, charts and a DOCX report.

    1.8k GitHub stars~3.8k tokensUpdated today
    Auto-check passed
  • Builds or repairs an integrated income statement, balance sheet and cash flow model in Excel with live formulas, supporting schedules, scenarios and a Checks sheet.

    1.8k GitHub stars~5.4k tokensUpdated today
    Auto-check passed
  • Financial Model Checker

    ginlix-ai/LangAlpha

    Audits an existing Excel financial model without editing it, checking structure, formulas, integrity identities and source tie-out, and ends in a prioritized issue log.

    1.8k GitHub stars~4.2k tokensUpdated today
    Auto-check passed
  • DCF Model Builder

    ginlix-ai/LangAlpha

    Builds a live Excel DCF valuation workbook with free cash flow projections, WACC, terminal value, three scenarios, sensitivity grids and a reverse DCF.

    1.8k GitHub stars~7.7k tokensUpdated today
    Auto-check passed
  • Builds Word files with python-docx, edits existing ones in place with tracked changes and comments, then renders and validates the result.

    1.8k GitHub stars~4.8k tokensUpdated today
    Auto-check passed

Questions about X API Reader

What does X API Reader do?

Reads public X (Twitter) content through five MCP tools: recent and historical post search, reply threads, user profiles and single-post lookup, for sentiment and event research. Access is read-only and comes through five tools. search_posts is the default and covers roughly the last week, search_all_posts reaches back to 2006 but needs a paid-tier X plan, get_conversation returns the replies under a root tweet, get_user_by_username returns a profile with metrics, and get_tweet_by_id fetches one post, mainly to find the conversation_id before reading its thread.

When should I use X API Reader?

X API Reader fits situations like: gauging recent public sentiment about a stock ticker on X; researching how people reacted to a past event such as an earnings call; reading the replies under a specific tweet; pulling a user profile and metrics for an account.

How do I install X API Reader in Claude Code?

Run `npx skills add ginlix-ai/LangAlpha --skill x-api -a claude-code`. Or copy the skill folder (plugins/alternative_data/skills/x-api in ginlix-ai/LangAlpha) into .claude/skills/x-api in your project. Claude Code loads it when a task matches its description.

How do I install X API Reader in Codex?

Run `npx skills add ginlix-ai/LangAlpha --skill x-api -a codex`. Or copy the skill folder (plugins/alternative_data/skills/x-api in ginlix-ai/LangAlpha) into .agents/skills/x-api in your project. Codex loads it when a task matches its description.

Can I use X API Reader in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ginlix-ai/LangAlpha --skill x-api -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/x-api, .gemini/skills/x-api, .github/skills/x-api and .opencode/skills/x-api in your project.

What does X API Reader need to run?

Going by SKILL.md and its folder, X API Reader needs credentials named X_BEARER_TOKEN. Our summary lists: An X API bearer token stored as X_BEARER_TOKEN in the vault; A paid-tier X plan for searching older posts.

Does X API Reader access the network?

SKILL.md names 1 domain. As links in the text: docs.x.com. This is read from the text; nothing was executed.

Is X API Reader safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does X API Reader use?

X API Reader is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does X API Reader use?

About 1.2k tokens (SKILL.md is roughly 5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to X API Reader?

Skills that share tags, products or a category with X API Reader: Tiger Brokers OpenAPI SDK (qusong0627/QuantMind, 1.7k stars), Tushare Plugin Builder (Yourdaylight/stock_datasource, 188 stars), Multi-Symbol Market Scanner (tradesdontlie/tradingview-mcp, 6.8k stars) and TradingView Chart Analysis (tradesdontlie/tradingview-mcp, 6.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains X API Reader?

ginlix-ai (a GitHub organization) maintains it in ginlix-ai/LangAlpha, which has 1,806 GitHub stars. The repository holds 38 skills in this directory. The repository was last updated on October 8, 2026.

Source: ginlix-ai/LangAlpha on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.