Search X

Real-time X/Twitter search powered by Grok-4. Find tweets, trends, and discussions with citations. Grok-4.20 also returns image results alongside tweet citat...

MIT-0 · Free to use, modify, and redistribute. No attribution required.
21 · 4.8k · 27 current installs · 27 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description claim real-time X search via Grok/xAI and the package only asks for an xAI API key and optionally reads a local clawdbot config for the same key. The code calls api.x.ai/v1/responses with an x_search tool payload — consistent with the stated purpose.
Instruction Scope
SKILL.md instructs running the bundled Node script and setting XAI_API_KEY (or the clawdbot config) which the script uses. A static scan flagged a 'system-prompt-override' pattern; this skill intentionally constructs a system prompt (payload.input) for the x_search tool when calling the Responses API, which explains the finding. There is no instruction to read unrelated files or to transmit data to endpoints other than api.x.ai.
Install Mechanism
No install spec; the skill is instruction-only plus a small local JS script. There are no downloads from untrusted URLs, no extract operations, and no package installs performed by the skill at runtime.
Credentials
Only XAI_API_KEY is required (declared as primary). The script also respects optional SEARCH_X_MODEL and SEARCH_X_DAYS. It will attempt to read ~/.clawdbot/clawdbot.json to find a stored apiKey as a convenience fallback — this is consistent with its purpose but means it will read that config file if present.
Persistence & Privilege
The skill does not request permanent inclusion (always=false), does not modify other skills or system-wide settings, and does not write persistent data. It only reads a local config file if present.
Scan Findings in Context
[system-prompt-override] expected: The script builds a 'systemPrompt' string and includes it in the payload.input sent to x.ai. A detector flagged this as a potential system-prompt override, but providing a prompt in the API payload is expected behavior for an LLM-based search tool; review the prompt text if you are concerned.
Assessment
This skill appears to do what it claims: it uses your xAI API key to query api.x.ai for X/Twitter results. Before installing: 1) Only provide an XAI_API_KEY you trust and that has appropriate permissions. 2) If you have a ~/.clawdbot/clawdbot.json file, the script will read it to try to find an API key — remove sensitive keys if you don't want them reused. 3) Review the script (scripts/search.js) yourself if you have concerns; it only makes HTTPS requests to api.x.ai and prints results. 4) If you plan to run this in a sensitive environment, consider running it in an isolated container or environment to limit exposure of any local config files.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.2.1
Download zip
latestvk977pfntp7j9jmmhxqxdc9h7e182eqe0

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

Runtime requirements

🔍 Clawdis
EnvXAI_API_KEY
Primary envXAI_API_KEY

SKILL.md

Search X

Real-time X/Twitter search powered by Grok's x_search tool. Get actual tweets with citations.

Setup

Set your xAI API key:

openclaw config set skills.entries.search-x.apiKey "xai-YOUR-KEY"

Or use environment variable:

export XAI_API_KEY="xai-YOUR-KEY"

Get your API key at: https://console.x.ai

Commands

Basic Search

node {baseDir}/scripts/search.js "AI video editing"

Filter by Time

node {baseDir}/scripts/search.js --days 7 "breaking news"
node {baseDir}/scripts/search.js --days 1 "trending today"

Filter by Handles

node {baseDir}/scripts/search.js --handles @elonmusk,@OpenAI "AI announcements"
node {baseDir}/scripts/search.js --exclude @bots "real discussions"

Output Options

node {baseDir}/scripts/search.js --json "topic"        # Full JSON response
node {baseDir}/scripts/search.js --compact "topic"     # Just tweets, no fluff
node {baseDir}/scripts/search.js --links-only "topic"  # Just X links

Example Usage in Chat

User: "Search X for what people are saying about Claude Code" Action: Run search with query "Claude Code"

User: "Find tweets from @remotion_dev in the last week" Action: Run search with --handles @remotion_dev --days 7

User: "What's trending about AI on Twitter today?" Action: Run search with --days 1 "AI trending"

User: "Search X for Remotion best practices, last 30 days" Action: Run search with --days 30 "Remotion best practices"

How It Works

Uses xAI's Responses API (/v1/responses) with the x_search tool:

  • Model: grok-4-1-fast (optimized for agentic search)
  • Returns real tweets with URLs
  • Includes citations for verification
  • Supports date and handle filtering

Response Format

Each result includes:

  • @username (display name)
  • Tweet content
  • Date/time
  • Direct link to tweet

Environment Variables

  • XAI_API_KEY - Your xAI API key (required)
  • SEARCH_X_MODEL - Model override (default: grok-4-1-fast)
  • SEARCH_X_DAYS - Default days to search (default: 30)

Files

5 total
Select a file
Select a file to preview.

Comments

Loading comments…