x-research
General-purpose X/Twitter research agent. Searches X for real-time perspectives, dev discussions, product feedback, cultural takes, breaking news, and expert opinions. Works like a web research agent but uses X as the source. 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", "/x-research", (2) user is working on something where recent X discourse would provide useful context (new library releases, API changes, product launches, cultural events, industry drama), (3) user wants to find what devs/experts/community thinks about a topic. NOT for: posting tweets or account management. Note: currently uses recent search (last 7 days). Full-archive search is available on the same pay-per-use X API plan but not yet implemented in this skill.
Packaged view
This page reorganizes the original catalog entry around fit, installability, and workflow context first. The original raw source lives below.
Install command
npx @skill-hub/cli install rohunvora-x-research
Repository
General-purpose X/Twitter research agent. Searches X for real-time perspectives, dev discussions, product feedback, cultural takes, breaking news, and expert opinions. Works like a web research agent but uses X as the source. 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", "/x-research", (2) user is working on something where recent X discourse would provide useful context (new library releases, API changes, product launches, cultural events, industry drama), (3) user wants to find what devs/experts/community thinks about a topic. NOT for: posting tweets or account management. Note: currently uses recent search (last 7 days). Full-archive search is available on the same pay-per-use X API plan but not yet implemented in this skill.
Open repositoryBest for
Primary workflow: Research & Ops.
Technical facets: Full Stack, Backend.
Target audience: everyone.
License: Unknown.
Original source
Catalog source: SkillHub Club.
Repository owner: rohunvora.
This is still a mirrored public skill entry. Review the repository before installing into production workflows.
What it helps with
- Install x-research into Claude Code, Codex CLI, Gemini CLI, or OpenCode workflows
- Review https://www.skillhub.club/skills/rohunvora-x-research before adding x-research to shared team environments
- Use x-research for development workflows
Works across
Favorites: 0.
Sub-skills: 0.
Aggregator: No.
Original source / Raw SKILL.md
---
name: x-research
description: >
General-purpose X/Twitter research agent. Searches X for real-time perspectives,
dev discussions, product feedback, cultural takes, breaking news, and expert opinions.
Works like a web research agent but uses X as the source.
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",
"/x-research", (2) user is working on something where recent X discourse would provide
useful context (new library releases, API changes, product launches, cultural events,
industry drama), (3) user wants to find what devs/experts/community thinks about a topic.
NOT for: posting tweets or account management. Note: currently uses recent search (last 7 days). Full-archive search is available on the same pay-per-use X API plan but not yet implemented in this skill.
---
# X Research
General-purpose agentic research over X/Twitter. Decompose any research question into targeted searches, iteratively refine, follow threads, deep-dive linked content, and synthesize into a sourced briefing.
For X API details (endpoints, operators, response format): read `references/x-api.md`.
## CLI Tool
All commands run from this skill directory:
```bash
cd ~/clawd/skills/x-research
source ~/.config/env/global.env
```
### Search
```bash
bun run x-search.ts 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). Also accepts minutes (`30m`) or ISO timestamps.
- `--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 (`-is:retweet -is:reply`), 1hr cache, cost summary
- `--from <username>` — shorthand for `from:username` in query
- `--quality` — filter low-engagement tweets (≥10 likes, post-hoc)
- `--no-replies` — exclude replies
- `--save` — save results to `~/clawd/drafts/x-research-{slug}-{date}.md`
- `--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
bun run x-search.ts search "BNKR" --sort likes --limit 10
bun run x-search.ts search "from:frankdegods" --sort recent
bun run x-search.ts search "(opus 4.6 OR claude) trading" --pages 2 --save
bun run x-search.ts search "$BNKR (revenue OR fees)" --min-likes 5
bun run x-search.ts search "BNKR" --quick
bun run x-search.ts search "BNKR" --from voidcider --quick
bun run x-search.ts search "AI agents" --quality --quick
```
### Profile
```bash
bun run x-search.ts profile <username> [--count N] [--replies] [--json]
```
Fetches recent tweets from a specific user (excludes replies by default).
### Thread
```bash
bun run x-search.ts thread <tweet_id> [--pages N]
```
Fetches full conversation thread by root tweet ID.
### Single Tweet
```bash
bun run x-search.ts tweet <tweet_id> [--json]
```
### Watchlist
```bash
bun run x-search.ts watchlist # Show all
bun run x-search.ts watchlist add <user> [note] # Add account
bun run x-search.ts watchlist remove <user> # Remove account
bun run x-search.ts watchlist check # Check recent from all
```
Watchlist stored in `data/watchlist.json`. Use for heartbeat integration — check if key accounts posted anything important.
### Cache
```bash
bun run x-search.ts cache clear # Clear all cached results
```
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
- **Crypto spam**: Add `-airdrop -giveaway -whitelist` if crypto topics flooding
### 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 `web_fetch`?
### 3. Follow Threads
When a tweet has high engagement or is a thread starter:
```bash
bun run x-search.ts thread <tweet_id>
```
### 4. Deep-Dive Linked Content
When tweets link to GitHub repos, blog posts, or docs, fetch with `web_fetch`. 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 to `~/clawd/drafts/x-research-{topic-slug}-{YYYY-MM-DD}.md`.
## Refinement Heuristics
- **Too much noise?** Add `-is:reply`, use `--sort likes`, narrow keywords
- **Too few results?** Broaden with `OR`, remove restrictive operators
- **Crypto spam?** Add `-$ -airdrop -giveaway -whitelist`
- **Expert takes only?** Use `from:` or `--min-likes 50`
- **Substance over hot takes?** Search with `has:links`
## Heartbeat Integration
On heartbeat, can run `watchlist check` to see if key accounts posted anything notable. Flag to Frank only if genuinely interesting/actionable — don't report routine tweets.
## File Structure
```
skills/x-research/
├── SKILL.md (this file)
├── x-search.ts (CLI entry point)
├── lib/
│ ├── api.ts (X API wrapper: search, thread, profile, tweet)
│ ├── cache.ts (file-based cache, 15min TTL)
│ └── format.ts (Telegram + markdown formatters)
├── data/
│ ├── watchlist.json (accounts to monitor)
│ └── cache/ (auto-managed)
└── references/
└── x-api.md (X API endpoint reference)
```
---
## Referenced Files
> The following files are referenced in this skill and included for context.
### references/x-api.md
```markdown
# X API Reference
## Authentication
Bearer token from env var `X_BEARER_TOKEN`.
```
-H "Authorization: Bearer $X_BEARER_TOKEN"
```
## Search Endpoints
### Recent Search (last 7 days)
```
GET https://api.x.com/2/tweets/search/recent
```
Covers last 7 days. Max 100 results per request. Available to all developers.
### Full-Archive Search (all time, back to March 2006)
```
GET https://api.x.com/2/tweets/search/all
```
Searches the complete Post archive. Max 500 results per request. Available on **pay-per-use** (same credits as recent search) and Enterprise. Same query operators, same response format. 1,024-char query length (vs 512 for recent).
**Note:** This skill currently only uses recent search. Full-archive is available on the same pay-per-use plan — no enterprise access required.
### Standard Query Params
```
tweet.fields=created_at,public_metrics,author_id,conversation_id,entities
expansions=author_id
user.fields=username,name,public_metrics
max_results=100
```
Add `sort_order=relevancy` for relevance ranking (default is recency).
Paginate with `next_token` from response `meta.next_token`.
### Search Operators
| Operator | Example | Notes |
|----------|---------|-------|
| keyword | `bun 2.0` | Implicit AND |
| `OR` | `bun OR deno` | Must be uppercase |
| `-` | `-is:retweet` | Negation |
| `()` | `(fast OR perf)` | Grouping |
| `from:` | `from:elonmusk` | Posts by user |
| `to:` | `to:elonmusk` | Replies to user |
| `#` | `#buildinpublic` | Hashtag |
| `$` | `$AAPL` | Cashtag |
| `lang:` | `lang:en` | BCP-47 language code |
| `is:retweet` | `-is:retweet` | Filter retweets |
| `is:reply` | `-is:reply` | Filter replies |
| `is:quote` | `is:quote` | Quote tweets |
| `has:media` | `has:media` | Contains media |
| `has:links` | `has:links` | Contains links |
| `url:` | `url:github.com` | Links to domain |
| `conversation_id:` | `conversation_id:123` | Thread by root tweet ID |
| `place_country:` | `place_country:US` | Country filter |
**Not available as search operators:** `min_likes`, `min_retweets`, `min_replies`. Filter engagement post-hoc from `public_metrics`.
**Limits:** Max query length 512 chars for recent search, 1,024 for full-archive (4,096 for Enterprise).
### Response Structure
```json
{
"data": [{
"id": "tweet_id",
"text": "...",
"author_id": "user_id",
"created_at": "2026-...",
"conversation_id": "root_tweet_id",
"public_metrics": {
"retweet_count": 0,
"reply_count": 0,
"like_count": 0,
"quote_count": 0,
"bookmark_count": 0,
"impression_count": 0
},
"entities": {
"urls": [{"expanded_url": "https://..."}],
"mentions": [{"username": "..."}],
"hashtags": [{"tag": "..."}]
}
}],
"includes": {
"users": [{"id": "user_id", "username": "handle", "name": "Display Name", "public_metrics": {...}}]
},
"meta": {"next_token": "...", "result_count": 100}
}
```
### Constructing Tweet URLs
```
https://x.com/{username}/status/{tweet_id}
```
Both values available from response data + user expansions.
### Linked Content
External URLs from tweets are in `entities.urls[].expanded_url`. Use WebFetch to deep-dive into linked pages (GitHub READMEs, blog posts, docs, etc.).
### Rate Limits
With pay-per-use pricing (Feb 2026+), rate limits are primarily controlled by spending limits you set in the Developer Console, not fixed per-window caps. The old 450/300 requests-per-15-min limits from the subscription model may no longer apply. If you hit a 429 error, the `x-rate-limit-reset` header tells you when to retry.
The skill uses a 350ms delay between requests as a safety buffer.
### Cost (Pay-Per-Use — Updated Feb 2026)
X API uses **pay-per-use pricing** with prepaid credits. No subscriptions, no monthly caps.
**Per-resource costs:**
| Resource | Cost |
|----------|------|
| Post read | $0.005 |
| User lookup | $0.010 |
| Post create | $0.010 |
A typical research session: 5 queries × 100 tweets = 500 post reads = ~$2.50.
**24-hour deduplication:** Same post requested multiple times within a UTC day = 1 charge. Re-running the same search within 24h costs significantly less.
**Billing details:**
- Purchase credits upfront at [console.x.com](https://console.x.com)
- Set auto-recharge (trigger amount + threshold) to avoid interruptions
- Set spending limits per billing cycle
- Failed requests are not billed
- Streaming (Filtered Stream): each unique post delivered counts, with 24h dedup
**Usage monitoring endpoint:**
```
GET https://api.x.com/2/usage/tweets
Authorization: Bearer $BEARER_TOKEN
```
Returns daily post consumption counts per app. Use for budget tracking and alerts.
**xAI credit bonus:**
| Cumulative spend (per cycle) | xAI credit rate |
|------------------------------|-----------------|
| $0 – $199 | 0% |
| $200 – $499 | 10% |
| $500 – $999 | 15% |
| $1,000+ | 20% |
Credits are rolling — order/size of purchases doesn't affect total rewards.
**Tracked endpoints (all count toward usage):**
- Post lookup, Recent search, Full-archive search
- Filtered stream, Filtered stream webhooks
- User posts/mentions timelines
- Liked posts, Bookmarks, List posts, Spaces lookup
## Single Tweet Lookup
```
GET https://api.x.com/2/tweets/{id}
```
Same fields/expansions params. Use for fetching specific tweets by ID.
```