Adapted from PR #43 by @Kylejeong2 (Browserbase). PR's marketplace.json had a syntax error (missing '},' before adjacent entry); entry reconstructed from the diff. Original: https://github.com/anthropics/claude-plugins-official/pull/43
Stagehand Browser Automation Plugin
Browser automation skill for Claude Code using Stagehand. This plugin enables Claude to automate web browser interactions, extract data, and navigate websites using natural language.
Installation
Install the plugin from the Claude Code marketplace:
/plugin install stagehand@claude-plugin-directory
Prerequisites
This plugin requires the browser automation CLI tools to be installed separately. The CLI tools are available from the GitHub marketplace.
Step 1: Add the GitHub Marketplace
/plugin marketplace add browserbase/agent-browse
Step 2: Install the Browser Automation CLI Plugin
/plugin install browser-automation@browser-tools
Step 3: Set Up the CLI Tools
After installing the browser-automation plugin, you need to set up the CLI tools:
- Navigate to the plugin directory (typically
~/.claude/plugins/browser-automation/) - Install dependencies and build:
npm install - Link the browser command globally:
npm link - Configure your Anthropic API key:
Or use Claude Code's subscription token (recommended if you have Claude Pro/Max):
export ANTHROPIC_API_KEY="your-api-key-here"claude setup-token
Step 4: Verify Installation
Test that the browser command is available:
browser navigate https://example.com
Usage
Once installed and configured, you can use natural language to automate browser tasks:
- "Go to Hacker News, get the top post comments, and summarize them"
- "QA test http://localhost:3000 and fix any bugs you encounter"
- "Extract product information from example.com/products"
Claude will automatically use the browser automation skill when you ask for web-related tasks.
Features
- Natural Language Control: Describe browser actions in plain English
- Data Extraction: Extract structured data from web pages
- Screenshot Capture: Take screenshots for visual verification
- Persistent Sessions: Browser state persists between commands
- Chrome Profile Integration: Uses your Chrome profile for cookies and sessions
Troubleshooting
Chrome not found
Install Chrome for your platform:
- macOS or Windows: https://www.google.com/chrome/
- Linux:
sudo apt install google-chrome-stable
Browser command not found
Make sure you've run npm link in the browser-automation plugin directory after installing it.
API Key Issues
- If you have Claude Pro/Max, use
claude setup-token(recommended) - Otherwise, export
ANTHROPIC_API_KEYin your terminal - Or create a
.envfile in the plugin directory with your API key
Resources
Support
For issues or questions, please visit the GitHub repository.