Brave Web Search
Searches the web and fetches AI-generated summarized answers using the Brave Search API. Exposes two commands: brave-search for ranked web results and brave-answer for concise AI summaries.
Instructions
-
Trigger: Activate when the user wants to look something up on the web, check recent news, or get a factual answer to a question.
-
Setup: No installation step is required — this skill has zero external dependencies and runs on native Node.js.
-
Command selection:
- Use
brave-searchfor general web searches where ranked results with URLs and snippets are useful. - Use
brave-answerfor direct factual questions where a concise AI summary is more appropriate.
- Use
-
Execution: Invoke the script by passing the command name and parameters as separate arguments, never by interpolating user input into a shell command string. Use an argument array /
execFile-style invocation so the shell never parses user-supplied values. Example (Node-style pseudo-code):execFile('node', ['index.js', 'brave-search', '--query', userQuery, '--count', '10'])Do not construct the command as a single concatenated string such as
"node index.js brave-search --query " + userQuery. -
Freshness: For time-sensitive queries, pass
--freshnessfollowed bypd(past day),pw(past week), orpm(past month) as a separate argument tobrave-search. -
Fallback: If
brave-answerreturnsanswer: null, present thefallback_resultsto the user instead. -
Completion: Present the results clearly, citing titles and URLs for web search results, or the summary text for answer results.
Security & Privacy
- Shell Injection Prevention: User queries must be passed as discrete arguments (e.g. via
execFileor an argv array), never interpolated into a shell command string. Concatenating user input into a shell string (e.g.shell: truewith template literals) enables shell injection and is strictly forbidden. - Instruction Scope: This skill only sends query strings to the Brave Search and Brave Summarizer APIs.
- Environment: It uses the
BRAVE_SEARCH_API_KEYandBRAVE_ANSWERS_API_KEYprovided by the OpenClaw environment. - Data Access: It does not read local files or .env files. All configuration is handled by the agent.
Scan to contact