Search X/Twitter and the web in real-time using xAI's Grok API with agentic search tools.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install xai-search或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install xai-search⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/xai-search/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: xai-search description: Search X/Twitter and the web in real-time using xAI's Grok API with agentic search tools. metadata: {"clawdbot":{"emoji":"🔍"}} ---
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 pages安装 xAI Search 后,可以对 AI 说这些话来触发它
Help me get started with xAI Search
Explains what xAI Search does, walks through the setup, and runs a quick demo based on your current project
Use xAI Search to search X/Twitter and the web in real-time using xAI's Grok API with...
Invokes xAI Search with the right parameters and returns the result directly in the conversation
What can I do with xAI Search in my marketing & growth workflow?
Lists the top use cases for xAI Search, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/xai-search/ 目录(个人级,所有项目可用),或 .claude/skills/xai-search/(项目级)。重启 AI 客户端后,用 /xai-search 主动调用,或让 AI 根据上下文自动发现并使用。
xAI Search 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
xAI Search 可免费安装使用。请查阅仓库了解许可证信息。
Search X/Twitter and the web in real-time using xAI's Grok API with agentic search tools.
xAI Search 属于「Marketing & Growth」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my marketing & growth tasks using xAI Search
Identifies repetitive steps in your workflow and sets up xAI Search to handle them automatically