From sundial-org-awesome-openclaw-skills-4
Real-time search of X/Twitter and the web via xAI's Grok API. Supports agentic multi-step searches with filters for handles, dates, and domains.
How this skill is triggered — by the user, by Claude, or both
Slash command
/sundial-org-awesome-openclaw-skills-4:xai-searchThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use xAI's agentic search to query X/Twitter and the web in real-time. This leverages Grok's `web_search` and `x_search` tools.
Use xAI's agentic search to query X/Twitter and the web in real-time. This leverages Grok's web_search and x_search tools.
Docs: https://docs.x.ai/docs/
XAI_API_KEY environment variablepip install xai-sdkcurl -s https://api.x.ai/v1/chat/completions \
-H "Authorization: Bearer $XAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-3-fast",
"messages": [{"role": "user", "content": "YOUR QUERY HERE"}],
"tools": [{"type": "function", "function": {"name": "web_search"}}]
}' | jq -r '.choices[0].message.content'
curl -s https://api.x.ai/v1/chat/completions \
-H "Authorization: Bearer $XAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-3-fast",
"messages": [{"role": "user", "content": "YOUR QUERY HERE"}],
"tools": [{"type": "function", "function": {"name": "x_search"}}]
}' | jq -r '.choices[0].message.content'
curl -s https://api.x.ai/v1/chat/completions \
-H "Authorization: Bearer $XAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-3-fast",
"messages": [{"role": "user", "content": "YOUR QUERY HERE"}],
"tools": [
{"type": "function", "function": {"name": "web_search"}},
{"type": "function", "function": {"name": "x_search"}}
]
}' | jq -r '.choices[0].message.content'
For convenience, use the xai-search.py script in the scripts/ folder:
# Web search (adjust path to your skill location)
python ~/.clawdbot/skills/xai-search/scripts/xai-search.py web "latest news about AI"
# X/Twitter search
python ~/.clawdbot/skills/xai-search/scripts/xai-search.py x "what are people saying about Clawdbot"
# Both
python ~/.clawdbot/skills/xai-search/scripts/xai-search.py both "current events today"
grok-3-fast — fast, good for quick searchesgrok-4-1-fast — reasoning model, better for complex queriesYou can filter X searches by:
allowed_x_handles / excluded_x_handles — limit to specific accountsfrom_date / to_date — date range (ISO8601 format)enable_image_understanding — analyze images in postsenable_video_understanding — analyze videos in postsallowed_domains / excluded_domains — limit to specific sitesenable_image_understanding — analyze images on pagesnpx claudepluginhub joshuarweaver/cascade-ai-ml-agents-misc-2 --plugin sundial-org-awesome-openclaw-skills-4Searches the web or X/Twitter using xAI Grok server-side tools via the xAI Responses API. Returns structured JSON with citations. Useful for fetching tweets, threads, or as an alternative to Brave search.
Performs AI-powered X/Twitter research via xAI Grok, returning AI summaries with analysis. Use for trending topics, social sentiment, and conversation summaries.
Searches X/Twitter via API v2 for real-time dev discussions, product feedback, breaking news, expert opinions. Supports engagement sorting, user profiles, thread fetching, watchlists, result caching. Useful for recent discourse on library releases, API changes, launches.