x-research

Searches X/Twitter via API to research topics, threads, and accounts with sourced briefings.

Updated Feb 27, 2026
One-click install
npx skills add https://github.com/gracefullight/cnn --skill x-research-gracefullight
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: x-research
Source: https://github.com/gracefullight/cnn/tree/main/.agents/skills/x-research
Command: npx skills add https://github.com/gracefullight/cnn --skill x-research-gracefullight

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Gathering real-time opinions, developer discussions, and breaking news from X/Twitter requires writing raw API calls, handling pagination, and filtering noise manually. This Skill wraps the X API into a CLI and an agentic research loop so an AI agent can decompose a question, run targeted searches, follow threads, and synthesize a sourced briefing without boilerplate. ## Core Features & Use Cases - Search CLI with filters: Query recent tweets with engagement sorting, time filters (--since 1h), quick mode, quality filtering, and per-search cost display. - Threads, profiles, and watchlists: Fetch full conversation threads, recent posts from any user, and monitor a stored watchlist of accounts for heartbeat checks. - Caching and cost control: File-based cache (15-minute or 1-hour TTL) avoids repeat API charges, and every search reports its estimated pay-per-use cost. - Use Case: Ask "What are people saying about the new Opus release?" and the agent runs multiple refined searches, follows high-engagement threads, deep-dives linked resources, and saves a markdown research doc with quoted, linked sources. ## Quick Start Ask the agent to search X for what people are saying about a topic, for example: "Do an x research on what developers think about Bun 2.0 and summarize the key opinions with sources."

Frequently Asked Questions about x-research

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search X/Twitter from the command line?▼

Run `bun run x-search.ts search "your query" --sort likes --limit 10` from the skill directory with X_BEARER_TOKEN set. The CLI handles pagination, noise filtering, engagement sorting, and prints an estimated API cost after each search.

What X API access do I need for tweet search?▼

You need a bearer token from the X Developer Portal with prepaid pay-per-use credits. Post reads cost $0.005 each, so a single search page of up to 100 tweets costs roughly $0.50, with 24-hour deduplication reducing repeat charges.

Can I search tweets older than 7 days with the X API?▼

This skill currently uses only the recent search endpoint covering the last 7 days. The full-archive endpoint is available on the same pay-per-use plan but is not yet implemented in the CLI.

How do I monitor specific Twitter accounts for new posts?▼

Add accounts with `bun run x-search.ts watchlist add username "note"`, then run `watchlist check` to fetch recent tweets from all saved accounts. This is designed for heartbeat integration to flag notable posts.

Why am I getting rate limited on X API searches?▼

A 429 response means you hit a limit; the x-rate-limit-reset header indicates when to retry. The skill adds a 350ms delay between paginated requests, and its file cache prevents re-fetching identical queries within the TTL window.

Does the X API support min_likes as a search operator?▼

No, min_likes and min_retweets are not available as search operators. The skill fetches public_metrics and filters engagement post-hoc using the --min-likes, --min-impressions, or --quality flags.