Skip to main content
plugin

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

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add trailofbits/skills-curated
/plugin install x-research@skills-curated
Open on GitHub

What 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-curated

Step 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

Similar plugins

Plugins catalog →

From the same set51

The whole set →
security-awareness security-awareness instructs agents to detect phishing, verify domains, and stop secret leaks when handling credentials, web browsing, or sensitive data. ★ 540repo stars python-code-simplifier The python-code-simplifier plugin refines recently changed Python code without altering its behavior. Use it after edits to make the code easier to read and maintain. ★ 540repo stars react-pdf Generates PDFs via @react-pdf/renderer with flexbox layout, SVG graphics, and Google Fonts. Composes documents from reusable React components with declarative page breaks. ★ 540repo stars scv-scan scv-scan audits Solidity projects for 36 vulnerability categories. Helps spot security flaws across contract code in four systematic phases. ★ 540repo stars ghidra-headless ghidra-headless runs Ghidra's headless analyzer to reverse engineer binaries without a GUI. Helps decompile executables, inspect call graphs, and pull symbols directly in Claude Code. ★ 540repo stars openai-yeet openai-yeet is a Claude Code plugin that stages and commits changes, pushes them with gh, and opens a pull request in one request. ★ 540repo stars openai-spreadsheet openai-spreadsheet — a skill for spreadsheet work in .xlsx, .csv and .tsv through Python: build files, keep formulas and formatting intact, then check the rendered result. ★ 540repo stars openai-sentry openai-sentry fetches Sentry issues and error events via the Sentry API to summarize production failures. Triggers when investigating recent stack traces directly inside Claude Code. ★ 540repo stars

Project sponsors

Companies that keep this analytics open