aydencook03

xAI Search

知識管理v1.0.4
作者:aydencook03更新於 2026-05-11共 5 個版本 · 最新版本釋出於 2026-01-28xai-search@clawhub_aydencook03/xai-search
知識庫問答資訊檢索#Agentic#Twitter

據 AlphaMoat 統計,截至 2026-09,xAI Search 累計下載 3,866 次、獲 1 個星標,在全部 5,078 個 AI 技能中排名第 2,693 位,在「知識管理」分類(442 個)中排名第 246 位。

累計安裝
240
累計下載
3866
星標
1
全站排名
#2,693
全站前 54% · 「知識管理」前 56%
平台累計安裝累計下載星標評論
ClawHub ↗12836821-
SkillHub ↗24038661—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

該技能透過 xAI 的 Grok API 即時搜尋 X/Twitter 和網頁,利用 grok-3-fast 等模型的 web_search 與 x_search 智慧體工具,支援 curl 直接呼叫或 scripts/xai-search.py 輔助指令碼,可按賬號、日期範圍、圖片/影片理解等過濾 X 搜尋,按域名過濾 Web 搜尋;突發新聞與輿情用 X 搜尋,事實與研究類查詢用 Web 搜尋或兩者並用。

資料釋出於 2026-10-27

可以用來做什麼

  • 用 x_search 即時搜尋 X 上人們對某個話題的最新討論與情緒
  • 用 web_search 做事實核查或研究類查詢,並可限定 allowed_domains
  • 透過 allowed_x_handles/excluded_x_handles 限定或排除特定賬號
  • 開啟 enable_image_understanding/enable_video_understanding 分析帖子中的圖片與影片
  • 複雜查詢改用 grok-4-1-fast 推理模型獲得更好的效果

什麼時候用

  • 需要即時資訊、突發新聞或 X 上的公眾情緒時優先用 X 搜尋
  • 需要事實性、研究型答案時用 Web 搜尋或兩者組合
  • 已配置 XAI_API_KEY 環境變數並安裝 xai-sdk 時

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

用 x_search 搜一下最近大家在 X 上對 AI Agent 的評價和情緒
用 web_search 查最新新聞,允許的域名限定在主流科技媒體
把這個研究型查詢交給 grok-4-1-fast,同時啟用 web_search 和 x_search

月度資料趨勢

累計下載3866
2900341939382026-03 · 累計下載 29722026-05 · 累計下載 32952026-06 · 累計下載 33872026-07 · 累計下載 35652026-08 · 累計下載 36292026-09 · 累計下載 386626-0326-09
星標1
0122026-03 · 星標 12026-05 · 星標 12026-06 · 星標 12026-07 · 星標 12026-08 · 星標 12026-09 · 星標 126-0326-09

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-093866—1
2026-083629+1.8%1
2026-073565+5.3%1
2026-063387+2.8%1
2026-053295—1
2026-032972—1

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

2.9 KB · ClawHub v1.0.4
---
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":"🔍"}}
---

# xAI Search (Grok API)

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.
展開全部(共 98 行)
**Docs:** https://docs.x.ai/docs/

## Requirements

- `XAI_API_KEY` environment variable
- Python 3 + xai-sdk: `pip install xai-sdk`

## Quick Usage (curl)

### Web Search
```bash
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"}}]
  }' | jq -r '.choices[0].message.content'
```

### X/Twitter Search
```bash
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'
```

### Combined (Web + X)
```bash
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'
```

## Helper Script

For convenience, use the `xai-search.py` script in the `scripts/` folder:

```bash
# 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"
```

## Models

- `grok-3-fast` — fast, good for quick searches
- `grok-4-1-fast` — reasoning model, better for complex queries

## X Search Filters

You can filter X searches by:
- `allowed_x_handles` / `excluded_x_handles` — limit to specific accounts
- `from_date` / `to_date` — date range (ISO8601 format)
- `enable_image_understanding` — analyze images in posts
- `enable_video_understanding` — analyze videos in posts

## Web Search Filters

- `allowed_domains` / `excluded_domains` — limit to specific sites
- `enable_image_understanding` — analyze images on pages

## Tips

- For breaking news: use X search
- For factual/research queries: use web search or both
- For sentiment/opinions: use X search
- The model will make multiple search calls if needed (agentic)

「知識管理」分類下的熱門技能

資料月份:2026-09 · 下載/星標/安裝數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。