Official agent skill

X Research

by trailofbits in trailofbits/skills-curated

Searches X/Twitter for real-time perspectives, dev discussions, product feedback, breaking news, and expert opinions using the X API v2.

OfficialCC-BY-SA-4.0Auto-check: notesWriting & Content

Install X Research

skills CLI
$ npx skills add trailofbits/skills-curated --skill x-research -a claude-code

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

GitHub CLI
$ gh skill install trailofbits/skills-curated x-research --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/trailofbits/skills-curated.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/x-research/skills/x-research .claude/skills/x-research && 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-research
GitHub stars
512
Token cost
~1.9k tokens
SKILL.md length
581 words
Files
9 (incl. scripts, references)
Skills in repo
24
Repo updated
First seen
Licence
CC-BY-SA-4.0

At a glance

Searches X/Twitter for real-time perspectives, dev discussions, product feedback, breaking news, and expert opinions using the X API v2.

  • Works in 6 steps: Decompose the Question into Queries → Search and Extract → Follow Threads → …
  • User says x research
  • SKILL.md covers Prerequisites, CLI Tool, Research Loop (Agentic) and Refinement Heuristics, plus 4 more sections
  • Runs Python scripts from its folder; calls uv and pip; needs X_BEARER_TOKEN and XAI_API_KEY

What it does

X Research is an agent skill from trailofbits/skills-curated, published by the product's own GitHub organization. Searches X/Twitter for real-time perspectives, dev discussions, product feedback, breaking news, and expert opinions using the X API v2. Provides search with engagement sorting, user profiles, thread fetching, watchlists, and result caching. Use when: (1) user says "x research", "search x for", "search twitter for", "what are people saying about", "what's twitter saying", "check x for", "x search", (2) user needs recent X discourse on a topic (library releases, API changes, product launches, industry events), (3)…

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 11 other files, including scripts and reference files (for example `data/watchlist.example.json`, `references/x-api.md` and `scripts/x_api.py`).

It sits in Writing & Content, covering Social media posts, Product launch strategy and Customer success. It works with X (Twitter). The repository describes itself as: Curated, community-vetted Claude Code plugin marketplace. The licence is CC-BY-SA-4.0.

When your agent uses it

  • User says x research
  • Search twitter for
  • What are people saying about
  • Whats twitter saying

Example prompts

  • “x research”
  • “search x for”
  • “search twitter for”
  • “/x-research”

Requirements

  • Python 3
  • A credential in X_BEARER_TOKEN
  • A credential in XAI_API_KEY
  • Pre-approved tools (allowed-tools): Bash, Read, Grep, Glob, Write, WebFetch

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Decompose the Question into Queries
  2. Search and Extract
  3. Follow Threads
  4. Deep-Dive Linked Content
  5. Synthesize
  6. Save

What it can do on your machine

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

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read
    • Grep
    • Glob
    • Write
    • WebFetch

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 6 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • uv
    • pip

    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.astral.sh

    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
    • XAI_API_KEY

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

Context cost

X Research loads about 1.9k tokens when it runs, and up to ~3k if it reads all its reference files. Until then it costs about 161 tokens; SKILL.md has 581 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~161
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3k

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read, Grep, Glob, Write, WebFetch

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); the scripts in this folder are not scanned.

SKILL.md

The full file from trailofbits/skills-curated at commit 6d05be4, republished under its CC-BY-SA-4.0 licence (© trailofbits). 581 words, ~1,869 tokens.

Download SKILL.mdSave it as .claude/skills/x-research/SKILL.md (or your agent's skills folder). This skill also uses 8 other files; get the full folder from GitHub.
name
x-research
description
Searches X/Twitter for real-time perspectives, dev discussions, product feedback, breaking news, and expert opinions using the X API v2. Provides search with engagement sorting, user profiles, thread fetching, watchlists, and result caching. Use when: (1) user says "x research", "search x for", "search twitter for", "what are people saying about", "what's twitter saying", "check x for", "x search", (2) user needs recent X discourse on a topic (library releases, API changes, product launches, industry events), (3) user wants to find what devs/experts/community thinks about a topic. NOT for: posting tweets or account management.
allowed-tools
Bash, Read, Grep, Glob, Write, WebFetch

X Research

Agentic research over X/Twitter. Decompose research questions into targeted searches, iteratively refine, follow threads, deep-dive linked content, and synthesize sourced briefings.

For X API details (endpoints, operators, response format): read {baseDir}/skills/x-research/references/x-api.md.

Prerequisites

  • X API Bearer Token -- set X_BEARER_TOKEN (or XAI_API_KEY) env var
  • Python 3.11+ and uv (pip install uv or https://docs.astral.sh/uv/)

CLI Tool

All commands use uv run for automatic dependency management:

bash
uv run {baseDir}/skills/x-research/scripts/x_search.py search "<query>" [options]

Options:

  • --sort likes|impressions|retweets|recent -- sort order (default: likes)
  • --since 1h|3h|12h|1d|7d -- time filter (default: last 7 days)
  • --min-likes N -- filter by minimum likes
  • --min-impressions N -- filter by minimum impressions
  • --pages N -- pages to fetch, 1-5 (default: 1, 100 tweets/page)
  • --limit N -- max results to display (default: 15)
  • --quick -- quick mode: 1 page, max 10 results, auto noise filter, 1hr cache
  • --from-user <username> -- shorthand for from:username in query
  • --quality -- filter low-engagement tweets (min 10 likes, post-hoc)
  • --no-replies -- exclude replies
  • --save -- save results to ~/x-research-output/
  • --json -- raw JSON output
  • --markdown -- markdown output for research docs

Auto-adds -is:retweet unless query already includes it. All searches display estimated API cost.

Examples:

bash
uv run {baseDir}/skills/x-research/scripts/x_search.py search "claude code" --sort likes --limit 10
uv run {baseDir}/skills/x-research/scripts/x_search.py search "from:anthropic" --sort recent
uv run {baseDir}/skills/x-research/scripts/x_search.py search "(cursor OR windsurf) AI editor" --pages 2 --save
uv run {baseDir}/skills/x-research/scripts/x_search.py search "AI agents" --quick
uv run {baseDir}/skills/x-research/scripts/x_search.py search "AI agents" --quality --quick
Profile
bash
uv run {baseDir}/skills/x-research/scripts/x_search.py profile <username> [--count N] [--replies] [--json]

Fetches recent tweets from a specific user (excludes replies by default).

Thread
bash
uv run {baseDir}/skills/x-research/scripts/x_search.py thread <tweet_id> [--pages N]

Fetches full conversation thread by root tweet ID.

Single Tweet
bash
uv run {baseDir}/skills/x-research/scripts/x_search.py tweet <tweet_id> [--json]
Watchlist
bash
uv run {baseDir}/skills/x-research/scripts/x_search.py watchlist                        # Show all
uv run {baseDir}/skills/x-research/scripts/x_search.py watchlist add <user> [note]      # Add account
uv run {baseDir}/skills/x-research/scripts/x_search.py watchlist remove <user>           # Remove
uv run {baseDir}/skills/x-research/scripts/x_search.py watchlist check                   # Check recent

Watchlist stored in {baseDir}/skills/x-research/data/watchlist.json.

Cache
bash
uv run {baseDir}/skills/x-research/scripts/x_search.py cache clear

15-minute TTL. Avoids re-fetching identical queries.

Research Loop (Agentic)

When doing deep research (not just a quick search), follow this loop:

1. Decompose the Question into Queries

Turn the research question into 3-5 keyword queries using X search operators:

  • Core query: Direct keywords for the topic
  • Expert voices: from: specific known experts
  • Pain points: Keywords like (broken OR bug OR issue OR migration)
  • Positive signal: Keywords like (shipped OR love OR fast OR benchmark)
  • Links: url:github.com or url: specific domains
  • Noise reduction: -is:retweet (auto-added), add -is:reply if needed
  • Spam filter: Add -airdrop -giveaway -whitelist for crypto-adjacent topics
2. Search and Extract

Run each query via CLI. After each, assess:

  • Signal or noise? Adjust operators.
  • Key voices worth searching from: specifically?
  • Threads worth following via thread command?
  • Linked resources worth deep-diving with WebFetch?
3. Follow Threads

When a tweet has high engagement or is a thread starter:

bash
uv run {baseDir}/skills/x-research/scripts/x_search.py thread <tweet_id>
Show full SKILL.md (236 more words)Show less
4. Deep-Dive Linked Content

When tweets link to GitHub repos, blog posts, or docs, fetch with WebFetch. Prioritize links that:

  • Multiple tweets reference
  • Come from high-engagement tweets
  • Point to technical resources directly relevant to the question
5. Synthesize

Group findings by theme, not by query:

### [Theme/Finding Title]

[1-2 sentence summary]

- @username: "[key quote]" (NL, NI) [Tweet](url)
- @username2: "[another perspective]" (NL, NI) [Tweet](url)

Resources shared:
- [Resource title](url) -- [what it is]
6. Save

Use --save flag or save manually.

Refinement Heuristics

  • Too much noise? Add -is:reply, use --sort likes, narrow keywords
  • Too few results? Broaden with OR, remove restrictive operators
  • Spam flooding results? Add -$ -airdrop -giveaway -whitelist
  • Expert takes only? Use from: or --min-likes 50
  • Substance over hot takes? Search with has:links

When to Use

  • Researching what developers/experts/community thinks about a topic
  • Getting real-time perspectives on breaking news or product launches
  • Finding technical discussions about libraries, frameworks, or APIs
  • Monitoring what key accounts are posting about
  • Gathering sourced evidence for competitive analysis or market research
  • Quick pulse check on a topic before deeper investigation

When NOT to Use

  • Posting tweets, replying, or managing an X account (read-only tool)
  • Historical research beyond 7 days (uses recent search endpoint only)
  • Searching non-X platforms (use web search tools instead)
  • Tasks where web search provides better results (X is best for real-time opinions, discussions, and breaking news -- not reference docs)

Cost Awareness

X API uses pay-per-use pricing ($0.005/post read, $0.01/user lookup). Quick mode keeps costs under ~$0.50/search. Always check the cost display after each search. Cache prevents duplicate charges. See references/x-api.md for full pricing.

File Structure

skills/x-research/
  SKILL.md           (this file)
  scripts/
    x_search.py      (CLI entry point, run with uv)
    x_api.py         (X API wrapper)
    x_cache.py       (file-based cache, 15min TTL)
    x_format.py      (terminal + markdown formatters)
  data/
    watchlist.json   (accounts to monitor)
    cache/           (auto-managed)
  references/
    x-api.md         (X API endpoint reference)

© trailofbits, CC-BY-SA-4.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 8 other files (scripts, references) in plugins/x-research/skills/x-research of trailofbits/skills-curated.

  • SKILL.md
  • data/watchlist.example.json
  • references/x-api.md
  • scripts/pyproject.toml
  • scripts/x_api.py
  • scripts/x_cache.py
  • scripts/x_format.py
  • scripts/x_search.py
  • scripts/x_xai.py

Open the folder on GitHubat commit 6d05be4

Compare with similar skills

X Research 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 Research compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
X Research this skilltrailofbits/skills-curated512—~1.9kAutomated safety check: NotesCC-BY-SA-4.0
X Researchrohunvora/x-research-skill1.2k1 repos~1.6kAutomated safety check: PassNone
Schedule Socialindranilbanerjee/digital-marketing-pro8541 repos~3.4kAutomated safety check: PassMIT
Launch Distributionamplitude/builder-skills159—~2.8kAutomated safety check: PassNone
Getxapi ConnectLeoYeAI/openclaw-marketing-skills1k1 repos~715Automated safety check: PassCustom licence
X Twitter ConnectLeoYeAI/openclaw-marketing-skills1k1 repos~1.6kAutomated safety check: PassCustom licence

Similar skills

  • X Research

    rohunvora/x-research-skill

    General-purpose X/Twitter research agent. An agent skill from rohunvora/x-research-skill.

    1.2k GitHub starsUsed in 1 repo~1.6k tokens
    Research & ScienceAuto-check passed
  • Schedule Social

    indranilbanerjee/digital-marketing-pro

    Schedule social posts to Twitter/X, Instagram, LinkedIn, TikTok, YouTube, and Pinterest through connected platform MCPs — generating per-platform copy variations, hashtag mixes, media-spec…

    854 GitHub starsUsed in 1 repo~3.4k tokens
    Writing & ContentAuto-check passed
  • Launch Distribution

    amplitude/builder-skills

    Plan and execute multi-channel distribution for product launches across X/Twitter, Reddit, LinkedIn, Hacker News, and other platforms.

    159 GitHub stars~2.8k tokensUpdated 2 mo ago
    Writing & ContentAuto-check passed
  • Getxapi Connect

    LeoYeAI/openclaw-marketing-skills

    Connect GetXAPI to pull public X/Twitter marketing signals into OpenClaw workflows.

    1k GitHub starsUsed in 1 repo~715 tokens
    Marketing & SEOAuto-check passed
  • X Twitter Connect

    LeoYeAI/openclaw-marketing-skills

    Connect TweetClaw to pull public X/Twitter marketing signals into OpenClaw workflows.

    1k GitHub starsUsed in 1 repo~1.6k tokens
    Marketing & SEOAuto-check passed
  • Money Social

    iamzifei/show-me-the-money

    Social media management and community building automation. An agent skill from iamzifei/show-me-the-money.

    1k GitHub stars~2k tokensUpdated 1 mo ago
    Writing & ContentAuto-check passed

More from trailofbits/skills-curated

All 24 skills in this repo
  • Openai Security Ownership Map

    trailofbits/skills-curated

    Official

    Analyze git repositories to build a security ownership topology (people-to-file), compute bus factor and sensitive-code ownership, and export CSV/JSON for graph databases and visualization.

    512 GitHub starsUsed in 5 repos~2.2k tokens
    Auto-check: notes
  • Openai Doc

    trailofbits/skills-curated

    Official

    A skill your agent uses when the task involves reading, creating, or editing .docx documents, especially when formatting or layout fidelity matters; prefer python-docx plus the bundled…

    512 GitHub starsUsed in 5 repos~786 tokens
    Auto-check: notes
  • Openai Develop Web Game

    trailofbits/skills-curated

    Official

    A skill your agent uses when the agent is building or iterating on a web game (HTML/JS) and needs a reliable development + testing loop: implement small changes, run a Playwright-based test script…

    512 GitHub stars~2.3k tokensUpdated 2 mo ago
    Auto-check: notes
  • Openai Jupyter Notebook

    trailofbits/skills-curated

    Official

    A skill your agent uses when the user asks to create, scaffold, or edit Jupyter notebooks (.ipynb) for experiments, explorations, or tutorials; prefer the bundled templates and run the helper script…

    512 GitHub stars~1k tokensUpdated 2 mo ago
    Auto-check: notes
  • Openai Playwright

    trailofbits/skills-curated

    Official

    A skill your agent uses when the task requires automating a real browser from the terminal (navigation, form filling, snapshots, screenshots, data extraction, UI-flow debugging) via playwright-cli…

    512 GitHub stars~945 tokensUpdated 2 mo ago
    Auto-check: notes
  • Teach

    trailofbits/skills-curated

    Official

    Teaches the user a new skill or concept over multiple sessions, using the current directory as a stateful teaching workspace with lessons, learning records, and reference materials.

    512 GitHub starsUsed in 26 repos~2.6k tokens
    Auto-check: notes

Works with

Questions about X Research

What does X Research do?

Searches X/Twitter for real-time perspectives, dev discussions, product feedback, breaking news, and expert opinions using the X API v2. X Research is an agent skill from trailofbits/skills-curated, published by the product's own GitHub organization. Searches X/Twitter for real-time perspectives, dev discussions, product feedback, breaking news, and expert opinions using the X API v2.

When should I use X Research?

X Research fits situations like: user says x research; search twitter for; what are people saying about; whats twitter saying.

How do I install X Research in Claude Code?

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

How do I install X Research in Codex?

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

Can I use X Research 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 trailofbits/skills-curated --skill x-research -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-research, .gemini/skills/x-research, .github/skills/x-research and .opencode/skills/x-research in your project.

What does X Research need to run?

Going by SKILL.md and its folder, X Research needs Python for the scripts in its folder, the command-line tools its instructions call (uv and pip) and credentials named X_BEARER_TOKEN and XAI_API_KEY. Our summary lists: Python 3; A credential in X_BEARER_TOKEN; A credential in XAI_API_KEY. Its frontmatter pre-approves these tools: Bash, Read, Grep, Glob, Write, WebFetch.

Does X Research access the network?

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

Is X Research safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does X Research use?

X Research is published under the CC-BY-SA-4.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does X Research use?

About 1.9k tokens (SKILL.md is roughly 7.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.1k tokens, read only when the agent opens those files.

What are the alternatives to X Research?

Skills that share tags, products or a category with X Research: X Research (rohunvora/x-research-skill, 1.2k stars), Schedule Social (indranilbanerjee/digital-marketing-pro, 854 stars), Launch Distribution (amplitude/builder-skills, 159 stars) and Getxapi Connect (LeoYeAI/openclaw-marketing-skills, 1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains X Research?

trailofbits (a GitHub organization, an official publisher) maintains it in trailofbits/skills-curated, which has 512 GitHub stars. The repository holds 24 skills in this directory. The repository was last updated on July 14, 2026.

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