← 返回 Skills 市场
mr-ds-ml-85

WebSearch-Openclaw

作者 Mr.ML Learner · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
80
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install searxng-websearch
功能描述
Use this skill whenever the user wants to search the web, do research on a topic, fetch a webpage, or gather information from online sources using a self-hos...
使用说明 (SKILL.md)

SearXNG Web Search Skill

A skill for searching the web and fetching pages via a self-hosted SearXNG instance. Three entry-point scripts cover the main use cases:

Script Purpose
websearch.py Single query, structured results
fetch_page.py Fetch and extract text from one URL
deep_research.py Multi-query research with page fetching and ranking

Environment Setup

All scripts read configuration from a .env file (or real environment variables). Copy _env.env and fill in your values:

cp _env .env

.env reference

Variable Default Description
SEARXNG_URL http://localhost:8080 Base URL of your SearXNG instance
SEARXNG_LANGUAGE en Default search language
SEARXNG_SAFE_SEARCH 0 0 = off, 1 = moderate, 2 = strict
SEARXNG_TIMEOUT 20 HTTP timeout in seconds

CLI override — every script now also accepts --searxng-url to override the env value for one-off runs without editing .env.


Quick Start

Install dependencies

pip install requests beautifulsoup4 lxml python-dotenv

Install PATH shims (recommended — fixes CWD issues in OS)

bash ~/.openclaude/skills/searxng-websearch/install.sh
# reload shell, then:
wsearch   "Claude Sonnet 4 release notes" --format agent
wfetch    https://example.com --max-chars 3000
wresearch "transformer attention mechanisms" --fetch-top-pages 3

Or call directly with full path (no install needed)

SKILL=~/.openclaude/skills/searxng-websearch
python3 "$SKILL/websearch.py"    "Claude Sonnet 4 release notes" --format agent
python3 "$SKILL/fetch_page.py"   https://example.com --max-chars 3000
python3 "$SKILL/deep_research.py" "transformer attention mechanisms" --fetch-top-pages 3

Script Reference

websearch.py

python websearch.py \x3Cquery> [options]

Options:
  --searxng-url URL       SearXNG base URL (overrides SEARXNG_URL env var)
  --category CATEGORY     general | images | news | science | files |
                          social_media | map | music | videos | it
                          (default: general)
  --max-results N         Number of results to return (default: 5)
  --language LANG         Language code, e.g. en, de, fr
  --safe-search 0|1|2     Safe-search level
  --page N                Result page number (default: 1)
  --time-range RANGE      day | week | month | year
  --format FORMAT         markdown | text | json | agent (default: markdown)

fetch_page.py

python fetch_page.py \x3Curl> [options]

Options:
  --searxng-url URL       Unused here but accepted for consistency
  --max-chars N           Max characters to print (default: 5000)

deep_research.py

python deep_research.py \x3Ctopic> [options]

Options:
  --searxng-url URL       SearXNG base URL (overrides SEARXNG_URL env var)
  --max-results N         Results per sub-query (default: 4)
  --fetch-top-pages N     Number of top pages to fetch (default: 3)
  --max-chars N           Max chars per fetched page (default: 2500)
  --output FORMAT         markdown | text (default: markdown)

Source Ranking (deep_research.py)

Pages are scored before fetching so the most authoritative content is prioritised:

Domain signal Points
github.com / gitlab.com +5
arxiv.org / openreview.net +5
docs.* / readthedocs.* +4
research / paper in domain +3
Has a publication date +1
Has a snippet +1

⚠️ Critical: How to Invoke These Scripts (OpenClaude / Claude Code)

NEVER use cd before calling a script. Each Bash() call spawns a fresh shell; cd skill-dir && python3 script.py silently resets the CWD and the script never runs.

Always call scripts by their full absolute path in a single command:

# ✅ CORRECT — full path, no cd
python3 ~/.openclaude/skills/searxng-websearch/websearch.py "my query" --format agent

# ✅ CORRECT — SKILL_DIR variable makes it readable
SKILL_DIR=~/.openclaude/skills/searxng-websearch
python3 "$SKILL_DIR/websearch.py" "my query" --format agent

# ❌ WRONG — cd resets on the next Bash() call
cd ~/.openclaude/skills/searxng-websearch && python3 websearch.py "my query"

If the skill path is unknown, resolve it first:

SKILL_DIR=$(find ~/.openclaude/skills -name "websearch.py" -printf '%h' -quit 2>/dev/null \
            || find ~/skills -name "websearch.py" -printf '%h' -quit 2>/dev/null)
python3 "$SKILL_DIR/websearch.py" "my query" --format agent

Tips for Claude

  • Run websearch.py with --format agent when you need compact, token-efficient context to pass back to the model.
  • For broad topics, prefer deep_research.py — it fans out into sub-queries automatically.
  • If SearXNG is unreachable, deep_research.py exits with a clear error message; check that SEARXNG_URL is correct and the instance is running.
  • Pipe markdown output into a file for later use:
    python3 ~/.openclaude/skills/searxng-websearch/deep_research.py "RAG retrieval strategies" > research.md
    
安全使用建议
This skill is reasonable to install if you want SearXNG-backed web search. Configure SEARXNG_URL intentionally, review the optional installer before running it, and remember that fetched webpages are untrusted content that should not override your instructions.
功能分析
Type: OpenClaw Skill Name: searxng-websearch Version: 1.0.0 The skill bundle provides legitimate web search and page fetching capabilities via a self-hosted SearXNG instance. The Python scripts (websearch.py, fetch_page.py, deep_research.py) use standard libraries to perform searches and extract text from URLs, while the install.sh script correctly sets up CLI shims and updates the PATH in shell configuration files. The instructions in SKILL.md are designed to ensure the AI agent executes commands reliably within the OpenClaw environment and include explicit safety constraints against unrelated local file operations.
能力评估
Purpose & Capability
The scripts match the stated purpose: search via a configured SearXNG instance, fetch a URL, and perform multi-query research. No credential, local file indexing, destructive action, or unrelated capability is shown.
Instruction Scope
The skill is scoped to web data and explicitly says not to use it for unrelated local file operations, but its outputs may contain untrusted webpage text that the agent could read as context.
Install Mechanism
Registry metadata says there is no install spec, while SKILL.md documents manual pip dependency installation and an optional install.sh. This is user-directed and visible, but users should review it before running.
Credentials
Network access to the configured SearXNG service and target webpages is proportionate to the skill's purpose. No environment secrets are required; .env contains only default SearXNG settings.
Persistence & Privilege
If the optional installer is run, it creates persistent shell shims in ~/.local/bin and may append a PATH entry to shell rc files. This is disclosed and scoped, not hidden.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install searxng-websearch
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /searxng-websearch 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of the searxng-websearch skill for searching the web via a self-hosted SearXNG instance. - Provides three entry-point scripts: `websearch.py` (single query), `fetch_page.py` (fetch webpage text), and `deep_research.py` (multi-query research with ranking). - Supports configuration via `.env` file and per-run CLI overrides. - Offers install script for convenient PATH shims and direct execution options. - Documentation includes example commands, script references, and practical usage tips.
元数据
Slug searxng-websearch
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

WebSearch-Openclaw 是什么?

Use this skill whenever the user wants to search the web, do research on a topic, fetch a webpage, or gather information from online sources using a self-hos... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 80 次。

如何安装 WebSearch-Openclaw?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install searxng-websearch」即可一键安装,无需额外配置。

WebSearch-Openclaw 是免费的吗?

是的,WebSearch-Openclaw 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

WebSearch-Openclaw 支持哪些平台?

WebSearch-Openclaw 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 WebSearch-Openclaw?

由 Mr.ML Learner(@mr-ds-ml-85)开发并维护,当前版本 v1.0.0。

💬 留言讨论