A skill for seamlessly enabling Claude Code to interface with a browser using Stagehand (AI browser automation framework). Because Stagehand accepts natural language instructions, it's significantly more context-efficient than native Playwright while providing more features built for automation.
On Claude Code, to add the marketplace, simply run:
/plugin marketplace add browserbase/agent-browseThen install the plugin:
/plugin install browser-automation@browser-toolsIf you prefer the manual interface:
- On Claude Code, type
/plugin - Select option
3. Add marketplace - Enter the marketplace source:
browserbase/agent-browse - Press enter to select the
browser-automationplugin - Hit enter again to
Install now - Restart Claude Code for changes to take effect
Set your Anthropic API key:
export ANTHROPIC_API_KEY="your-api-key"Once installed, just ask Claude to browse:
- "Go to Hacker News, get the top post comments, and summarize them "
- "QA test http://localhost:3000 and fix any bugs you encounter"
- "Order me a pizza, you're already signed in on Doordash"
Claude will handle the rest.
To run multiple browser instances concurrently (e.g., across different Claude Code sessions), specify different CDP ports:
# Instance 1 on default port 9222
browser navigate https://example.com
# Instance 2 on port 9223
browser --port 9223 navigate https://example.com
# Or use environment variable
export BROWSER_CDP_PORT=9224
browser navigate https://example.comPort resolution priority:
--portCLI flag (highest)BROWSER_CDP_PORTenvironment variable- Default: 9222
Install Chrome for your platform:
- macOS or Windows: https://www.google.com/chrome/
- Linux:
sudo apt install google-chrome-stable
To refresh cookies from your main Chrome profile:
# Clean all port-specific profiles
rm -rf .chrome-profile-*
# Or clean a specific port's profile
rm -rf .chrome-profile-9222