mirror of
https://github.com/hanzoskill/grok-search.git
synced 2026-10-30 21:00:47 +00:00
1.3 KiB
1.3 KiB
name, description, metadata
| name | description | metadata | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| grok-search | Search the web or X/Twitter using xAI Grok server-side tools (web_search, x_search) via the xAI Responses API. Use when you need tweets/threads/users from X, or want Grok as an alternative search provider. |
|
Use Grok search via the bundled script and return structured results.
Prereqs
XAI_API_KEYmust be set (env var), or present at~/.bot/bot.jsonunderenv.XAI_API_KEY.
Run
From the agent workspace root (or cd into this skill folder):
-
Web search (JSON):
node skills/grok-search/scripts/grok_search.mjs "<query>" --web --json --max 10
-
X/Twitter search (JSON):
node skills/grok-search/scripts/grok_search.mjs "<query>" --x --json --max 10
Optional:
--max <n>limit results--model <id>(default:grok-4-1-fast)
Output shape
The script returns JSON:
{ "query": string, "mode": "web"|"x", "results": [{"title": string|null, "url": string|null, "snippet": string|null}], "citations": [string] }
Tips
- Prefer
--xwhen the user asks for tweets, threads, or “what’s happening on X”. - Use
--webfor general web research, especially when you want xAI citations. - If results are too broad, tighten query terms (add @handles, exact phrases, time hints like “2026”).