x-research — Claude Code plugin: X search
x-research is a Claude Code plugin that searches X posts and gathers context from discussions, opinions and reviews. It supports research into topics through X.
MIT ★ 540 updated 2026-07-14
/plugin marketplace add trailofbits/skills-curated
/plugin install x-research@skills-curatedWhat x-research does
The plugin searches X with engagement sorting and time filters, retrieves recent posts from a profile, and fetches a conversation using its root tweet ID. It can also check a watchlist of accounts. Cached results help avoid repeated API calls.
For broader questions, the agent breaks the task into smaller queries, searches in rounds, follows threads and synthesizes what it finds. A quick mode handles targeted lookups. The CLI runs scripts/x_search.py with uv run.
You need an X API bearer token, Python 3.11+ and uv; set the token as X_BEARER_TOKEN or XAI_API_KEY. Search will not work without a token, and X API charges are based on posts read.
What it helps with
- find current X discussions about a topic
- sort search results by likes
- check a user’s recent posts
- retrieve a thread from its root tweet ID
- monitor posts from selected accounts
Example prompts for the agent
- Search X for recent discussion of React Server Components.
- Check what anthropic has posted recently.
- Read the X thread with root ID TWEET_ID.
How to install x-research
Plugin marketplace
/plugin marketplace add trailofbits/skills-curated/plugin install x-research@skills-curatedStep by step, with commands for each platform: Claude Code plugins: marketplaces, installing, and building your own
Questions about x-research
How do I install x-research in Claude Code?
Run these commands in order: /plugin marketplace add trailofbits/skills-curated, then /plugin install x-research@skills-curated. You also need an X API token, Python 3.11+ and uv.
What does x-research do?
It searches X posts, retrieves profile activity and conversation threads, and checks account watchlists. Its agent can search iteratively and synthesize findings.
What do I need to run x-research searches?
You need an X API bearer token, Python 3.11+ and uv. Set the token through X_BEARER_TOKEN or XAI_API_KEY.
Source text
x-research · MIT
# x-research X/Twitter research agent for [Claude Code](https://docs.anthropic.com/en/docs/claude-code). Search, filter, monitor -- all from the terminal. ## Install ```bash /plugin install trailofbits/skills-curated/plugins/x-research ``` ## Prerequisites - **X API Bearer Token** -- get one from the [X Developer Portal](https://developer.x.com) - **Python 3.11+** and **uv** -- https://docs.astral.sh/uv/ - Set `X_BEARER_TOKEN` or `XAI_API_KEY` environment variable ## What It Covers - **Search** with engagement sorting, time filtering, noise removal - **Quick mode** for cheap, targeted lookups (~$0.50/search) - **Profiles** -- recent tweets from any user - **Threads** -- full conversation by root tweet ID - **Watchlists** for monitoring accounts - **Cache** to avoid repeat API charges (15min TTL) - **Agentic research loop** -- decompose questions, search iteratively, follow threads, synthesize ## Usage Natural language (just talk to Claude): - "What are people saying about Claude Code?" - "Search X for React Server Components" - "Check what @anthropic posted recently" CLI (via the agent): ```bash uv run scripts/x_search.py search "your query" --sort likes --limit 10 uv run scripts/x_search.py search "AI agents" --quick uv run scripts/x_search.py profile anthropic uv run scripts/x_search.py thread TWEET_ID uv run scripts/x_search.py watchlist check ``` ## Cost X API uses pay-per-use pricing ($0.005/post read). Quick mode keeps costs under ~$0.50/search. Cache prevents duplicate charges. 24-hour deduplication at the API level means re-running searches within a day costs less. ## Credits Imported from [rohunvora/x-research-skill](https://github.com/rohunvora/x-research-skill). Original TypeScript implementation by rohunvora, converted to Python for this plugin. License: MIT.
© rohunvora · MIT · trailofbits/skills-curated