← Back to Skills Marketplace
lulu-owo

Baidu Search 1 1 0.Skip

by Lulu-OwO · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
116
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install baidu-search-1-1-0-skip
Description
Search the web using Baidu AI Search Engine (BDSE). Use for live information, documentation, or research topics.
README (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 和输出编码。

Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install baidu-search-1-1-0-skip
  3. After installation, invoke the skill by name or use /baidu-search-1-1-0-skip
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug baidu-search-1-1-0-skip
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Baidu Search 1 1 0.Skip?

Search the web using Baidu AI Search Engine (BDSE). Use for live information, documentation, or research topics. It is an AI Agent Skill for Claude Code / OpenClaw, with 116 downloads so far.

How do I install Baidu Search 1 1 0.Skip?

Run "/install baidu-search-1-1-0-skip" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Baidu Search 1 1 0.Skip free?

Yes, Baidu Search 1 1 0.Skip is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Baidu Search 1 1 0.Skip support?

Baidu Search 1 1 0.Skip is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Baidu Search 1 1 0.Skip?

It is built and maintained by Lulu-OwO (@lulu-owo); the current version is v1.0.0.

💬 Comments