Coding

Smart Web Search

Try it

Smart web search with auto region detection, query intent rewriting, and dual-tier content fetching. Works in both China and international networks.

What it does

Intelligent web search with region auto-detection, query intent optimization, and dual-tier content extraction.

The skill document

smart-web-search v1.0.4

Intelligent web search with region auto-detection, query intent optimization, and dual-tier content extraction.

Core features

1. Auto region detection

  • Detects CN vs international via IP geolocation APIs + cn.bing.com probe
    • CN → Bing CN (HTTP first, headed cookie warm-up if needed)
    • International → DDG HTML
  • Fallback: defaults to DDG on detection failure (proxy/timeout)

2. Query intent rewriting

Rewrites common natural-language queries for better search results:

  • "深圳有什么好玩的" → "深圳 景点"
  • "今日金价" → "金价"
  • "React 教程" → "React 教程"
  • "怎么做红烧肉" → "红烧肉 做法"

3. Dual-tier content fetching

After search, auto-fetches top N page contents (default 3):

  • Tier 1: HTTP + cheerio (fast, no browser)
  • Tier 2: Playwright headed (JS rendering fallback)

4. Low-quality filtering (opt-in)

--filter flag excludes common low-signal domains (zhidao.baidu.com, jingyan.baidu.com, etc.)

Install

All dependencies are installed upfront by the setup script. The skill never runs npm install or pip install at runtime.

Prerequisites

DependencyPurposeSize
Node.js >= 18Runtime—
cheerioHTML parsingsmall
commanderCLI arg parsingsmall
iconv-liteGBK charsetsmall
playwrightBrowser automation~50 MB
Chromium (Playwright)Browser engine~150 MB

One-command setup

# Linux / macOS
bash scripts/setup.sh

# Windows
powershell -File scripts/setup.ps1

Auto-detects region and uses npmmirror.com mirrors inside China.

Manual install

cd skills/smart-web-search
npm install
npx playwright install chromium

# Verify
node scripts/check-env.js

Skip 150 MB download if you have system Chrome:

export CHROMIUM_EXECUTABLE_PATH="/path/to/chrome"

Usage

# Search with auto-fetch (top 3 pages)
node scripts/search.js "白银价格"
node scripts/search.js "how to deploy docker" --max=5

# Disable fetch (search only)
node scripts/search.js "xxx" --fetch=0

# Filter low-quality domains
node scripts/search.js "深圳旅游攻略" --filter

# Fetch specific URLs
node scripts/fetch.js "https://example.com/page1" "https://example.com/page2"

Privacy & network

  • Searches connect to Bing CN / DDG HTML directly from the skill runtime
  • Headed cookie warm-up: When Bing HTTP returns <3 results, a headed browser context visits cn.bing.com to obtain session cookies. The browser closes immediately after cookie retrieval. Cookies are used only for the current search session and are not persisted to disk.
  • No analytics, no telemetry, no third-party logging beyond search engine server logs

Known limitations

  • Bing cookie warm-up adds 3–6s: Only triggered when HTTP search returns <3 results
  • Query rewriting may miss intent: 80+ rules cover common patterns, but edge cases exist
  • Low-quality filter is heuristic: May exclude valid results or miss spam
  • Proxy interference: IP detection may misclassify; no manual override available
  • JS-required pages: HTTP tier returns empty for SPA pages; headed tier catches them

Verification

node scripts/check-env.js
node scripts/search.js "OpenClaw" --max 2 --fetch 0

Common issues:

  • node_modules not found → run npm install
  • Executable doesn't exist → run bash scripts/setup.sh or set CHROMIUM_EXECUTABLE_PATH
  • 0 results → network issue or search engine blocking; try different query

Related skills

Join a video meeting as an AI bot with voice, avatar, and screenshare across four operating modes.

by johnpatternai22 installs8 stars

Generate and edit Draw.io, Mermaid, and Excalidraw diagrams from natural language using a structured JSON spec.

by nssa.io1.0k installs47 stars

Fetch raw ad creative, app, ranking, and revenue data from AdMapix as structured JSON.

by fly0pants4.3k installs296 stars

Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.

by Iván559 installs18 stars

Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.

by Iván855 installs69 stars

More from ucsdzehualiu

Browse all skills

云产品技术文档对比工具,自动抓取阿里云、华为云、AWS、腾讯云官方文档,生成结构化对比资料,辅助技术选型和学习

by ucsdzehualiu24 installs1 stars

基于 Bing 国内版 / DuckDuckGo 的联网搜索工具,中文环境优化,可按需抓取目标网页正文,返回结构化结果。仅在用户明确请求联网搜索时调用。

by ucsdzehualiu124 installs1 stars

Web search & content fetching via Playwright + HTTP — zero API keys. Searches Bing CN (domestic) or DDG (international), auto-fetches top page contents. For...

by ucsdzehualiu20 installs

Iterative prompt optimizer for complex tasks. Strictly implements ACON's two-stage iterative optimization + APE automatic prompt engineering. Only triggers w...

by ucsdzehualiu18 installs

股票、ETF、指数、大宗商品市场分析工具,整合实时行情、技术指标、市场情绪和财经新闻。适用于美股综合分析、止盈止损建议、估值判断场景。Stock/ETF/index/commodity market analysis, sentiment, technical indicators.

by ucsdzehualiu19 installs

实用提示词优化工具 - 检测原提示词缺失要素(角色/步骤/格式/约束),智能补全后输出清晰易懂的优化版,帮助用户的意图更容易被 AI 理解执行。Use when user says 优化提示词 / 改进prompt / 优化一下 / optimize prompt.

by ucsdzehualiu19 installs