Loading...
Loading...
Build local constrained-browser agents with a safe_browser tool that owns CDP, enforces a domain allowlist with Fetch interception, and lets a runtime Claude Agent SDK agent complete browsing tasks without raw browser, shell, or CDP access. Use when the user wants an agent to browse or scrape while staying on approved domains, demo blocked off-domain navigation, or generate a safe browser client.
npx skill4agent add browserbase/skills safe-browsersafe_browserFetchcp -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.mjsSAFE_BROWSER_HEADLESS=false node hn-scraper-demo.mjsnpx playwright install chromiumUser 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 hostsgotoPage.navigateextract_front_pageextract_commentscurrent_urlaudit_log{ method, params }Fetch.disablesafe_browserhttps://news.ycombinator.comFetch.requestPausedFetch.failRequestnews.ycombinator.comsafe_browser