File contents 网络搜索技能
功能描述
实时网络搜索功能,通过 DuckDuckGo 免费搜索引擎 API 获取互联网上的最新信息。
使用场景
✅ 适用场景
实时资讯 :查询最新新闻、时事动态
技术查询 :搜索编程文档、教程、API 参考
百科知识 :查找概念解释、历史背景、人物传记
生活信息 :搜索生活常识、健康知识、旅游攻略
产品信息 :查找产品评测、价格对比、用户评价
❌ 不适用场景
数学计算 :需要计算的问题请使用 calculator 工具
天气查询 :查询天气请使用 get_city_weather 工具
本地文件操作 :搜索本地文件内容不在支持范围内
参数说明
参数
类型
必填
默认值
说明
query
string
是
-
搜索关键词,支持中英文
num_results
int
否
5
返回结果数量,范围 1-10
使用示例
基础搜索
# 查询 Python 最新版本
web_search(query="Python 最新版本", num_results=3)
# 搜索新闻
web_search(query="2026年科技新闻", num_results=5)
# 技术文档搜索
web_search(query="FastAPI 教程", num_results=3)
多轮对话示例
用户:帮我搜索一下 Python 3.13 的新特性
助手:【调用了工具:web_search】
🔍 搜索「Python 3.13 新特性」的结果:
【摘要】
Python 3.13 是 Python 编程语言的最新主要版本,引入了性能改进、类型系统增强...
【相关结果】
1. Python 3.13 新特性详解
https://docs.python.org/3.13/whatsnew/3.13.html
2. Python 3.13 性能提升说明
https://peps.python.org/pep-0713/
返回结果格式
搜索结果包含以下信息:
摘要 :主要答案的简短描述
来源链接 :答案的原始来源 URL
相关结果 :多条搜索结果,每条包含标题和链接
异常处理
错误类型
处理方式
网络超时
返回「搜索超时,请稍后重试」
HTTP 错误
返回具体错误码
其他错误
返回简化的错误信息
技术实现
搜索引擎 :DuckDuckGo Instant Answer API(免费、无需 API Key)
超时设置 :10 秒
最大结果数 :10 条
注意事项
搜索结果可能包含过时信息,建议多个来源交叉验证
搜索速度取决于网络环境
某些特定领域的专业信息可能搜索效果有限
搜索关键词越具体,结果越准确
1 --- 2 name: web-search 3 description: 网络搜索技能 4 --- 5 # 网络搜索技能 6 7 ## 功能描述 8 9 实时网络搜索功能,通过 DuckDuckGo 免费搜索引擎 API 获取互联网上的最新信息。 10 11 ## 使用场景 12 13 ### ✅ 适用场景 14 15 - **实时资讯**:查询最新新闻、时事动态 16 - **技术查询**:搜索编程文档、教程、API 参考 17 - **百科知识**:查找概念解释、历史背景、人物传记 18 - **生活信息**:搜索生活常识、健康知识、旅游攻略 19 - **产品信息**:查找产品评测、价格对比、用户评价 20 21 ### ❌ 不适用场景 22 23 - **数学计算**:需要计算的问题请使用 `calculator` 工具 24 - **天气查询**:查询天气请使用 `get_city_weather` 工具 25 - **本地文件操作**:搜索本地文件内容不在支持范围内 26 27 ## 参数说明 28 29 | 参数 | 类型 | 必填 | 默认值 | 说明 | 30 |------|------|------|--------|------| 31 | `query` | string | 是 | - | 搜索关键词,支持中英文 | 32 | `num_results` | int | 否 | 5 | 返回结果数量,范围 1-10 | 33 34 ## 使用示例 35 36 ### 基础搜索 37 38 ```python 39 # 查询 Python 最新版本 40 web_search(query="Python 最新版本", num_results=3) 41 42 # 搜索新闻 43 web_search(query="2026年科技新闻", num_results=5) 44 45 # 技术文档搜索 46 web_search(query="FastAPI 教程", num_results=3) 47 ``` 48 49 ### 多轮对话示例 50 51 ``` 52 用户:帮我搜索一下 Python 3.13 的新特性 53 助手:【调用了工具:web_search】 54 55 🔍 搜索「Python 3.13 新特性」的结果: 56 57 【摘要】 58 Python 3.13 是 Python 编程语言的最新主要版本,引入了性能改进、类型系统增强... 59 60 【相关结果】 61 1. Python 3.13 新特性详解 62 https://docs.python.org/3.13/whatsnew/3.13.html 63 64 2. Python 3.13 性能提升说明 65 https://peps.python.org/pep-0713/ 66 ``` 67 68 ## 返回结果格式 69 70 搜索结果包含以下信息: 71 72 - **摘要**:主要答案的简短描述 73 - **来源链接**:答案的原始来源 URL 74 - **相关结果**:多条搜索结果,每条包含标题和链接 75 76 ## 异常处理 77 78 | 错误类型 | 处理方式 | 79 |----------|----------| 80 | 网络超时 | 返回「搜索超时,请稍后重试」 | 81 | HTTP 错误 | 返回具体错误码 | 82 | 其他错误 | 返回简化的错误信息 | 83 84 ## 技术实现 85 86 - **搜索引擎**:DuckDuckGo Instant Answer API(免费、无需 API Key) 87 - **超时设置**:10 秒 88 - **最大结果数**:10 条 89 90 ## 注意事项 91 92 1. 搜索结果可能包含过时信息,建议多个来源交叉验证 93 2. 搜索速度取决于网络环境 94 3. 某些特定领域的专业信息可能搜索效果有限 95 4. 搜索关键词越具体,结果越准确
taffy123d/LocalSkill-MCP-Agent/tree/main/skills/web_search commit 58251a378e
Frequently asked questions How do I install the Web Search skill? Run npx skillmds@latest add taffy123d/web-search in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
What does the Web Search skill do? 网络搜索技能 It is listed under Coding & Dev Tools on SkillMD.
Is Web Search safe to use? This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. Capability flags: executes scripts, makes network calls. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
Which AI agents work with Web Search? This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Is Web Search free to use? Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Who published Web Search? taffy123d (@taffy123d) published this skill. Their other Agent Skills are listed on their SkillMD profile.