SkillsReviewed · browserbase

Safe Browser by Browserbase

Safe Browser is a skill for developers building AI agents that browse approved websites, but its Hacker News example needs code changes for other sites. It provides a Claude Agent SDK template using local Chromium, a constrained safe_browser tool and hostname filtering through Chrome DevTools Protocol request interception. No execution results were supplied.

Researched 16 Nov 2026

In short.

Safe Browser is a skill for developers building AI agents that browse approved websites, but its Hacker News example needs code changes for other sites. The template keeps browser control inside one tool and filters intercepted requests through a hostname allowlist. Its page-level controls do not establish complete network isolation or prompt-injection protection, and its final assertions cover less than the guide's stated demonstration requirements. Nothing was executed, so reliability, extraction quality and actual costs remain unknown.

Researched and written by an AI model and checked by a second AI model. How it works

Scope covers the six supplied files under skills/safe-browser at revision 6811ca31163332d9d60309cff48e77f09de37a17: SKILL.md, LICENSE.txt, and the Claude Agent SDK template's .gitignore, hn-scraper-demo.mjs, package.json and package-lock.json. The folder MIT notice is included. No additional ancestor notices, repository-wide implementation, installed dependency source or remote-browser variant was supplied or assessed. Runtime behavior, security coverage, extraction quality, compatibility and actual costs remain unverified.

The overview

What it is

Safe Browser is an instruction-based builder skill in Browserbase's skills repository. It includes a local Claude Agent SDK application template. The guide explicitly distinguishes its instructions from the generated application's runtime controls: enforcement belongs to the application, not to loading the skill.

The original source location is [https://github.com/browserbase/skills/tree/main/skills/safe-browser]. The supplied files identify revision 6811ca31163332d9d60309cff48e77f09de37a17. The demo package names itself safe-browser-claude-hn-demo and declares version 0.1.0.

Where it fits

The resource offers a concrete starting point for learning how to put browser restrictions outside an AI model's instructions. Developers can inspect the permitted actions, request decisions and extraction code rather than relying on a promise that the agent will avoid external links.

Its strongest supported use is a local demonstration or an application starting point. No supplied run results establish dependable containment, and the included assertions leave important gaps. Use in a broader browsing application would need additional implementation and verification.

Who it is for

The intended users are developers building agents or scrapers that should browse approved domains, and people demonstrating how an external link can be blocked. Beginners need familiarity with a terminal, npm, environment variables and API credentials.

Experienced developers can adapt the allowlist and implement structured extractors for another site. The supplied tool has no general clicking, form-filling or arbitrary page-evaluation action, so workflows needing those capabilities require development.

What it provides

The safe_browser tool exposes five actions: goto, extract_front_page, extract_comments, current_url and audit_log. The Hacker News extractors return structured story metadata and comment text. Extraction limits default to ten stories and five comments, with a maximum requested limit of thirty.

The code records request decisions, tool calls and selected CDP commands. After the agent query finishes, it is designed to write result.md, audit-log.json, tool-log.json, cdp-command-log.json and a full-page final-page.png screenshot.

Using it

What it needs

The guide requires Node.js 18+, npm, local Chromium and ANTHROPIC_API_KEY. The application depends on Claude Agent SDK, Playwright and Zod. Local refers to the browser: extracted story and comment text is returned to the SDK agent, and provider data-handling terms are not supplied.

The locked @hono/node-server dependency declares Node.js >=18.14.1, so Node.js 18.0 alone does not satisfy every captured engine requirement. Operating-system prerequisites, memory requirements and installation compatibility were not assessed.

How restrictions work

The application launches Chromium with Playwright and attaches a Chrome DevTools Protocol session to its page. Fetch.enable uses a wildcard request pattern. For intercepted requests, the handler continues allowed hosts with Fetch.continueRequest and blocks other hosts with Fetch.failRequest.

The hostname policy lowercases names and removes a leading www. before checking news.ycombinator.com. It explicitly exempts about:, chrome:, devtools: and data: URL prefixes from hostname checking. Blocked navigation triggers an attempt to restore the last allowed page.

The SDK configuration exposes only safe_browser, supplies an allowed-tool list and denies other tool names through canUseTool. No tool action accepts raw CDP commands. These controls operate within the supplied application; no process-wide network sandbox is implemented in the shown code.

Getting started

The documented setup copies templates/claude-agent-sdk into a local working directory, runs npm install, installs Chromium with npx playwright install chromium if necessary, supplies ANTHROPIC_API_KEY and starts node hn-scraper-demo.mjs. Setting SAFE_BROWSER_HEADLESS=false displays the browser.

The template automatically reads a .env file beside the script and, when present, another at $HOME/Developer/scratchpad/.env, filling unset environment variables. It passes the process environment to the SDK. Review that personal-path fallback before adapting the template. Its .gitignore excludes .env, node_modules and artifacts, but does not control access to those files.

The included task

The scripted task asks the agent to open [https://news.ycombinator.com/], extract the first ten stories, visit an internal comments page and extract five comments. It then asks the agent to attempt an external story URL, using [https://example.com/] as a fallback control.

The intended result reports story and comment counts, the attempted external URL and whether CDP blocked it. The code also checks the final browser hostname. These are intended behaviors; no actual output, screenshot or completed execution was supplied.

Assessment & evidence

Important limitations

The policy checks hostnames, without separate restrictions on paths or ports, and includes internal-URL exceptions. An allowed hostname does not make its content trustworthy. The code shows one page CDP session; comprehensive coverage of other browser targets and network channels is not established.

The final assertions are weaker than the guide's stated requirements. They allow zero extracted comments, do not explicitly assert an internal comments navigation and accept any blocked off-domain request. A blocked subresource could therefore satisfy the off-domain assertion without proving that the intended external story navigation was attempted and blocked.

The final-host assertion checks the endpoint after restoration, not an uninterrupted history of staying on Hacker News. No adversarial prompt-injection results are supplied. The fixed DOM selectors also make extraction dependent on Hacker News page structure.

Why the design matters

The useful design choice is separating the model's request from the code that controls browser access. A URL suggested by page text still passes through the same tool and interception handler. Fixed extraction actions also give developers a smaller interface to inspect than arbitrary browser commands.

This supports a constrained application design, but does not establish general prompt-injection resistance. The agent still reads untrusted extracted text, and hostname filtering does not determine whether an action or interpretation is appropriate within an allowed site.

Other approaches

The guide mentions Browserbase remote mode and OpenAI Agents SDK variants, but the supplied folder contains only the local Claude Agent SDK template. No implementation, performance comparison or cost comparison for those alternatives is supplied.

For another website, the documented route is to change the allowlist and replace the Hacker News extractors with site-specific structured actions. This is customization work, not a ready-made general browsing capability.

Evidence and confidence

The supplied source consists of the skill guide, MIT notice, template script, package manifest, dependency lockfile and .gitignore. These establish the documented design and visible implementation. The pinned guide is available at [https://raw.githubusercontent.com/browserbase/skills/6811ca31163332d9d60309cff48e77f09de37a17/skills/safe-browser/SKILL.md].

Nothing was installed or executed. No generated artifacts, observed request traces, measured extraction results, performance measurements or independent security assessment were supplied. Assertions in source code establish intended checks, not passing results.

Access & freshness

Costs and limits

The template sets maxBudgetUsd to 0.75 and maxTurns to eight. These are SDK configuration values, not evidence of an actual charge or proof of a billing ceiling. The query does not explicitly select a model.

Provider prices, token consumption and actual run cost are unknown. Chromium runs locally in the supplied implementation; it contains no Browserbase remote-browser connection. Execution time and local resource consumption are also unknown.

Licence and reuse

The folder includes an MIT licence with copyright attributed to Browserbase, Inc., 2026. It permits use, modification, publication, distribution, sublicensing and sale, provided the copyright and permission notices accompany copies or substantial portions. It provides no warranty.

Installed dependencies have separate licence terms. The lockfile labels Playwright Apache-2.0 and Zod MIT, while Claude Agent SDK refers to licence text in its own documentation. Those SDK terms are not reproduced in the supplied files. The folder licence is available at [https://raw.githubusercontent.com/browserbase/skills/6811ca31163332d9d60309cff48e77f09de37a17/skills/safe-browser/LICENSE.txt].

Version context

The supplied snapshot identifies commit 6811ca31163332d9d60309cff48e77f09de37a17 and capture time 2026-11-16T13:57:57.976Z. That timestamp does not establish when the skill was last maintained. Changes after this revision are unknown.

The package manifest requests Claude Agent SDK ^0.2.123, Playwright ^1.58.0 and Zod ^4.3.6. The lockfile resolves them to 0.2.123, 1.59.1 and 4.3.6 respectively. Compatibility with newer dependencies or current Hacker News markup was not assessed.

Before adopting it

Review the environment-file loading, dependency terms and hostname policy before running the template. For a new site, define the permitted destinations and implement the required structured extractors while keeping browser control inside the trusted tool.

Strengthen verification by matching the intended external goto URL to its interception event and blocking decision, explicitly checking the internal comments navigation and requiring meaningful extraction results. Assess additional browser targets, network channels and hostile page content before relying on broader containment. These checks remain outstanding.

Evidence for this report

skills/safe-browser/LICENSE.txtnotice · checked 2026-11-16
skills/safe-browser/SKILL.mdselected · checked 2026-11-16