Configure Brave Search API and troubleshoot network/proxy issues for web_search functionality. Use when user needs to (1) Set up Brave Search API key, (2) Fix web_search fetch failures, (3) Configure proxy for OpenClaw tools on macOS with Clash/V2Ray/Surge, or (4) Diagnose "fetch failed" errors with web_search/web_fetch tools.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install brave-search-setup或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install brave-search-setup⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/brave-search-setup/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: brave-search-setup description: Configure Brave Search API and troubleshoot network/proxy issues for web_search functionality. Use when user needs to (1) Set up Brave Search API key, (2) Fix web_search fetch failures, (3) Configure proxy for OpenClaw tools on macOS with Clash/V2Ray/Surge, or (4) Diagnose "fetch failed" errors with web_search/web_fetch tools. ---
Setup Brave Search API and resolve network connectivity issues for OpenClaw web tools.
# Option A: Via config.patch (key will be stored securely)
openclaw gateway config.patch --raw '{"tools":{"web":{"search":{"apiKey":"YOUR_BRAVE_API_KEY","enabled":true,"provider":"brave"}}}}'
Or edit ~/.openclaw/openclaw.json directly:
{
"tools": {
"web": {
"search": {
"enabled": true,
"provider": "brave",
"apiKey": "YOUR_BRAVE_API_KEY"
}
}
}
}
openclaw web.search --query "test" --count 1
If works → Done. If "fetch failed" → Continue to proxy setup.
Common proxy ports by client:
Detect actual port:
# Check if Clash is running
ps aux | grep -i clash
# Find mixed-port from Clash config
cat "~/Library/Application Support/io.github.clash-verge-rev.clash-verge-rev/clash-verge.yaml" | grep mixed-port
# Or test common ports
for port in 7890 7891 7897 6152 6153 1080 10808; do
if nc -z 127.0.0.1 $port 2>/dev/null; then
echo "Port $port is open"
fi
done
Method A: launchctl (Recommended - survives restart)
# Set for current session and future sessions
launchctl setenv HTTPS_PROXY http://127.0.0.1:7897
launchctl setenv HTTP_PROXY http://127.0.0.1:7897
Method B: Shell export (Session only)
export HTTPS_PROXY=http://127.0.0.1:7897
export HTTP_PROXY=http://127.0.0.1:7897
Method C: Add to shell profile (Permanent)
echo 'export HTTPS_PROXY=http://127.0.0.1:7897' >> ~/.zshrc
echo 'export HTTP_PROXY=http://127.0.0.1:7897' >> ~/.zshrc
source ~/.zshrc
openclaw gateway config.patch --raw '{"commands":{"restart":true}}'
# Restart to pick up proxy env vars
openclaw gateway restart
# Or use SIGUSR1
kill -USR1 $(pgrep -f "openclaw gateway")
# Test web search
openclaw web.search --query "Brave Search test" --count 1
# Test web fetch
openclaw web.fetch --url "https://api.search.brave.com" --max-chars 100
Symptom: Browser can access Google, but OpenClaw tools fail. Cause: Gateway process started before proxy env vars were set. Solution: Restart Gateway after setting HTTPS_PROXY.
Enable restart command:
openclaw gateway config.patch --raw '{"commands":{"restart":true}}'
Verify key is set:
openclaw gateway config.get | grep -A5 'web.*search'
Test directly with curl:
curl -s "https://api.search.brave.com/res/v1/web/search?q=test&count=1" \
-H "Accept: application/json" \
-H "X-Subscription-Token: YOUR_API_KEY"
Clash "mixed-port" (default 7897) handles both HTTP and SOCKS5. If using dedicated ports:
Not all tools respect HTTPS_PROXY. For tools that don't:
# Use proxychains-ng
brew install proxychains-ng
# Configure
sudo tee /usr/local/etc/proxychains.conf <<EOF
strict_chain
proxy_dns
[ProxyList]
http 127.0.0.1 7897
EOF
# Run with proxy
proxychains4 openclaw web.search --query "test"
config.patch or edit JSONlaunchctl setenv or shell exportopenclaw gateway restart安装 Brave Search Setup 后,可以对 AI 说这些话来触发它
Help me get started with Brave Search Setup
Explains what Brave Search Setup does, walks through the setup, and runs a quick demo based on your current project
Use Brave Search Setup to configure Brave Search API and troubleshoot network/proxy issues fo...
Invokes Brave Search Setup with the right parameters and returns the result directly in the conversation
What can I do with Brave Search Setup in my data & analytics workflow?
Lists the top use cases for Brave Search Setup, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/brave-search-setup/ 目录(个人级,所有项目可用),或 .claude/skills/brave-search-setup/(项目级)。重启 AI 客户端后,用 /brave-search-setup 主动调用,或让 AI 根据上下文自动发现并使用。
Brave Search Setup 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Brave Search Setup 可免费安装使用。请查阅仓库了解许可证信息。
Configure Brave Search API and troubleshoot network/proxy issues for web_search functionality. Use when user needs to (1) Set up Brave Search API key, (2) Fix web_search fetch failures, (3) Configure proxy for OpenClaw tools on macOS with Clash/V2Ray/Surge, or (4) Diagnose "fetch failed" errors with web_search/web_fetch tools.
Automate my data & analytics tasks using Brave Search Setup
Identifies repetitive steps in your workflow and sets up Brave Search Setup to handle them automatically
Brave Search Setup 属于「Data & Analytics」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。