ワンクリックで
grok-search
Real-time web research/search and URL content fetching via Grok API (outputs JSON with content and sources).
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Real-time web research/search and URL content fetching via Grok API (outputs JSON with content and sources).
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | grok-search |
| description | Real-time web research/search and URL content fetching via Grok API (outputs JSON with content and sources). |
| disable_tools | true |
使用此 Skill 时必须禁用工具调用,否则 AI 会直接调用 grok_web_search 工具而非执行脚本。
Use this skill aggressively - default to searching before answering anything that might be:
When you need to read a specific web page's full content, use the fetch mode to get structured Markdown.
If you feel even slightly unsure, search first, then answer with evidence.
AstrBot 插件自动配置(推荐):如果在 AstrBot 中已配置 astrbot_plugin_grok_web_search 插件,脚本会自动读取插件配置,无需额外设置。
手动配置(备选):
环境变量:
export GROK_BASE_URL="https://your-grok-endpoint.example"
export GROK_API_KEY="your-api-key"
export GROK_MODEL="grok-4-expert" # optional
或使用配置文件:
./config.json (skill directory)./config.local.json (skill directory, gitignored)~/.codex/config/grok-search.json (user global)python scripts/grok_search.py --query "your search query"
# With images for multimodal queries:
python scripts/grok_search.py --query "What is in this image?" --image-files "/path/to/image.jpg"
python scripts/grok_search.py --fetch-url "https://example.com/article"
Fetch mode uses Grok's web browsing capability to retrieve the URL and convert it to structured Markdown.
| Option | Description |
|---|---|
--query | Search query (required for search mode) |
--fetch-url | URL to fetch and convert to Markdown (fetch mode) |
--config | Path to config file |
--base-url | Override base URL |
--api-key | Override API key |
--model | Override model name |
--timeout-seconds | Request timeout in seconds |
--search-depth | Search depth: basic, advanced, or deep |
--max-results | Desired result count, clamped to 5-20 |
--topic | Search topic: general or news |
--days | Days to look back from today |
--time-range | Time range: day, week, month, or year |
--start-date | Start date in YYYY-MM-DD format |
--end-date | End date in YYYY-MM-DD format |
--extra-body-json | Extra JSON to merge into request body |
--extra-headers-json | Extra JSON to merge into request headers |
--image-files | Comma-separated image file paths for multimodal queries |
JSON to stdout (敏感信息如 base_url、api_key 不会输出):
{
"ok": true,
"query": "your query",
"config_path": "[AstrBot Plugin Config]",
"model": "grok-4-expert",
"content": "synthesized answer...",
"sources": [
{"url": "https://...", "title": "...", "snippet": "..."}
],
"raw": "",
"usage": {"prompt_tokens": 123, "completion_tokens": 456},
"elapsed_ms": 3456
}
{
"ok": true,
"fetch_url": "https://example.com/article",
"config_path": "[AstrBot Plugin Config]",
"model": "grok-4-expert",
"content": "# Page Title\n\nFull page content in Markdown...",
"usage": {"prompt_tokens": 123, "completion_tokens": 456},
"elapsed_ms": 3456
}
{
"ok": false,
"error": "HTTP 401",
"detail": "Unauthorized",
"config_path": "[AstrBot Plugin Config]",
"config_status": "OK",
"model": "grok-4-expert",
"elapsed_ms": 234
}
POST {base_url}/v1/chat/completionstool.py--extra-body-json