← 返回 Skills 市场
nidhov01

02 联网搜索

作者 nidhov01 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
203
总下载
0
收藏
2
当前安装
1
版本数
在 OpenClaw 中安装
/install 02
功能描述
安全的网络搜索工具,支持多个搜索引擎
使用说明 (SKILL.md)

AI联网搜索技能

安全的网络搜索工具,支持多个搜索引擎,无需API密钥。

技能描述

提供免费的网络搜索功能,支持DuckDuckGo和Wikipedia等搜索引擎,内置结果缓存机制(24小时),保护用户隐私。

使用场景

  • 用户问:"Python最新版本是什么?" → 搜索并返回结果
  • 用户说:"搜索人工智能的最新进展" → 获取相关资讯
  • 用户问:"什么是量子计算?" → 搜索Wikipedia百科
  • 用户说:"查找Python教程" → 返回搜索结果

工具和依赖

工具列表

  • scripts/web_search.py:核心搜索模块

API密钥

无(使用免费搜索引擎)

外部依赖

  • Python 3.7+
  • duckduckgo-search
  • beautifulsoup4
  • requests

配置说明

环境变量

# 可选:付费搜索引擎API
export SERPER_API_KEY="your-key"  # Serper API
export BRAVE_API_KEY="your-key"   # Brave Search API

数据存储位置

缓存:~/.ai_search_cache.db(24小时有效期)

使用示例

基本用法

from web_search import WebSearchTool

# 创建搜索工具
search = WebSearchTool()

# 综合搜索
results = search.search("Python编程", engines=['duckduckgo', 'wikipedia'])

# 快速搜索(格式化输出)
print(search.quick_search("人工智能"))

场景1:综合搜索

用户:"搜索Python编程教程"

AI:

results = search.search("Python编程", engines=['duckduckgo'])
# 返回前10个结果,包含标题、链接、摘要

场景2:百科查询

用户:"什么是量子计算?"

AI:

results = search.search("量子计算", engines=['wikipedia'])
# 返回Wikipedia摘要

场景3:使用缓存

用户:"再次搜索Python"(短时间内重复搜索)

AI:

# 从缓存返回结果,提高速度
results = search.search("Python")
# 结果来源:缓存

故障排除

问题1:DuckDuckGo搜索失败

现象:搜索无结果或报错

解决

  1. 检查网络连接
  2. DuckDuckGo有请求频率限制,稍后重试
  3. 尝试切换到Wikipedia引擎

问题2:缓存过期

现象:搜索结果较旧

解决

# 清除缓存
rm ~/.ai_search_cache.db

问题3:搜索结果不相关

现象:返回结果与问题不符

解决

  1. 使用更精确的关键词
  2. 尝试不同的搜索引擎
  3. 使用付费API获得更好结果(可选)

注意事项

  1. 请求频率:DuckDuckGo免费API有频率限制
  2. 结果时效:搜索结果仅供参考,请自行验证
  3. 缓存机制:24小时内的重复搜索会返回缓存结果
  4. 隐私保护:搜索缓存存储在本地,不上传云端
安全使用建议
This skill appears to be what it claims: a local search tool using DuckDuckGo/Wikipedia with a 24‑hour local cache. Before installing: (1) Review web_search.py yourself if you have concerns — it is the only substantial code file. (2) Install/run inside a Python virtualenv (install.sh prompts for one). (3) Be aware the cache is stored at ~/.ai_search_cache.db; delete it if you want to remove stored queries. (4) The SKILL.md mentions optional paid-API environment variables, but the current code does not use them — if maintainers add paid-API integrations later, those could require keys; re-check future versions before supplying secrets. (5) Dependencies are installed from PyPI; if you require extra assurance, inspect dependency versions and supply a pinned requirements file or install in an isolated environment.
功能分析
Type: OpenClaw Skill Name: 02 Version: 1.0.0 The skill bundle provides a legitimate web search tool using DuckDuckGo and Wikipedia with local SQLite caching. The code in web_search.py includes basic security validations such as keyword filtering and URL scheme checks, and the installation scripts (install.sh) follow standard practices without any signs of malicious intent or data exfiltration.
能力评估
Purpose & Capability
Name/description (network search supporting multiple engines) matches included files (web_search.py, requirements.txt, install/run scripts). The code implements DuckDuckGo and Wikipedia searches, caching, and a CLI — all coherent with the stated purpose. Minor mismatch: web_search.py contains an ALLOWED_DOMAINS list referencing some paid/search API hosts (serpapi, google.serper.dev, api.search.brave.com) that the current code does not call; this appears to be leftover/anticipatory rather than necessary for the declared functionality.
Instruction Scope
SKILL.md instructs creating a venv, installing pip deps, running web_search.py, and explains cache behavior. The runtime instructions and the code operate only on local files (cache at ~/.ai_search_cache.db) and public search APIs via standard libraries; there are no instructions to read unrelated system files or to transmit local data to unexpected endpoints. Note: SKILL.md lists optional environment variables for paid APIs (SERPER_API_KEY, BRAVE_API_KEY) but the current code does not read these variables.
Install Mechanism
No remote arbitrary downloads. install.sh is a simple installer that optionally creates a Python venv and runs pip install -r requirements.txt. Dependencies come from PyPI (duckduckgo-search, wikipedia, requests) — standard and expected for this task. No extract-from-URL or unknown-host downloads were used.
Credentials
The skill declares no required environment variables or credentials, which is proportionate. SKILL.md mentions optional paid-API keys (SERPER_API_KEY, BRAVE_API_KEY) that are not referenced in the current code — this is a minor inconsistency (suggests potential future integrations but no current need for secrets). Cache path (~/.ai_search_cache.db) is local and expected.
Persistence & Privilege
The skill does not request always:true or other elevated persistent privileges. Its persistent footprint is limited to creating a virtualenv (if the user consents) and a local SQLite cache file in the user's home directory. It does not modify other skills or system-wide agent settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install 02
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /02 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
web-search 1.0.0 首次发布,安全支持多搜索引擎。 - 提供DuckDuckGo、Wikipedia等免费网络搜索,无需API密钥 - 具备结果缓存功能,24小时内重复搜索返回本地结果 - 支持多场景搜索,兼容Python集成或终端调用 - 强调用户隐私保护,缓存仅存储本地 - 支持付费API(Serper、Brave)可选集成
元数据
Slug 02
版本 1.0.0
许可证 MIT-0
累计安装 2
当前安装数 2
历史版本数 1
常见问题

02 联网搜索 是什么?

安全的网络搜索工具,支持多个搜索引擎. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 203 次。

如何安装 02 联网搜索?

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

02 联网搜索 是免费的吗?

是的,02 联网搜索 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

02 联网搜索 支持哪些平台?

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

谁开发了 02 联网搜索?

由 nidhov01(@nidhov01)开发并维护,当前版本 v1.0.0。

💬 留言讨论