Brave Search API Skills
Official skills for using Brave Search API with AI coding agents.
Works with Claude Code, Cursor, GitHub Copilot, Codex, Gemini CLI, VS Code, Windsurf, OpenClaw, Cline, Goose, Amp, Roo Code, and many other agents that support the Agent Skills standard.
Prerequisites
Get a Brave Search API key at https://api.search.brave.com
Security tip: Prefer agent-native config over shell profile exports. Coding agents can access environment variables — scoped configs limit exposure. See API key setup for all options.
Claude Code
Add to ~/.claude/settings.json (docs):
{
"env": {
"BRAVE_SEARCH_API_KEY": "your-key"
}
}
This makes the key available in all Claude Code sessions. For per-project use, add to .claude/settings.local.json (gitignored) with the same format.
Cursor
Option 1 — direnv (directory-scoped, auto-loads/unloads):
# Install direnv (https://direnv.net), then in your project directory:
echo 'export BRAVE_SEARCH_API_KEY="your-key"' >> .envrc
direnv allow
Option 2 — Shell profile (~/.zshrc or ~/.bashrc):
export BRAVE_SEARCH_API_KEY="your-key"
Then restart Cursor (launch from terminal or fully quit and reopen — reloading the window is not enough). Cursor inherits environment variables from your shell. You can also add skills via Settings > Rules > Add Rule > Remote Rule using the GitHub URL.
Codex
Option 1 — config.toml (docs):
# ~/.codex/config.toml
[shell_environment_policy]
set = { BRAVE_SEARCH_API_KEY = "your-key" }
Option 2 — Shell profile (~/.zshrc or ~/.bashrc):
export BRAVE_SEARCH_API_KEY="your-key"
Then restart your terminal. Codex reads environment variables from the shell (CLI, app, and IDE extension).
OpenClaw
Add to ~/.openclaw/.env (docs):
BRAVE_SEARCH_API_KEY=your-key
Or add to ~/.openclaw/openclaw.json under the skill's config:
{
"skills": {
"entries": {
"brave-search": {
"env": {
"BRAVE_SEARCH_API_KEY": "your-key"
}
}
}
}
}
Other agents
Option 1 — direnv (directory-scoped, auto-loads/unloads):
# Install direnv (https://direnv.net), then in your project directory:
echo 'export BRAVE_SEARCH_API_KEY="your-key"' >> .envrc
direnv allow
Option 2 — Shell profile (~/.zshrc or ~/.bashrc):
export BRAVE_SEARCH_API_KEY="your-key"
Installation
All agents below support the Agent Skills standard and read SKILL.md files from their skills directory.
Claude Code
Skills documentation
Plugin marketplace (auto-updates, no git needed):
/plugin marketplace add brave/brave-search-skills
/plugin install brave-search-skills@brave-search
curl (no git, no marketplace):
# User-level (available in all projects)
mkdir -p ~/.claude/skills && curl -sL https://github.com/brave/brave-search-skills/archive/main.tar.gz | tar xz -C ~/.claude/skills --strip-components=2 brave-search-skills-main/skills
# Project-level
mkdir -p .claude/skills && curl -sL https://github.com/brave/brave-search-skills/archive/main.tar.gz | tar xz -C .claude/skills --strip-components=2 brave-search-skills-main/skills
Manual (git clone + cp):
git clone https://github.com/brave/brave-search-skills
cp -r brave-search-skills/skills/* ~/.claude/skills/ # user-level
cp -r brave-search-skills/skills/* .claude/skills/ # project-level
Cursor
Skills documentation
Remote Rule (no terminal needed):
Settings → Rules → Project Rules → Add Rule → Remote Rule → paste https://github.com/brave/brave-search-skills
curl:
# Project-level
mkdir -p .cursor/skills && curl -sL https://github.com/brave/brave-search-skills/archive/main.tar.gz | tar xz -C .cursor/skills --strip-components=2 brave-search-skills-main/skills
# User-level
mkdir -p ~/.cursor/skills && curl -sL https://github.com/brave/brave-search-skills/archive/main.tar.gz | tar xz -C ~/.cursor/skills --strip-components=2 brave-search-skills-main/skills
Manual (cp — requires git clone above):