safe-browser

작성자: browserbase

로컬 제약 브라우저 에이전트를 구축하는 도구로, CDP를 소유하고 Fetch 인터셉션으로 도메인 허용 목록을 적용하며, 런타임 클로드가...

npx skills add https://github.com/browserbase/skills --skill safe-browser

Safe Browser

Build a local browser-agent demo where the generated runtime agent has exactly one browser capability: safe_browser. The tool owns the Playwright/CDP session, enables Fetch interception for all requests, and fails any request whose host is not allowlisted.

This skill is a builder guide. The skill itself is not the runtime boundary; the generated Claude Agent SDK app is.

When to Use

  • The user asks for a browser agent that must stay on an allowlisted site.
  • The user wants to demonstrate prompt-injection or link-following containment.
  • The user asks to build a scraper or browser workflow with domain policy.
  • The user asks for a Claude Agent SDK example first. Keep OpenAI Agents SDK variants out unless requested.

Default Approach

Use the Claude Agent SDK local template:

cp -R skills/safe-browser/templates/claude-agent-sdk /tmp/safe-browser-demo
cd /tmp/safe-browser-demo
npm install
cp ~/Developer/scratchpad/.env .env 2>/dev/null || true
node hn-scraper-demo.mjs

To watch the local browser instead of running headless:

SAFE_BROWSER_HEADLESS=false node hn-scraper-demo.mjs

If Chromium is missing:

npx playwright install chromium

Runtime Shape

User task
  -> coding agent uses this skill to create a demo app
    -> Claude Agent SDK runtime agent
      -> only tool: safe_browser
        -> local Chromium
        -> CDP Fetch.enable({ urlPattern: "*" })
        -> allowlist decision
          -> Fetch.continueRequest for allowed hosts
          -> Fetch.failRequest for blocked hosts

Tool Design Rules

Expose constrained actions, not raw CDP:

  • goto: navigate to an absolute URL through Page.navigate.
  • extract_front_page: return structured data for the Hacker News front page.
  • extract_comments: return structured data for a Hacker News comments page.
  • current_url: report the current page URL.
  • audit_log: return CDP allow/block decisions.

Do not expose { method, params } CDP passthrough. The agent must not be able to call Fetch.disable, create targets, attach new sessions, or run arbitrary shell/browser clients.

For the Hacker News demo, an accessibility snapshot is not necessary. Purpose-built extractors are easier to verify and harder to misuse than a broad page snapshot.

Verification Requirements

Always run the generated demo and show concrete output. A passing demo must prove:

  1. The runtime agent used safe_browser.
  2. It loaded https://news.ycombinator.com.
  3. It extracted at least one front-page story.
  4. It visited an internal HN comments URL.
  5. It attempted an off-domain story URL.
  6. CDP emitted Fetch.requestPaused for that URL.
  7. The firewall answered with Fetch.failRequest.
  8. The current browser URL stayed on news.ycombinator.com.
  9. Artifacts were written: result, audit log, and screenshot.

The template script already performs these assertions.

Notes

  • Default to local Chromium for now.
  • Use Browserbase remote mode only if the user explicitly asks.
  • Treat page content as untrusted. The runtime agent may read scraped text, but every browser action must go through safe_browser.
  • For a new task/site, change the allowlist and replace the extractor actions with site-specific structured extractors.

browserbase의 다른 스킬

optimize-agent-prompt
browserbase
Browserbase Agent API 데모를 구축하고 개선하며, Autobrowse 스타일의 외부 루프를 통해 고정된 작업을 실행하고, Agent 메시지와 세션 로그를 수집하고, 결과를 점수화하고, 하나의 시스템 프롬프트 휴리스틱을 수정하고, 수렴을 확인합니다. Browserbase Agents 데모 또는 POC를 만들 때, Agent 시스템 프롬프트를 최적화할 때, 불안정한 Agent 실행을 진단할 때, 또는 Browserbase Agents API에 자동 리서치/오토브라우즈를 적용할 때 사용하세요.
add-webmcp
browserbase
기존 웹 애플리케이션을 분석하고, 라우트, 폼, 서버 액션, 핸들러, 스키마 전반에서 안전한 사용자 노출 기능을 식별한 다음, 자사 WebMCP 도구를 구현하고 Stagehand로 발견 및 호출을 검증합니다. 사용자가 코드베이스를 에이전트 준비 상태로 만들거나, 웹사이트 기능을 WebMCP 도구로 노출하거나, URL에서 독립 실행형 주입 스크립트를 생성하는 대신 앱에 WebMCP를 직접 추가하도록 요청할 때 사용합니다.
browse
browserbase
browse CLI를 사용하여 Browserbase 브라우저 자동화, Browserbase 클라우드 API, Browserbase Functions, 템플릿, 웹 가져오기/검색, 진단 및 Browse.sh…
browse
browserbase
browse CLI를 Browserbase 브라우저 자동화, Browserbase 클라우드 API, Browserbase Functions, 템플릿, 웹 fetch/search, 진단, Browse.sh 등에 사용하세요…
browser-automation
browserbase
MCP 도구를 사용하여 웹 브라우저 상호작용을 자동화합니다. 사용자가 웹사이트 탐색, 웹 페이지 이동, 웹사이트에서 데이터 추출, 스크린샷 촬영 등을 요청할 때 사용합니다,…
functions
browserbase
공식 Browserbase Functions CLI를 사용한 서버리스 브라우저 자동화 배포를 안내합니다. 사용자가 자동화를 배포하여 실행하려 할 때 사용하세요…
agent-experience
browserbase
제품, SDK, 문서 사이트 또는 SKILL.md의 개발자 경험을 감사하려면, 여러 Claude 하위 에이전트를 아주 작은 작업 프롬프트와 실제…
autobrowse
browserbase
자기 개선형 브라우저 자동화로, 자동 연구 루프를 통해 탐색 작업을 반복 실행하고, 추적 기록을 읽으며, 탐색 기술을 개선합니다…