skills$openclaw/grok-search
notabhay7.3kβ˜…

by notabhay

grok-search – OpenClaw Skill

grok-search is an OpenClaw Skills integration for coding workflows. 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.

7.3k stars6.2k forksSecurity L1
Updated Feb 7, 2026Created Feb 7, 2026coding

Skill Snapshot

namegrok-search
descriptionSearch 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. OpenClaw Skills integration.
ownernotabhay
repositorynotabhay/grok-search
languageMarkdown
licenseMIT
topics
securityL1
installopenclaw add @notabhay/grok-search
last updatedFeb 7, 2026

Maintainer

notabhay

notabhay

Maintains grok-search in the OpenClaw Skills directory.

View GitHub profile
File Explorer
9 files
.
references
xai-tools-links.md
260 B
scripts
chat.mjs
4.5 KB
grok_search.mjs
12.3 KB
models.mjs
2.4 KB
selftest.mjs
5.3 KB
_meta.json
454 B
SKILL.md
2.4 KB
SKILL.md

name: grok-search description: 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. homepage: https://docs.x.ai/docs/guides/tools/search-tools triggers: ["grok", "xai", "search x", "search twitter", "find tweets", "x search", "twitter search", "web_search", "x_search"] metadata: {"clawdbot":{"emoji":"πŸ”Ž","requires":{"bins":["node"],"env":["XAI_API_KEY"]},"primaryEnv":"XAI_API_KEY"}}

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:

  • XAI_API_KEY env var
  • ~/.clawdbot/clawdbot.json β†’ env.XAI_API_KEY
  • ~/.clawdbot/clawdbot.json β†’ skills.entries["grok-search"].apiKey
  • fallback: skills.entries["search-x"].apiKey or skills.entries.xai.apiKey

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:

  • --links-only print just citation URLs
  • --text hide the citations section in pretty output
  • --raw include the raw Responses API payload on stderr (debug)

Common:

  • --max <n> limit results (default 8)
  • --model <id> (default grok-4-1-fast)

X-only filters (server-side via x_search tool params):

  • --days <n> (e.g. 7)
  • --from YYYY-MM-DD / --to YYYY-MM-DD
  • --handles @a,@b (limit to these handles)
  • --exclude @bots,@spam (exclude handles)

Output shape (JSON)

{
  "query": "...",
  "mode": "web" | "x",
  "results": [
    {
      "title": "...",
      "url": "...",
      "snippet": "...",
      "author": "...",
      "posted_at": "..."
    }
  ],
  "citations": ["https://..."]
}

Notes

  • citations are merged/validated from xAI response annotations where possible (more reliable than trusting the model’s JSON blindly).
  • Prefer --x for tweets/threads, --web for general research.
README.md

No README available.

Permissions & Security

Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.

Requirements

  • OpenClaw CLI installed and configured.
  • Language: Markdown
  • License: MIT
  • Topics:

FAQ

How do I install grok-search?

Run openclaw add @notabhay/grok-search in your terminal. This installs grok-search into your OpenClaw Skills catalog.

Does this skill run locally or in the cloud?

OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.

Where can I verify the source code?

The source repository is available at https://github.com/openclaw/skills/tree/main/skills/notabhay/grok-search. Review commits and README documentation before installing.