Skip to content

Claude Agent SDK with a web browsing tool

Notifications You must be signed in to change notification settings

degree-analytics/agent-browse

 
 

Repository files navigation

Browser Automation Skill

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.

Installation

On Claude Code, to add the marketplace, simply run:

/plugin marketplace add browserbase/agent-browse

Then install the plugin:

/plugin install browser-automation@browser-tools

If you prefer the manual interface:

  1. On Claude Code, type /plugin
  2. Select option 3. Add marketplace
  3. Enter the marketplace source: browserbase/agent-browse
  4. Press enter to select the browser-automation plugin
  5. Hit enter again to Install now
  6. Restart Claude Code for changes to take effect

Setup

Set your Anthropic API key:

export ANTHROPIC_API_KEY="your-api-key"

Usage

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.

Running Multiple Browser Instances

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.com

Port resolution priority:

  1. --port CLI flag (highest)
  2. BROWSER_CDP_PORT environment variable
  3. Default: 9222

Troubleshooting

Chrome not found

Install Chrome for your platform:

Profile refresh

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

Resources

About

Claude Agent SDK with a web browsing tool

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 59.9%
  • JavaScript 40.1%