About groksearch
groksearch is a command-line skill that searches X and the web with Grok’s x_search and web_search tools, then returns a concise summary and cited source URLs. It is for users who want findings from either source or both in one query.
Key features
- 01Search X and the web
- 02Choose X, web, or both sources
- 03Summarize findings and key points
- 04List cited source URLs
Use cases
- 01Research a topic across X and the web
- 02Search only X or only the web
- 03Collect key points with source links
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ connorads/ dotfiles --skill groksearchAfter installing, type/groksearchin Claude Code to confirm it loaded.
Bundled filesREADME.mdscripts/groksearch.py
Details
From the project READMEgroksearch
Search X and the web using Grok's server-side tools and return a concise summary with top sources.
This skill uses Grok's own x_search and web_search tools (not Claude WebSearch).
Usage
Run the script using absolute path (do NOT cd to the skill directory first):
uv run ~/.claude/skills/groksearch/scripts/groksearch.py "your query"
Common options
# X + Web (default)
uv run ~/.claude/skills/groksearch/scripts/groksearch.py "your query" --sources both
# X only
uv run ~/.claude/skills/groksearch/scripts/groksearch.py "your query" --sources x
# Web only
uv run ~/.claude/skills/groksearch/scripts/groksearch.py "your query" --sources web
# Last 14 days
uv run ~/.claude/skills/groksearch/scripts/groksearch.py "your query" --days 14
# Explicit date range
uv run ~/.claude/skills/groksearch/scripts/groksearch.py "your query" --from-date 2026-01-01 --to-date 2026-01-31
# No date filtering
uv run ~/.claude/skills/groksearch/scripts/groksearch.py "your query" --no-date
API Key
Provide the xAI API key in one of these ways (highest priority first):
--api-keyargumentXAI_API_KEYenvironment variable~/.config/groksearch/.envfile
Example config file:
mkdir -p ~/.config/groksearch
cat > ~/.config/groksearch/.env << 'EOF'
XAI_API_KEY=
EOF
chmod 600 ~/.config/groksearch/.env
Output
The script prints:
- Query, sources, and date range
- A concise summary with key points
- A short list of top source URLs (from Grok citations)