safe-browser
Build secure browser agents with domain allowlists.
Developer Setup
Setup & Installation
npx skills add https://github.com/browserbase/skills --skill safe-browsernpx skills add https://github.com/browserbase/skills --skill safe-browserOverview
What This Skill Does
Constrains AI agents by enforcing a domain allowlist with Fetch interception, preventing raw shell or CDP access.
Application
When to use this Skill
- When you want to restrict an AI agent to browse only within an allowlist of approved domains.
- When building secure browser-agent applications that prevent access to sensitive or malicious sites.
- When demonstrating browser task execution under strict CDP and network request interception.
- When testing offline navigation handlers or custom network blocklist policies.
- When you need a secure, sandboxed client browser boundary for untrusted agents.
Documentation
Show Skills.md file
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
Recommendations
Explore other random skills
cloudflare-deploy
Deploy apps to Cloudflare using Workers, Pages, and platform services
develop-web-game
Build and test web games iteratively using Playwright with time-stepping
doc
Read, create, and edit .docx documents with formatting and layout fidelity