Files
NianToB/resources/skills/local/web-search/SKILL.md
2026-05-12 19:44:44 +08:00

47 lines
1.8 KiB
Markdown

---
name: web-search
description: Search the public web and fetch short page summaries through Zhinian's guarded local script. Use when the user asks for current information, news, weather, facts that may have changed, source links, or online research. Prefer image-search for image-only requests.
---
# web-search
Use this skill when the user needs current public web information.
This skill is independent from OpenClaw's built-in `web_search` and `web_fetch` tools. Do not change Tavily, Brave, DuckDuckGo, SearXNG, or OpenClaw web settings to use this skill.
## Standard Workflow
1. Search for web results:
```bash
node ~/.openclaw/skills/web-search/scripts/search-web.mjs "<query>" --count 6
```
2. If one result needs more detail, fetch that exact page with a short limit:
```bash
node ~/.openclaw/skills/web-search/scripts/search-web.mjs --fetch-url "<url>" --max-chars 4000
```
3. Use the returned JSON:
- `results[].title` is the page title.
- `results[].url` is the source page.
- `results[].snippet` is a short search preview.
- `text` exists only in `--fetch-url` mode.
## Rules
- Keep queries focused and short.
- Prefer 2-5 sources for factual/current answers.
- If search or fetch fails, say the online lookup failed and answer from available context only.
- Do not retry indefinitely. This skill is intentionally guarded to avoid blocking the conversation.
- For image requests, use the `image-search` skill instead.
- Include source links in user-facing answers when current information was used.
## Examples
```bash
node ~/.openclaw/skills/web-search/scripts/search-web.mjs "贵阳 今天 天气" --count 5
node ~/.openclaw/skills/web-search/scripts/search-web.mjs "2026 企业微信 最新收费政策" --count 6
node ~/.openclaw/skills/web-search/scripts/search-web.mjs --fetch-url "https://example.com/news/article" --max-chars 3000
```