Back to Skills

brave-search

akaihola
Updated Today
5 views
0
View on GitHub
Developmentmcpautomation

About

This skill provides structured Brave Search web queries and summarization workflows for MCP-style agents, enabling fact-finding on current events and research. It retrieves SERP data (web pages, FAQs, news) and can generate concise narrative summaries when authorized. Developers need to configure the `BRAVE_SEARCH_API_KEY` environment variable to use it.

Quick Install

Claude Code

Recommended
Plugin CommandRecommended
/plugin add https://github.com/akaihola/skills-akaihola
Git CloneAlternative
git clone https://github.com/akaihola/skills-akaihola.git ~/.claude/skills/brave-search

Copy and paste this command in Claude Code to install this skill

Documentation

Purpose

Provide deterministic wrappers around Brave Search’s web and summarizer endpoints. Use the web workflow to retrieve structured SERP data (web pages, FAQs, discussions, news, videos). Use the summarizer workflow to turn Brave’s aggregated findings into a concise narrative when the subscription permits summarization.

When to Use

  • Run web fact-finding on current events, product comparisons, research digests, or perspective gathering when Google/Bing responses are insufficient.
  • Request the summarizer only after a prior web search produced a summarizer_key, and the user explicitly wants a Brave-generated synthesis.

Configuration Requirements

  • Set BRAVE_SEARCH_API_KEY in the execution environment. The value populates the X-Subscription-Token header.
  • Prefer secure storage through the project’s secrets tooling before launching the script.
  • All invocations must use uv run to respect the project’s Python environment.

Workflows

A. Web Search (results only)

  1. Prepare JSON containing at least "query". Optional keys include country, search_lang, ui_lang, count, offset, safesearch, freshness, text_decorations, spellcheck, result_filter, goggles, units, and extra_snippets.
  2. Run uv run scripts/brave_search.py web --params-json '<JSON>'.
  3. Consume web_results, faq_results, discussions_results, news_results, and video_results from the JSON output. Each section mirrors the Brave MCP tool’s simplified records.
  4. If ok is false with "No web results found", broaden or restate the query before retrying.

B. Web Search with Summarizer Key

  1. Follow workflow A but add "summary": true to the JSON payload.
  2. The script automatically requests result_filter=summarizer. Inspect the response’s summarizer_key.
  3. Store the key and cite the original web_results when answering detailed questions while preparing for a summarizer follow-up.

C. Summarizer

  1. Ensure a recent workflow B run produced a summarizer_key.
  2. Build JSON like {"key": "<summarizer_key>", "entity_info": false, "inline_references": true}. Optional overrides: poll_interval_ms (default 50) and max_attempts (default 20).
  3. Run uv run scripts/brave_search.py summarizer --params-json '<JSON>'.
  4. Use summary_text as the main synthesis. Supplement with enrichments, followups, and entities_infos for deeper context or suggested next steps.
  5. If the summarizer fails, rely on the previously collected web_results to craft a manual answer.

Error Handling and Fallbacks

  • Missing API key: the script emits ok: false with an explicit description; set the environment variable and rerun.
  • HTTP or Brave-side errors: review the details object, adjust parameters, or pause if throttled.
  • Summarizer polling timeout: rerun the web search to refresh the key, or answer using raw web data.

References

  • references/brave_web_search_params.md — exhaustive parameter definitions and sample payloads.
  • references/brave_summarizer_workflow.md — polling logic, summary message schema, and tuning guidance.
  • references/brave_search_examples.md — end-to-end scenarios demonstrating combined web and summarizer usage.

GitHub Repository

akaihola/skills-akaihola
Path: brave-search

Related Skills

sglang

Meta

SGLang is a high-performance LLM serving framework that specializes in fast, structured generation for JSON, regex, and agentic workflows using its RadixAttention prefix caching. It delivers significantly faster inference, especially for tasks with repeated prefixes, making it ideal for complex, structured outputs and multi-turn conversations. Choose SGLang over alternatives like vLLM when you need constrained decoding or are building applications with extensive prefix sharing.

View skill

Algorithmic Art Generation

Meta

This skill helps developers create algorithmic art using p5.js, focusing on generative art, computational aesthetics, and interactive visualizations. It automatically activates for topics like "generative art" or "p5.js visualization" and guides you through creating unique algorithms with features like seeded randomness, flow fields, and particle systems. Use it when you need to build reproducible, code-driven artistic patterns.

View skill

business-rule-documentation

Meta

This skill provides standardized templates for systematically documenting business logic and domain knowledge following Domain-Driven Design principles. It helps developers capture business rules, process flows, decision trees, and terminology glossaries to maintain consistency between requirements and implementation. Use it when documenting domain models, creating business rule repositories, or bridging communication between business and technical teams.

View skill

huggingface-accelerate

Development

HuggingFace Accelerate provides the simplest API for adding distributed training to PyTorch scripts with just 4 lines of code. It offers a unified interface for multiple distributed training frameworks like DeepSpeed, FSDP, and DDP while handling automatic device placement and mixed precision. This makes it ideal for developers who want to quickly scale their PyTorch training across multiple GPUs or nodes without complex configuration.

View skill