brave-search

brave-search is a skill for Claude Code, Codex from bushuhui/skills. It costs 88 tokens per session (1,126 once invoked), scanned A, original, MIT.

A command-line web search tool that uses the Brave Search API, a service for finding web pages and news. It supports result limits, time filters, country filters, multiple queries, and pagination.

In plain words
What is it for?
Use it to search for webpages or news, run several related searches, filter results by freshness or location, and provide URLs for later content retrieval.
Why use it?
It gives an agent a repeatable way to search the web and receive structured results instead of relying on manual browser searches. It can also narrow searches to recent results or a particular country.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /home/bushuhui/.agents/skills/web-access/scripts/cdp-cli.mjs.

Good fit Use it to search for webpages or news, run several related searches, filter results by freshness or location, and provide URLs for later content retrieval.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for brave-search

README.md
[![agentmods](https://agentmods.dev/badge/skills/bushuhui/skills/brave-search/github.svg)](https://agentmods.dev/skills/bushuhui/skills/brave-search)
Your own site
<a href="https://agentmods.dev/skills/bushuhui/skills/brave-search"><img src="https://agentmods.dev/badge/skills/bushuhui/skills/brave-search/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for brave-search

Your own site · 80×15
<a href="https://agentmods.dev/skills/bushuhui/skills/brave-search"><img src="https://agentmods.dev/badge/skills/bushuhui/skills/brave-search.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,126 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00088 $0.01126
Opus 5 $0.00044 $0.00563
Sonnet 5 $0.00018 $0.00225
Haiku 4.5 $0.00009 $0.00113

Measured 11d ago against content hash 9f0b02cc07fe, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

brave-search scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/brave_search.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -sv --connect-timeout 5 "https://api.search.brave.com/res/v1/web/search?q=test&count=1" \
brave-search/SKILL.md · 112 lines

How it starts

The opening of the file, as written. The whole thing — 112 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

使用流程

  1. 分析用户需求,拆解为搜索关键词(中英文各一组效果更好)
  2. 运行 brave_search.py 搜索
  3. 从结果中挑选最相关的 URL
  4. web_fetch 抓取正文获取详细内容
  5. 整合信息回复用户

与 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-access skill 的 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 不可用时,按以下优先级降级:

  1. CDP + Bing/Google 搜索 — 通过 cdp-cli.mjs 打开 Bing 页面,用 JS 提取搜索结果中的链接(见 web-access skill)
  2. DuckDuckGo HTMLcurl https://html.duckduckgo.com/html/?q=query 解析 HTML 结果
  3. Jina Readercurl "https://r.jina.ai/<URL>" 作为单页抓取兜底

Read the full file on GitHub · 112 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 112 lines · 88 tokens per session scan A 9f0b02cc07fe

Subscribe to this mod's changes

brave-search is a skill published in the GitHub repository bushuhui/skills (2 stars, last pushed 3mo ago), licensed MIT. It adds 88 tokens to every session and 1,126 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens