← 返回 Skills 市场
garibong-labs

Brave Api Setup

作者 garibong-labs · GitHub ↗ · v0.1.2
cross-platform ✓ 安全检测通过
1727
总下载
1
收藏
5
当前安装
3
版本数
在 OpenClaw 中安装
/install brave-api-setup
功能描述
Set up Brave Search API for OpenClaw web_search. Use when user needs to configure Brave API, get Brave API key, enable web search, or fix "missing_brave_api_key" error.
使用说明 (SKILL.md)

Brave API Setup

Automates Brave Search API key extraction and OpenClaw configuration.

Included Files

File Description
SKILL.md This document
scripts/apply-api-key.js Applies API key to OpenClaw config (Node.js)

Dependencies

  • Node.js (for apply-api-key.js)
  • OpenClaw browser capability (browser tool)

When to Use

  • User wants to enable web_search in OpenClaw
  • Error: missing_brave_api_key
  • User asks to set up Brave Search API

Prerequisites

  • User must have a Brave Search API account
  • User must be logged in (openclaw browser profile)
  • API key must exist in dashboard

Workflow

Step 1: Navigate to API keys page

browser(action="navigate", profile="openclaw", 
        targetUrl="https://api-dashboard.search.brave.com/app/keys")

Step 2: Click reveal button (eye icon)

Take snapshot, find the reveal button, click it:

browser(action="act", kind="click", ref="\x3Ceye-button-ref>")

Step 3: Extract key via JavaScript (avoids LLM transcription error)

browser(action="act", kind="evaluate", 
        fn="(() => { const cells = document.querySelectorAll('td'); for (const cell of cells) { const text = cell.textContent?.trim(); if (text && text.startsWith('BSA') && !text.includes('•') && text.length > 20) return text; } return null; })()")

The result field contains the exact API key.

Step 4: Apply to config (direct file write, no LLM involved)

Relative to skill directory:

node \x3Cskill_dir>/scripts/apply-api-key.js "\x3Cextracted-key>"

Or use gateway config.patch with the extracted key.

Why This Approach

Problem: LLM can confuse similar characters when transcribing (O vs 0, l vs 1).

Solution:

  1. evaluate extracts key via JavaScript → returns exact string
  2. apply-api-key.js writes directly to config → bit-perfect

The key never passes through LLM text generation.

Manual Account Setup

If user doesn't have an account:

  1. Go to https://api-dashboard.search.brave.com
  2. Sign up with email
  3. Subscribe to Free plan (requires credit card)
  4. Create API key in dashboard
  5. Then run this skill

문의 / Feedback

버그 리포트, 기능 요청, 피드백은 아래로 보내주세요.

安全使用建议
This skill appears to be coherent and limited to its stated job, but it will access your logged-in Brave dashboard (via the agent/browser) and will write to your OpenClaw config file. Before installing or running it: 1) review the included scripts (scripts/apply-api-key.js) yourself (it is short and only reads/writes ~/.openclaw/openclaw.json), 2) back up ~/.openclaw/openclaw.json, 3) confirm you want the agent/browser to access the dashboard session used to create the key, and 4) consider manually running the node script with a known key (or in a safe environment) to verify behavior. If you have doubts about the source, contact the developer or type the key into your config manually instead of automating the reveal/capture step.
功能分析
Type: OpenClaw Skill Name: brave-api-setup Version: 0.1.2 The skill `brave-api-setup` is designed to automate the configuration of the Brave Search API key for OpenClaw. It uses the `browser` tool to navigate to the Brave API dashboard, extract the API key via JavaScript evaluation, and then uses a local Node.js script (`scripts/apply-api-key.js`) to write this key directly into the OpenClaw configuration file (`~/.openclaw/openclaw.json`). All actions are clearly aligned with the stated purpose, and there is no evidence of data exfiltration, malicious execution (beyond expected configuration updates), persistence mechanisms, or prompt injection attempts against the agent. The use of `browser(action="evaluate")` is for a specific, legitimate data extraction task from a trusted domain.
能力评估
Purpose & Capability
Name/description ask to configure Brave API for OpenClaw web_search. Required binary (node) and the included node script that writes to ~/.openclaw/openclaw.json are exactly what you'd expect for applying an API key. No unrelated credentials or services are requested.
Instruction Scope
SKILL.md instructs the agent to use the OpenClaw browser profile to navigate the Brave API dashboard, click reveal, and run an in-page JS evaluation to extract the BSA key, then call the included Node script to write it to the OpenClaw config. This stays within the stated purpose, but it requires the agent/browser to access the user's logged-in Brave dashboard and page DOM (sensitive session access). The skill explicitly avoids routing the key through the LLM, which matches the provided code.
Install Mechanism
Instruction-only skill with a small included Node script; no external downloads, package installs, or archive extraction. This is a low-risk install surface — it only requires that 'node' be available to run the included script.
Credentials
The skill declares no required env vars or credentials and does not request unrelated secrets. It does rely on process.env.HOME in the Node script to find ~/.openclaw/openclaw.json and on the OpenClaw browser profile/session to access the Brave dashboard — both are proportional to extracting and applying a user API key. One small inconsistency: SKILL.md references the 'browser' tool dependency but the registry metadata doesn't explicitly list that capability; this is likely a tooling/metadata omission rather than malicious.
Persistence & Privilege
The skill is not marked always:true and does not request permanent or elevated platform privileges. The included script writes only to the user's OpenClaw config (~/.openclaw/openclaw.json), which is within the expected scope for applying an API key; it does not modify other skills or system-wide settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install brave-api-setup
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /brave-api-setup 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.2
연락처 추가 ([email protected])
v0.1.1
Unified all text to English
v0.1.0
Initial release — browser-based API key extraction with JS evaluate to avoid LLM transcription errors
元数据
Slug brave-api-setup
版本 0.1.2
许可证
累计安装 5
当前安装数 5
历史版本数 3
常见问题

Brave Api Setup 是什么?

Set up Brave Search API for OpenClaw web_search. Use when user needs to configure Brave API, get Brave API key, enable web search, or fix "missing_brave_api_key" error. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1727 次。

如何安装 Brave Api Setup?

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

Brave Api Setup 是免费的吗?

是的,Brave Api Setup 完全免费(开源免费),可自由下载、安装和使用。

Brave Api Setup 支持哪些平台?

Brave Api Setup 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Brave Api Setup?

由 garibong-labs(@garibong-labs)开发并维护,当前版本 v0.1.2。

💬 留言讨论