xai-plusSearch X/Twitter and the web, chat with Grok models (text + vision), and analyze X content using xAI's API. Use when: searching X posts/threads, web research via Grok, chatting with Grok, analyzing voice patterns, researching trends, or checking post quality. Triggers: grok, xai, search x, search twitter, x search, ask grok, grok chat, analyze voice, x trends.
Install via ClawdBot CLI:
clawdbot install mischasigtermans/xai-plusSearch X (Twitter), search the web, chat with Grok models (including vision), and analyze X content patterns using xAI's API.
Get your xAI API key from console.x.ai.
# Via clawdbot config (recommended)
clawdbot config set skills.entries.xai-plus.apiKey "xai-YOUR-KEY"
# Or environment variable
export XAI_API_KEY="xai-YOUR-KEY"
The scripts check these locations in order:
XAI_API_KEY env var~/.clawdbot/clawdbot.json ā env.XAI_API_KEY~/.clawdbot/clawdbot.json ā skills.entries.xai-plus.apiKey~/.clawdbot/clawdbot.json ā skills.entries["grok-search"].apiKey (fallback)Override the default model (grok-4-1-fast):
# Via config
clawdbot config set skills.entries.xai-plus.model "grok-3"
# Or environment variable
export XAI_MODEL="grok-3"
Model priority:
--model flag (highest priority)XAI_MODEL env var~/.clawdbot/clawdbot.json ā env.XAI_MODEL~/.clawdbot/clawdbot.json ā skills.entries.xai-plus.modelgrok-4-1-fastSearch X posts and threads with optional filters.
Basic search:
node {baseDir}/scripts/grok_search.mjs "query" --x
With date filter:
# Last 7 days
node {baseDir}/scripts/grok_search.mjs "Claude AI" --x --days 7
# Specific date range
node {baseDir}/scripts/grok_search.mjs "AI agents" --x --from 2026-01-01 --to 2026-01-31
Filter by handles:
# Only from specific accounts
node {baseDir}/scripts/grok_search.mjs "AI news" --x --handles @AnthropicAI,@OpenAI
# Exclude accounts
node {baseDir}/scripts/grok_search.mjs "GPT" --x --exclude @spam1,@spam2
Output formats:
# JSON (default, agent-friendly)
node {baseDir}/scripts/grok_search.mjs "query" --x
# Links only
node {baseDir}/scripts/grok_search.mjs "query" --x --links-only
# Human-readable text
node {baseDir}/scripts/grok_search.mjs "query" --x --text
JSON output schema:
{
"query": "search query",
"mode": "x",
"results": [
{
"title": "@handle",
"url": "https://x.com/handle/status/123",
"snippet": "Post text...",
"author": "@handle",
"posted_at": "2026-01-15T10:30:00Z"
}
],
"citations": ["https://x.com/..."]
}
Search the web via Grok.
node {baseDir}/scripts/grok_search.mjs "TypeScript best practices 2026" --web
JSON output schema:
{
"query": "search query",
"mode": "web",
"results": [
{
"title": "Page title",
"url": "https://example.com/page",
"snippet": "Description...",
"author": null,
"posted_at": null
}
],
"citations": ["https://example.com/..."]
}
| Flag | Description | Example |
|------|-------------|---------|
| --x | Search X/Twitter | Required for X search |
| --web | Search the web | Required for web search |
| --days N | Last N days (X only) | --days 7 |
| --from YYYY-MM-DD | Start date (X only) | --from 2026-01-01 |
| --to YYYY-MM-DD | End date (X only) | --to 2026-01-31 |
| --handles a,b | Only these accounts (X only) | --handles @user1,@user2 |
| --exclude a,b | Exclude accounts (X only) | --exclude @spam |
| --max N | Max results | --max 20 |
| --model ID | Override model | --model grok-3 |
| --json | JSON output (default) | - |
| --links-only | Just URLs | - |
| --text | Human-readable | - |
| --raw | Include debug output | - |
See references/search-patterns.md for advanced query patterns and optimization tips.
Ask Grok anything.
node {baseDir}/scripts/chat.mjs "What is quantum computing?"
With model override:
node {baseDir}/scripts/chat.mjs --model grok-3 "Explain transformers in ML"
JSON output:
node {baseDir}/scripts/chat.mjs --json "What is TypeScript?"
JSON schema:
{
"model": "grok-4-1-fast",
"prompt": "What is TypeScript?",
"text": "TypeScript is...",
"citations": ["https://..."]
}
Analyze images with Grok.
node {baseDir}/scripts/chat.mjs --image ./screenshot.png "What's in this image?"
Multiple images:
node {baseDir}/scripts/chat.mjs --image ./pic1.jpg --image ./pic2.jpg "Compare these"
Supported formats: JPG, PNG, WebP, GIF
| Flag | Description | Example |
|------|-------------|---------|
| --model ID | Model to use | --model grok-2-vision-1212 |
| --image PATH | Attach image (can repeat) | --image ./pic.jpg |
| --json | JSON output | - |
| --raw | Include debug output | - |
See references/models.md for model comparison and capabilities.
Analyze X content for voice patterns, trends, and post quality.
Analyze an account's voice and writing patterns.
node {baseDir}/scripts/analyze.mjs voice @username
Custom date range:
# Last 60 days
node {baseDir}/scripts/analyze.mjs voice @username --days 60
JSON output schema:
{
"handle": "@username",
"analyzed_posts": 150,
"voice": {
"tone": "casual, technical",
"personality": ["curious", "direct", "helpful"],
"perspective": "practitioner sharing lessons",
"energy_level": "medium"
},
"patterns": {
"sentence_structure": ["short declarative", "occasional fragments"],
"vocabulary": ["technical", "accessible"],
"formatting_quirks": ["line breaks for emphasis", "minimal punctuation"],
"recurring_phrases": ["here's the thing", "turns out"]
},
"topics": ["AI", "software engineering", "startups"],
"best_posts": [
{
"url": "https://x.com/username/status/123",
"text": "Post text...",
"why": "Authentic voice, specific example"
}
],
"anti_patterns": ["never uses em-dashes", "avoids numbered lists"]
}
Research trends and discussions about a topic.
node {baseDir}/scripts/analyze.mjs trends "AI agents"
JSON output schema:
{
"topic": "AI agents",
"trends": [
{
"pattern": "Shift from chatbots to autonomous agents",
"description": "Discussion focuses on...",
"example_posts": ["https://x.com/..."]
}
],
"perspectives": [
{
"viewpoint": "Agents will replace most SaaS",
"supporters": ["@user1", "@user2"]
}
],
"hashtags": ["#AIAgents", "#AutonomousAI"],
"key_accounts": ["@researcher1", "@founder2"],
"posting_angles": [
{
"angle": "Practical implementation challenges",
"hook": "Everyone talks about AI agents. Nobody talks about...",
"target_audience": "Engineers building with AI"
}
]
}
Check a draft post or existing post for AI signals and platform flag patterns.
Check draft text:
node {baseDir}/scripts/analyze.mjs post "Your draft post text here"
Check existing post:
node {baseDir}/scripts/analyze.mjs post --url "https://x.com/user/status/123"
JSON output schema:
{
"post_text": "Your post...",
"ai_detection_score": 3,
"ai_signals": [
"Contains em-dash",
"Ends with engagement bait question"
],
"platform_flag_score": 2,
"platform_risks": [
"Generic question could trigger spam filter"
],
"quality_score": 7,
"suggestions": [
"Replace em-dash with period or comma",
"Remove 'What do you think?' closer",
"Add specific personal detail"
]
}
Scoring:
| Flag | Description | Example |
|------|-------------|---------|
| --days N | Date range for analysis | --days 60 |
| --url URL | Analyze existing post | --url https://x.com/... |
| --model ID | Override model | --model grok-3 |
| --json | JSON output | - |
| --raw | Include debug output | - |
See references/analysis-prompts.md for detailed prompt structures and scoring criteria.
List available xAI models.
node {baseDir}/scripts/models.mjs
Output:
grok-2-vision-1212
grok-3
grok-4-1-fast
grok-4-fast
JSON output:
node {baseDir}/scripts/models.mjs --json
Quick model comparison:
| Model | Speed | Quality | Vision | Best For |
|-------|-------|---------|--------|----------|
| grok-4-1-fast | Fast | Good | No | Default (search, chat, analysis) |
| grok-4-fast | Fast | Good | No | Alternative fast model |
| grok-3 | Slower | Best | No | Complex reasoning, detailed analysis |
| grok-2-vision-1212 | Medium | Good | Yes | Image analysis |
See references/models.md for detailed model capabilities and use cases.
For X searches, the tool automatically deduplicates tweet URLs, preferring canonical /@handle/status/id over /i/status/id format.
Override the default model for any operation:
# Search with grok-3 for better quality
node {baseDir}/scripts/grok_search.mjs "complex query" --x --model grok-3
# Chat with vision model
node {baseDir}/scripts/chat.mjs --model grok-2-vision-1212 --image pic.jpg "Describe"
# Analysis with grok-3 for deeper insights
node {baseDir}/scripts/analyze.mjs voice @username --model grok-3
Add --raw to any command to see the full API response:
node {baseDir}/scripts/grok_search.mjs "query" --x --raw
# Find recent discussions
node {baseDir}/scripts/grok_search.mjs "Claude Sonnet 4.5" --x --days 3
# Get trend analysis
node {baseDir}/scripts/analyze.mjs trends "Claude Sonnet 4.5"
# Study the target account
node {baseDir}/scripts/analyze.mjs voice @target_account --days 30
# Check your draft
node {baseDir}/scripts/analyze.mjs post "Your draft here"
# Search web for context
node {baseDir}/scripts/grok_search.mjs "TypeScript 5.7 features" --web
# Ask follow-up
node {baseDir}/scripts/chat.mjs "What are the key TypeScript 5.7 improvements?"
# Analyze screenshot
node {baseDir}/scripts/chat.mjs --image ./code.png "Review this code"
Common errors and solutions:
Missing API key:
Missing XAI_API_KEY
ā Set XAI_API_KEY environment variable or add to ~/.clawdbot/clawdbot.json
Invalid mode:
Must specify --web or --x
ā Add --web or --x flag to search command
Image format error:
Unsupported image type
ā Use JPG, PNG, WebP, or GIF format
API error:
xAI API error: 401 Unauthorized
ā Check API key is valid and active
grok-4-1-fast) is fast and good for most tasksgrok-3 for complex analysis or when quality matters more than speedNo results from X search:
Voice analysis incomplete:
--days to get more post historyAPI rate limits:
Use the analysis tools to improve your X content:
# Research before writing
node {baseDir}/scripts/analyze.mjs trends "your topic"
node {baseDir}/scripts/grok_search.mjs "your topic" --x --days 7
# Study voice patterns
node {baseDir}/scripts/analyze.mjs voice @target_account
# Check draft before posting
node {baseDir}/scripts/analyze.mjs post "$(cat draft.txt)"
Use the JSON output to:
Generated Mar 1, 2026
Brands can use this skill to monitor mentions, analyze sentiment, and track trends about their products or competitors on X. It helps in real-time reputation management and campaign effectiveness assessment by filtering posts by date and specific handles.
Researchers can leverage the skill to gather data from X and the web on emerging topics like AI advancements or public opinion. The date filters and JSON output facilitate systematic data collection for studies on social trends or misinformation patterns.
Content creators and journalists can search X for breaking news, verify sources, and analyze voice patterns to understand influencer styles. The vision chat feature allows analyzing images for fact-checking or generating descriptive captions for multimedia content.
Businesses can use the skill to search for customer complaints or feedback on X, analyze post quality for safety, and respond proactively. The chat functionality enables quick answers to common queries, enhancing customer service efficiency.
Offer a subscription-based platform that integrates this skill to provide businesses with automated X search, trend reports, and voice analysis. Revenue comes from tiered plans based on usage limits and advanced features like custom model overrides.
Consultants can use the skill to offer specialized services such as social media audits, competitive analysis, or content strategy development. Revenue is generated through project-based fees or hourly rates for tasks like analyzing voice patterns or web research.
Develop and sell integrations of this skill into existing platforms like CRM systems or marketing tools, providing white-label solutions. Revenue streams include licensing fees, API usage charges, and custom development contracts for enterprises.
š¬ Integration Tip
Ensure the XAI_API_KEY is securely configured via clawdbot or environment variables, and test search commands with simple queries before scaling to complex analyses to avoid API limits.
Summarize URLs or files with the summarize CLI (web, PDFs, images, audio, YouTube).
AI-optimized web search via Tavily API. Returns concise, relevant results for AI agents.
This skill should be used when users need to search the web for information, find current content, look up news articles, search for images, or find videos. It uses DuckDuckGo's search API to return results in clean, formatted output (text, markdown, or JSON). Use for research, fact-checking, finding recent information, or gathering web resources.
Web search and content extraction via Brave Search API. Use for searching documentation, facts, or any web content. Lightweight, no browser required.
Search indexed Discord community discussions via Answer Overflow. Find solutions to coding problems, library issues, and community Q&A that only exist in Discord conversations.
Multi search engine integration with 17 engines (8 CN + 9 Global). Supports advanced search operators, time filters, site search, privacy engines, and WolframAlpha knowledge queries. No API keys required.