x-api

x-api is a skill for Claude Code, Codex from ginlix-ai/LangAlpha. It costs 70 tokens per session (1,336 once invoked), scanned A, original, Apache-2.0.

A read-only connection to public posts and profiles on X, the social network formerly called Twitter. It supports searching recent or older posts, viewing user profiles, fetching posts, and reading reply threads.

In plain words
What is it for?
Use it to research public opinion, news, sentiment, announcements, launches, events, and historical conversations on X.
Why use it?
It reduces the need to manually search X and collect posts or replies for research. It can organize public discussion around a topic, event, company, or market.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/ginlix-ai/langalpha/x-api
Any agent
npx skills add ginlix-ai/LangAlpha --skill x-api
Clone the repo
git clone --depth 1 https://github.com/ginlix-ai/LangAlpha

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for x-api

README.md
[![agentmods](https://agentmods.dev/badge/skills/ginlix-ai/langalpha/x-api.svg)](https://agentmods.dev/skills/ginlix-ai/langalpha/x-api)
Your own site
<a href="https://agentmods.dev/skills/ginlix-ai/langalpha/x-api"><img src="https://agentmods.dev/badge/skills/ginlix-ai/langalpha/x-api.svg" alt="Measured on agentmods" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,336 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00070 $0.01336
Opus 5 $0.00035 $0.00668
Sonnet 5 $0.00014 $0.00267
Haiku 4.5 $0.00007 $0.00134

Measured 4d ago against content hash 9a5c60489ebe, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

x-api scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/alternative_data/skills/x-api/SKILL.md · 122 lines

How it starts

The opening of the file, as written. The whole thing — 122 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 workspace vault:

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.

Tool Use for Page size Notes
search_posts Posts from the last ~7 days default 10, max 100 Default choice. Query ≤512 chars.
search_all_posts Posts older than 7 days (back to 2006) default 10, max 500 Paid-tier X plan only. Query ≤1024 chars.
get_conversation Reply thread to a root tweet default 50, max 100 Uses recent search — thread must be ≤7 days old. Root tweet not included.
get_user_by_username A user profile + metrics Handle without @, ≤15 chars.
get_tweet_by_id Hydrate 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

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])

Read the full file on GitHub · 122 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 122 lines · 70 tokens per session scan A 9a5c60489ebe

Subscribe to this mod's changes

x-api is a skill published in the GitHub repository ginlix-ai/LangAlpha (1,720 stars, last pushed today), licensed Apache-2.0. It adds 70 tokens to every session and 1,336 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

pdf

Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.

Chen-zexi/open-ptc-agent · 50 tokens

xlsx

Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify…

Chen-zexi/open-ptc-agent · 96 tokens

pptx

Presentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks.

Chen-zexi/open-ptc-agent · 62 tokens

creating-financial-models

This skill provides an advanced financial modeling suite with DCF analysis, sensitivity testing, Monte Carlo simulations, and scenario planning for investment decisions.

Chen-zexi/open-ptc-agent · 32 tokens

docx

Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4)…

Chen-zexi/open-ptc-agent · 77 tokens

drawio-skill

Use when user requests diagrams, flowcharts, architecture charts, or visualizations. Also use proactively when explaining systems with 3+ components, complex data flows, or relationships that benefit from visual representation. Generates .drawio XML files and exports to PNG/SVG/PDF locally using the native draw.io…

ranxi2001/zero2Agent · 68 tokens