brave-search

brave-search is a skill for Claude Code, Codex from SawyerHood/middleman. It costs 32 tokens per session (638 once invoked), scanned A, original, Apache-2.0.

A web-search and webpage-content extraction tool that uses the Brave Search API. It can return search results or include page content in Markdown.

In plain words
What is it for?
Use it to search the web, retrieve page content, limit results, or filter searches by freshness; it requires a Brave Search API key.
Why use it?
It provides a command-line way to look up documentation, facts, and web pages without opening a browser.

Skill for Claude CodeCodex

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

Good fit Use it to search the web, retrieve page content, limit results, or filter searches by freshness; it requires a Brave Search API key.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sawyerhood/middleman/brave-search
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add SawyerHood/middleman --skill brave-search
Clone the repo
git clone --depth 1 https://github.com/SawyerHood/middleman

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/sawyerhood/middleman/brave-search/github.svg)](https://agentmods.dev/skills/sawyerhood/middleman/brave-search)
Your own site
<a href="https://agentmods.dev/skills/sawyerhood/middleman/brave-search"><img src="https://agentmods.dev/badge/skills/sawyerhood/middleman/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/sawyerhood/middleman/brave-search"><img src="https://agentmods.dev/badge/skills/sawyerhood/middleman/brave-search.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 638 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00032 $0.00638
Opus 5 $0.00016 $0.00319
Sonnet 5 $0.00006 $0.00128
Haiku 4.5 $0.00003 $0.00064

Measured 12d ago against content hash 01fa24722e05, 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 0 findings 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 12d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (content.js, search.js), 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

apps/backend/src/swarm/skills/builtins/brave-search/SKILL.md · 83 lines

How it starts

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

Web search and content extraction using the official Brave Search API. No browser required.

Setup

Requires a Brave Search API account with a free subscription. A credit card is required to create the free subscription (you won't be charged).

  1. Create an account at https://api-dashboard.search.brave.com/register
  2. Create a "Free AI" subscription
  3. Create an API key for the subscription
  4. Configure BRAVE_API_KEY in the app Settings → Environment Variables. (Fallback for standalone usage: export BRAVE_API_KEY in your shell.)
  5. Dependencies are installed via the backend workspace package. If running this skill standalone, install once from this skill directory:
    npm install
    
middleman brave-search search "query"                         # Basic search (5 results)
middleman brave-search search "query" -n 10                   # More results (max 20)
middleman brave-search search "query" --content               # Include page content as markdown
middleman brave-search search "query" --freshness pw          # Results from last week
middleman brave-search search "query" --freshness 2024-01-01to2024-06-30  # Date range
middleman brave-search search "query" --country DE            # Results from Germany
middleman brave-search search "query" -n 3 --content          # Combined options

Options

  • -n <num> - Number of results (default: 5, max: 20)
  • --content - Fetch and include page content as markdown
  • --country <code> - Two-letter country code (default: US)
  • --freshness <period> - Filter by time:
    • pd - Past day (24 hours)
    • pw - Past week
    • pm - Past month
    • py - Past year
    • YYYY-MM-DDtoYYYY-MM-DD - Custom date range

Extract Page Content

middleman brave-search content https://example.com/article

Fetches a URL and extracts readable content as markdown.

Output Format

--- Result 1 ---
Title: Page Title
Link: https://example.com/page
Age: 2 days ago
Snippet: Description from search results
Content: (if --content flag used)
  Markdown content extracted from the page...

--- Result 2 ---
...

Read the full file on GitHub · 83 lines

Files

What ships with it

3 files 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. 12d ago First seen · 83 lines · 32 tokens per session scan A 01fa24722e05

Subscribe to this mod's changes

brave-search is a skill published in the GitHub repository SawyerHood/middleman (182 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 32 tokens to every session and 638 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

foundry-config-setup

Resolve missing setup caused by a hardcoded Foundry project endpoint or model in a sample. Use when a sample fails because it uses a placeholder/hardcoded projectendpoint (for example "https://your-project.services.ai.azure.com") or a hardcoded model instead of reading them from the environment.

microsoft/agent-framework · 65 tokens

deploy-docker-compose

Run the Omnigent server as a Docker compose stack (server + Postgres) on any Docker host — your laptop, a VPS, EC2 by hand, or as the base layer of any container-platform deploy. Invoke when the user wants to build the image, bring up the compose stack, debug the stack on a host they already have, or extend the stack…

omnigent-ai/omnigent · 84 tokens

haiku

When writing a haiku for this bot, follow these conventions.

agno-agi/agno · 0 tokens

azure-mgmt-botservice-dotnet

Azure Resource Manager SDK for Bot Service in .NET. Management plane operations for creating and managing Azure Bot resources, channels (Teams, DirectLine, Slack), and connection settings. Triggers: "Bot Service", "BotResource", "Azure Bot", "DirectLine channel", "Teams channel", "bot management .NET", "create bot".

microsoft/skills · 78 tokens

fastapi-router-py

Create FastAPI routers with CRUD operations, authentication dependencies, and proper response models. Use when building REST API endpoints, creating new routes, implementing CRUD operations, or adding authenticated endpoints in FastAPI applications.

microsoft/skills · 46 tokens

dogfood

Systematically explore and test a mobile app on iOS/Android with agent-device to find bugs, UX issues, and other problems. Use when asked to dogfood, QA, exploratory test, find issues, bug hunt, or test this app on mobile.

callstack/agent-device · 55 tokens