Awesome-openclaw-skills 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, want Grok as an alternative to Brave, or you need structured JSON + citations.
install
source · Clone the upstream repo
git clone https://github.com/sundial-org/awesome-openclaw-skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/sundial-org/awesome-openclaw-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/grok-search" ~/.claude/skills/sundial-org-awesome-openclaw-skills-grok-search && rm -rf "$T"
OpenClaw · Install into ~/.openclaw/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/sundial-org/awesome-openclaw-skills "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/grok-search" ~/.openclaw/skills/sundial-org-awesome-openclaw-skills-grok-search && rm -rf "$T"
manifest:
skills/grok-search/SKILL.mdsource content
Run xAI Grok locally via bundled scripts (search + chat + model listing). Default output for search is pretty JSON (agent-friendly) with citations.
API key
The script looks for an xAI API key in this order:
env varXAI_API_KEY
→~/.clawdbot/clawdbot.jsonenv.XAI_API_KEY
→~/.clawdbot/clawdbot.jsonskills.entries["grok-search"].apiKey- fallback:
orskills.entries["search-x"].apiKeyskills.entries.xai.apiKey
Run
Use
{baseDir} so the command works regardless of workspace layout.
Search
-
Web search (JSON):
node {baseDir}/scripts/grok_search.mjs "<query>" --web
-
X/Twitter search (JSON):
node {baseDir}/scripts/grok_search.mjs "<query>" --x
Chat
-
Chat (text):
node {baseDir}/scripts/chat.mjs "<prompt>"
-
Chat (vision):
node {baseDir}/scripts/chat.mjs --image /path/to/image.jpg "<prompt>"
Models
- List models:
node {baseDir}/scripts/models.mjs
Useful flags
Output:
print just citation URLs--links-only
hide the citations section in pretty output--text
include the raw Responses API payload on stderr (debug)--raw
Common:
limit results (default 8)--max <n>
(default--model <id>
)grok-4-1-fast
X-only filters (server-side via x_search tool params):
(e.g. 7)--days <n>
/--from YYYY-MM-DD--to YYYY-MM-DD
(limit to these handles)--handles @a,@b
(exclude handles)--exclude @bots,@spam
Output shape (JSON)
{ "query": "...", "mode": "web" | "x", "results": [ { "title": "...", "url": "...", "snippet": "...", "author": "...", "posted_at": "..." } ], "citations": ["https://..."] }
Notes
are merged/validated from xAI response annotations where possible (more reliable than trusting the model’s JSON blindly).citations- Prefer
for tweets/threads,--x
for general research.--web