# Grok Search

> Use when an AI agent needs Grok-powered web or X search with JSON-first output, citations, domain or handle filters, and optional text rendering for human inspection.

- Skill: `wangnov/grok-search` (Agent Skill, multi-file: 5 files)
- Install (CLI): `npx skillmds@latest add wangnov/grok-search`
- Raw SKILL.md: https://api.skillmd.com/api/skills/wangnov/grok-search/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: wangnov (https://skillmd.com/u/wangnov)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/wangnov/grok-search

---


Use this skill when:

- an AI agent needs current web evidence
- an AI agent needs current X evidence
- the caller wants JSON-first output with citations
- the caller needs explicit control over domains, handles, dates, or depth

Environment:

- requires `XAI_API_KEY`
- also reads optional `.env.local` and `.env` from the caller's current working directory

Behavior:

- JSON-first by default
- citations are preserved in normalized output
- text mode is available for manual inspection
- image understanding is enabled for web and X search
- video understanding is enabled for X search

Run:

- `node {baseDir}/scripts/grok-search.mjs "query"`
- `node {baseDir}/scripts/grok-search.mjs "query" --mode x`
- `node {baseDir}/scripts/grok-search.mjs "query" --format text`
- `node {baseDir}/scripts/selftest.mjs`

References:

- see `references/xai-search-capabilities.md` for the supported search surface

