grok-search
Skill19 starsChanged 4 months agoMITView on GitHub
Use when the user explicitly asks to search the web, check latest/current facts, fetch a URL, or discover pages on a website. Also use when the user asks to install, configure, or setup grok-search (API URL/key, chat vs responses). Do not use for local code search or stable offline knowledge unless the user asks for live web access.
- Reads credentials
10 other projects use a version of this.
Adopted by
Most recently taken up by
- dengyie/awesome-skillstheir own version, first seen Oct 31, 2026
- BlueOcean223/grok-searchtheir own version, first seen Oct 27, 2026
- tanuuuuuuu/dotfilestheir own version, first seen Oct 20, 2026
- Frankieli123/grok-skilltheir own version, first seen Oct 8, 2026
- kaichen/agent-skillsettheir own version, first seen Sep 15, 2026
- Dianel555/DSkillstheir own version, first seen Sep 6, 2026
Other versions10 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 10
- Frankieli123/grok-skill★ 182same name
- jikssha/openclaw-dae-skills★ 98same name
- dengyie/awesome-skills★ 78same name
- Dianel555/DSkills★ 65same name
- BlueOcean223/grok-search★ 59same name
- JinchengGao-Infty/agent-loadout★ 3same name
- kaichen/agent-skillset★ 1same name
- yutakobayashidev/skills★ 1same name
- Lanfei/grok-search-skill★ 0same name
- tanuuuuuuu/dotfiles★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 4 are distinctive, and 8 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
When the user asks to install / configure / setup this skill, follow README.md →「Agent 安装与配置向导」 (English: README.en.md →「Agent setup …
- Very specific: line 22
Success: if exit 0, no error, diagnostics.grok_endpoint matches choice, non-empty answer.text.
- Very specific: line 25
If search later returns GROK_API_URL 未配置 or GROK_API_KEY 未配置, run this wizard instead of inventing env vars.
- Distinctive: line 35
Do not chain map → fetch → search by default.
- Very specific: line 55
Use ./scripts/fetch.js --max-chars 50000 URL only for an explicit deep read after the preview shows the page is worth reading.
- Very specific: line 63
Search supports two Grok protocols via searchEndpoint / --search-endpoint:
- Very specific: line 70
If Grok quota is explicitly exhausted, search.js may return a visibly marked degraded answer made from raw Tavily/Firecrawl results.
- Distinctive: line 76
Check in this order:
- Very specific: line 80
Search success: read answer.text, then sources.merged.
- Very specific: line 81
Search: inspect diagnostics.grok_endpoint, diagnostics.degraded, diagnostics.cost_usd, provider attempts, and sources.grok[].source_type …
- Distinctive: line 85
Search and fetch are intentionally separated.
- Very specific: line 98
If search.js returns GROK_API_URL 未配置 or GROK_API_KEY 未配置, the project itself is missing required setup — point the user at README.md …
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Grok Search
Node scripts for web search, URL fetch, and lightweight site mapping. Run npm install once if dependencies are not installed, then run the scripts directly — there is no MCP server or extension to call.
Install Or Configure (agent wizard)
When the user asks to install / configure / setup this skill, follow README.md →「Agent 安装与配置向导」 (English: README.en.md →「Agent setup wizard」). Do not improvise a shorter flow.
Order:
- Self-check Node
>=18.17, skill path,npm install, existing~/.config/grok-search/config.json(mask any key). - Ask protocol:
chat(grok2api/NewAPI;grok-4.3-fast/grok-4.20-*) vsresponses(CPA-style; oftengrok-4.5only). - Ask
apiUrl(base only) andapiKey(never echo full key). - Ask model id; write
~/.config/grok-search/config.jsonwith mode600. - Ask whether to test. Only if yes, run:
node "$SKILL_ROOT/scripts/search.js" --no-extra "随便搜个新闻" - Success if exit 0, no
error,diagnostics.grok_endpointmatches choice, non-emptyanswer.text. - On failure, branch by
error/ HTTP status / empty search (401 key, 404 protocol/URL, 422 model, quota, proxy, model_not_found, no citations) and ask the user for the specific fix — then retest only if they agree.
If search later returns GROK_API_URL 未配置 or GROK_API_KEY 未配置, run this wizard instead of inventing env vars.
Choose The Script
Decide before running, by what the user already gave you:
- They gave a URL and asked what it says →
scripts/fetch.js. - They named a site but no URL, and want to know what is on it →
scripts/map.js, thenfetch.json the URLs you pick. - They want current/latest information, or the URL is unknown →
scripts/search.js.
Do not chain map → fetch → search by default. Run the fewest commands that answer the question. If sub-questions are independent (different sites, unrelated facts), launch the commands in parallel instead of sequentially.
Commands
./scripts/search.js "query"
./scripts/search.js --search-endpoint chat --model grok-4.3-fast "query"
./scripts/search.js --platform GitHub "query"
./scripts/search.js --extra 10 "query"
./scripts/search.js --no-extra "query"
./scripts/search.js --source-chars 200 "query"
./scripts/search.js --responses-openrouter-engine exa "strict web-only query"
./scripts/search.js --responses-x-search --responses-allowed-x-handles xai,OpenAI "query"./scripts/fetch.js https://example.com
./scripts/fetch.js --provider direct https://example.comUse ./scripts/fetch.js --max-chars 50000 URL only for an explicit deep read after the preview shows the page is worth reading.
./scripts/map.js https://docs.example.com --limit 20
./scripts/map.js --provider direct https://docs.example.com
./scripts/map.js https://docs.example.com --instructions "only API reference pages" --max-depth 2Search supports two Grok protocols via searchEndpoint / --search-endpoint:
responses(default):{apiUrl}/responses+ agenticweb_search. Typical for CPA / xAI-style search (e.g.grok-4.5).chat:{apiUrl}/chat/completions+web_searchtools. Typical for grok2api / NewAPI withgrok-4.3-fast,grok-4.20-fast, orgrok-4.20-0309-non-reasoning.
On many relays, Responses search only works for CPA grok-4.5; prefer chat for the fast Grok models above. Both paths run alongside independent Tavily and Firecrawl searches. Tavily is used when its key is configured; Firecrawl works keyless and automatically uses FIRECRAWL_API_KEY when available. The default combined extra target is 6. Add --extra 10 only for a broader candidate-source sweep. Extras are never fed into Grok.
If Grok quota is explicitly exhausted, search.js may return a visibly marked degraded answer made from raw Tavily/Firecrawl results. Check diagnostics.degraded and diagnostics.grok_error. Other Grok failures remain errors. --no-extra disables this fallback as well as the external searches.
Reading Results
Each script writes a single JSON object to stdout. On failure it still writes JSON to stdout, a short message to stderr, and exits non-zero.
Check in this order:
error— if present, readerror.message,error.code,error.previewif present, anddiagnostics.provider_attempts. Before retrying, change something: a sharper query, a different--provider(fetch/map), or a different--model(search). Do not rerun the same command.diagnostics.warningsanddiagnostics.provider_attempts— these tell you which providers were skipped, failed, or produced content.- Search success: read
answer.text, thensources.merged. Source cards are short and usesnippet, notdescriptionorcontent. Full source/provider raw is insources.raw_path; read it in chunks only when needed. - Search: inspect
diagnostics.grok_endpoint,diagnostics.degraded,diagnostics.cost_usd, provider attempts, andsources.grok[].source_type(citationvssearched) before treating sources as evidence. - Fetch success: read
content.text. Ifcontent.truncatedis true and the preview is enough, stop. If more is needed, readcontent.full_pathin chunks or rerun once with a deliberate larger--max-chars. - Map success: read
urls, choose the best candidates, then fetch only the few URLs you need.
Search and fetch are intentionally separated. Use search to discover and compare sources, then fetch a specific URL for deep reading. In one research turn, fetch 1-2 URLs by default; do not batch-fetch many pages unless the user explicitly asks.
Providers And Limits
fetch.js provider order for --provider auto: Tavily Extract → Firecrawl Scrape → Direct Fetch.
map.js provider order for --provider auto: Tavily Map → Direct Map.
For search, Tavily requires a key while Firecrawl uses its keyless tier by default. For fetch, missing Tavily means Firecrawl Keyless runs before Direct Fetch. The direct providers do not execute JavaScript, log in, use cookies, parse PDFs, or bypass anti-bot. Direct Map only reads /sitemap.xml and same-domain homepage links, ignores --instructions, and is limited to --max-depth 1.
Proxy
The scripts automatically use terminal proxy environment variables via undici when present: HTTP_PROXY / HTTPS_PROXY / ALL_PROXY and lowercase variants. NO_PROXY is honored, and loopback hosts are bypassed. Use GROK_PROXY="http://127.0.0.1:7890" to set a proxy just for this tool, or GROK_PROXY=off to force direct connections. If proxy debugging is needed, set GROK_DEBUG=true.
If search.js returns GROK_API_URL 未配置 or GROK_API_KEY 未配置, the project itself is missing required setup — point the user at README.md instead of trying to work around it.
When To Plan First
For multi-part research, conflicting sources, or anything that needs both site discovery and page content, read references/planning.md before running commands.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

