← 返回 Skills 市场
lulu-owo

Baidu Search 1 1 0.Skip

作者 Lulu-OwO · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
116
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install baidu-search-1-1-0-skip
功能描述
Search the web using Baidu AI Search Engine (BDSE). Use for live information, documentation, or research topics.
使用说明 (SKILL.md)

Baidu Search

Search the web via Baidu AI Search API.

调用方式

方式一:通过文件路径传参(推荐)

将 JSON 写入临时文件,脚本会自动读取并处理 UTF-8 BOM:

# PowerShell 中使用
$json = @{
    query = "搜索关键词"
    search_recency_filter = "day"
} | ConvertTo-Json -Compress
[System.IO.File]::WriteAllText("$env:TEMP\baidu_req.json", $json, [System.Text.Encoding]::UTF8)
python.exe "skills\baidu-search-1-1-0\scripts\search.py" "$env:TEMP\baidu_req.json"

方式二:直接传递 JSON 字符串

python skills/baidu-search/scripts/search.py '{"query":"关键词","search_recency_filter":"day"}'

⚠️ 注意:在 Windows PowerShell 下,直接传参可能因转义问题失败,建议使用方式一。

方式三:通过 stdin 管道传递

echo '{"query":"关键词"}' | python skills/baidu-search/scripts/search.py

请求参数

参数 类型 必填 默认值 说明
query string - 搜索关键词
edition string standard standard(完整版)或 lite(精简版)
resource_type_filter array web:20 资源类型过滤:web(最多50)、video(最多10)、image(最多30)、aladdin(最多5)
search_filter object - 高级过滤器(见下文)
block_websites array - 屏蔽的网站,如 ["tieba.baidu.com"]
search_recency_filter string year 时间过滤:weekmonthsemiyearyear
safe_search boolean false 启用严格内容过滤

SearchFilter 高级过滤器

参数 类型 说明
match.site array 限制在特定网站,如 ["baike.baidu.com"]
range.pageTime object 页面时间范围(见下文)

日期范围格式

  • 固定日期:YYYY-MM-DD
  • 相对时间:now-1w/dnow-1M/dnow-1y/d
操作符 含义
gte 大于等于(起始)
lte 小于等于(结束)

使用示例

# 基础搜索
python skills/baidu-search/scripts/search.py '{"query":"人工智能"}'

# 按时间过滤
python skills/baidu-search/scripts/search.py '{"query":"最新新闻","search_recency_filter":"week"}'

# 按时间和网站过滤
python skills/baidu-search/scripts/search.py '{
  "query":"最新新闻",
  "search_recency_filter":"week",
  "search_filter":{"match":{"site":["news.baidu.com"]}}
}'

# 资源类型过滤
python skills/baidu-search/scripts/search.py '{
  "query":"旅游景点",
  "resource_type_filter":[{"type":"web","top_k":20},{"type":"video","top_k":5}]
}'

已知问题与解决方案

1. PowerShell JSON 转义问题

问题:PowerShell 直接传递 JSON 字符串给 Python 时,单引号/双引号可能被错误解析。

解决:使用临时文件方式传递参数。

2. UTF-8 BOM 导致 JSON 解析失败

问题:部分工具写入文件时会添加 BOM(\ufeff),导致 json.loads() 解析失败。

解决:脚本已内置 BOM 自动处理,调用方无需额外处理。

3. 中文输出乱码

问题:Windows 终端默认使用 GBK 编码,中文字符输出时可能显示为乱码。

解决:脚本已设置 sys.stdout.reconfigure(encoding='utf-8', errors='replace'),输出时自动转换。

当前状态

✅ 功能正常,支持文件路径/stdin/直接参数三种调用方式,自动处理 UTF-8 BOM 和输出编码。

安全使用建议
This skill appears to do what it says: it sends the provided query and filters to Baidu's qianfan AI search endpoint using the BAIDU_API_KEY. Before installing, verify the following: (1) BAIDU_API_KEY will be sent to Baidu—do not use an API key that has broader permissions or access to sensitive resources you want to protect; (2) ensure the execution environment has the Python 'requests' package installed (SKILL.md does not list this dependency); (3) note the small metadata inconsistency (ownerId mismatch) which suggests packaging sloppiness—this is not necessarily malicious but you may want to confirm the origin; (4) avoid passing secrets in the 'query' field since the query content is transmitted to the remote API. If you need stricter guarantees about data residency or auditing, review your organization's policy before enabling autonomous invocation.
功能分析
Type: OpenClaw Skill Name: baidu-search-1-1-0-skip Version: 1.0.0 The skill is a legitimate implementation of a Baidu AI Search integration. The Python script (scripts/search.py) correctly interfaces with the official Baidu Qianfan API endpoint and includes robust handling for common CLI issues like UTF-8 BOM and encoding mismatches. No evidence of data exfiltration, malicious execution, or prompt injection was found.
能力评估
Purpose & Capability
Name/description, SKILL.md, and scripts/search.py all implement a Baidu AI search client that requires BAIDU_API_KEY and python3 — this is coherent. Minor packaging inconsistency: registry metadata ownerId (kn7am49...) differs from _meta.json ownerId (kn7aq3...), which suggests a copy/paste or packaging mismatch but does not change functionality.
Instruction Scope
SKILL.md instructs the agent to pass JSON via file/stdin/arg and the script only reads that input, the BAIDU_API_KEY env var, and posts the request to a Baidu qianfan endpoint. It does not attempt to read other system files or unrelated environment variables.
Install Mechanism
No install spec (instruction-only) — lowest risk. The shipped script imports the Python 'requests' library, but SKILL.md and metadata do not declare 'requests' as a dependency; execution will fail unless 'requests' is available in the environment. No downloads or arbitrary remote installers are present.
Credentials
Only BAIDU_API_KEY is required and is the primary credential; this is proportional to a search API client. The script uses that key only to authenticate to Baidu's endpoint and does not enumerate other secrets.
Persistence & Privilege
Skill does not request persistent/global presence (always:false) and does not modify other skills or system configs. Autonomous invocation is allowed by default but is normal for skills and not combined with any broad/unrelated privileges here.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install baidu-search-1-1-0-skip
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /baidu-search-1-1-0-skip 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Baidu Search Skill v1.0.0 - Initial release: search the web using Baidu AI Search Engine (BDSE). - Supports three calling methods: file path (recommended), direct JSON string, and stdin pipe. - Handles UTF-8 BOM automatically to prevent JSON decoding errors. - Output encoding auto-configured to avoid Chinese character garbling in Windows terminals. - Offers flexible search parameters: keyword, resource type, site/time filters, safe search, and site blocking.
元数据
Slug baidu-search-1-1-0-skip
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Baidu Search 1 1 0.Skip 是什么?

Search the web using Baidu AI Search Engine (BDSE). Use for live information, documentation, or research topics. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 116 次。

如何安装 Baidu Search 1 1 0.Skip?

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

Baidu Search 1 1 0.Skip 是免费的吗?

是的,Baidu Search 1 1 0.Skip 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Baidu Search 1 1 0.Skip 支持哪些平台?

Baidu Search 1 1 0.Skip 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Baidu Search 1 1 0.Skip?

由 Lulu-OwO(@lulu-owo)开发并维护,当前版本 v1.0.0。

💬 留言讨论