brave-search
Skill2 starsChanged 5 months agoMITView on GitHub
通过 Brave Search API 搜索网页和新闻。触发条件: - 用户要求搜索/查找资料 - 需要获取最新信息(新闻、技术动态) - deep-research skill 的搜索后端替代 - 用户提到 "brave 搜索" 或 "搜一下" 不适用于:已知 URL 抓取(用 web_fetch)、简单事实问题(直接回答)
- Reads credentials
6 other projects use a version of this.
Adopted by
Most recently taken up by
- cadecode/agent-skillstheir own version, first seen Oct 20, 2026
- aiagenta2z/onekey-gatewaytheir own version, first seen Apr 10, 2026
- tesla3/my-pi-skillstheir own version, first seen Feb 20, 2026
- ferologics/pi-skillstheir own version, first seen Feb 12, 2026
- sarfraznawaz2005/agent-skills-collectiontheir own version, first seen Feb 5, 2026
- badlogic/pi-skillstheir own version, first seen Dec 18, 2025
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- badlogic/pi-skills★ 2.5ksame name
- aiagenta2z/onekey-gateway★ 52same name
- ferologics/pi-skills★ 14same name
- cadecode/agent-skills★ 1same name
- sarfraznawaz2005/agent-skills-collection★ 1same name
- tesla3/my-pi-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository71 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- academic-searchSkill
- agent-reachSkill
- anysearchSkill
- brainstormingSkill
- clash-verge-controlSkill
- drawio-skillSkill
- find-skillsSkill
- fireworks-tech-graphSkill
- github-trending-discoverySkill
- html-pptSkill
- humanizer-zhSkill
- ai-news-collectorSkill
- info-andrej-karpathy-rssSkill
- info-daily-hot-topicsSkill
- karpathy-guidelinesSkill
- markdown-to-docxSkill
- mcp-builderSkill
- minimax-docxSkill
- minimax-pdfSkill
- minimax-xlsxSkill
- office-docxSkill
- office-pdfSkill
- office-pptxSkill
- office-pywordSkill
- office-xlsxSkill
- ontologySkill
- openclaw-optimizationSkill
- pd-architectureSkill
- pd-bddSkill
- pd-brainstormingSkill
- pd-diagnoseSkill
- pd-docSkill
- pd-executionSkill
- pd-grill-with-docsSkill
- pd-improve-codebase-architectureSkill
- pd-planSkill
- pd-postgresSkill
- pd-prototypeSkill
- pd-puaSkill
- pd-reviewSkill
- pd-rules-checkSkill
- pd-setupSkill
- pd-simplifySkill
- pd-tddSkill
- pd-to-issuesSkill
- pd-to-prdSkill
- pd-triageSkill
- pd-zoom-outSkill
- pi-drawioSkill
- pi-githubSkill
- pi-llm-serverSkill
- pi-memorySkill
- pi-painterSkill
- pi-sketch-readerSkill
- pr-academic-searchSkill
- pr-arxiv-watcherSkill
- pr-critic-mentor-reviewSkill
- pr-daily-research-papersSkill
- pr-deep-researchSkill
- The first 60 shown.
The file
Files
Brave Search Skill
通过 Brave Search API 进行网页搜索和新闻搜索。
环境
- API Key 从环境变量
BRAVE_API_KEY读取(已在 ~/scripts/shell_conf 配置) - 支持代理:自动读取
HTTPS_PROXY/HTTP_PROXY
搜索脚本
# 基础搜索
python3 scripts/brave_search.py "query"
# 限制结果数
python3 scripts/brave_search.py "query" -n 5
# 搜新闻
python3 scripts/brave_search.py "AI agent" --news
# 时间过滤:pd=过去一天, pw=过去一周, pm=过去一月, py=过去一年
python3 scripts/brave_search.py "LLM benchmark" --freshness pw
# 指定国家
python3 scripts/brave_search.py "量化交易" --country CN
# 批量搜索(多关键词)
python3 scripts/brave_search.py "placeholder" --queries "query1" "query2" "query3"
# 翻页
python3 scripts/brave_search.py "query" --offset 10输出 JSON 数组,每条含 title, href, body, age。
使用流程
- 分析用户需求,拆解为搜索关键词(中英文各一组效果更好)
- 运行
brave_search.py搜索 - 从结果中挑选最相关的 URL
- 用
web_fetch抓取正文获取详细内容 - 整合信息回复用户
与 deep-research 配合
本 skill 可作为 deep-research 的搜索后端替代 DuckDuckGo:
- Brave API 质量更高、更稳定
- 支持时间过滤和国家过滤
- 有
age字段标注结果时效性
网络问题排查
⚠️ Brave API 端口 443 可能不可达:在某些网络环境下 api.search.brave.com:443 连接超时(Connection timed out)。诊断方法:
curl -sv --connect-timeout 5 "https://api.search.brave.com/res/v1/web/search?q=test&count=1" \
-H "X-Subscription-Token: ${BRAVE_API_KEY}" 2>&1 | grep "connect"如果显示 Connection timed out,说明该端口不可达。回退方案:
- 使用
web-accessskill 的 CDP 浏览器通过 Bing/Google 搜索 - 或直接使用 GitHub Search API(无需外部搜索)
注意事项
- 免费 API 限制:每月 2000 次请求,每秒 1 次
- 单次最多返回 20 条结果
- 批量搜索自动间隔 0.5 秒避免频率限制
⚠️ 代理依赖(关键)
api.search.brave.com 在国内无法直连,必须通过代理访问。即使 API Key 已配置,没有代理会导致 Connection timed out。
可用性诊断
# 检查代理是否生效
source ~/scripts/shell_conf
curl -sI --connect-timeout 5 "https://api.search.brave.com/" \
-H "X-Subscription-Token: ${BRAVE_API_KEY}"
# 返回 HTTP 200/403 = 通,Connection timed out = 需要切代理兜底方案
Brave 不可用时,按以下优先级降级:
- CDP + Bing/Google 搜索 — 通过
cdp-cli.mjs打开 Bing 页面,用 JS 提取搜索结果中的链接(见 web-access skill) - DuckDuckGo HTML —
curl https://html.duckduckgo.com/html/?q=query解析 HTML 结果 - Jina Reader —
curl "https://r.jina.ai/<URL>"作为单页抓取兜底
CDP + Bing 搜索示例(搜索 GitHub 仓库时最有效):
SCRIPT="/home/bushuhui/.agents/skills/web-access/scripts/cdp-cli.mjs"
TARGET=$(node "$SCRIPT" new "https://www.bing.com/search?q=<QUERY>" 2>&1 | grep -oP '"targetId":"\K[A-F0-9]+')
sleep 5
node "$SCRIPT" eval "$TARGET" "Array.from(document.querySelectorAll('li.b_algo')).slice(0,8).map(li=>{const a=li.querySelector('h2 a'); return a ? {title:a.textContent.trim().substring(0,100), href:a.href} : null}).filter(Boolean)"Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

