💡 摘要
一款用于Claude Code的浏览器自动化插件,可在开发过程中实现对浏览器的持久化、有状态控制,用于测试和验证。
🎯 适合人群
🤖 AI 吐槽: “这是一个如此热心的浏览器自动化工具,它可能不问一声就开始浏览你的个人标签页。”
该技能授予AI智能体对本地浏览器的控制权,可实现导航、表单输入和点击等操作。如果智能体的指令格式错误或恶意,可能导致与敏感Web应用程序(如银行、电子邮件)发生意外交互。缓解措施:在专用的、隔离的浏览器配置文件中运行该技能,不保存凭据并设置严格的网络限制。
A browser automation plugin for Claude Code that lets Claude control your browser to test and verify your work as you develop.
Key features:
- Persistent pages - Navigate once, interact across multiple scripts
- Flexible execution - Full scripts when possible, step-by-step when exploring
- LLM-friendly DOM snapshots - Structured page inspection optimized for AI
Prerequisites
- Claude Code CLI installed
- Node.js (v18 or later) with npm
Installation
Claude Code
/plugin marketplace add sawyerhood/dev-browser
/plugin install dev-browser@sawyerhood/dev-browser
Restart Claude Code after installation.
Amp / Codex
Copy the skill to your skills directory:
# For Amp: ~/.claude/skills | For Codex: ~/.codex/skills SKILLS_DIR=~/.claude/skills # or ~/.codex/skills mkdir -p $SKILLS_DIR git clone https://github.com/sawyerhood/dev-browser /tmp/dev-browser-skill cp -r /tmp/dev-browser-skill/skills/dev-browser $SKILLS_DIR/dev-browser rm -rf /tmp/dev-browser-skill
Amp only: Start the server manually before use:
cd ~/.claude/skills/dev-browser && npm install && npm run start-server
Chrome Extension (Optional)
The Chrome extension allows Dev Browser to control your existing Chrome browser instead of launching a separate Chromium instance. This gives you access to your logged-in sessions, bookmarks, and extensions.
Installation:
- Download
extension.zipfrom the latest release - Unzip the file to a permanent location (e.g.,
~/.dev-browser-extension) - Open Chrome and go to
chrome://extensions - Enable "Developer mode" (toggle in top right)
- Click "Load unpacked" and select the unzipped extension folder
Using the extension:
- Click the Dev Browser extension icon in Chrome's toolbar
- Toggle it to "Active" - this enables browser control
- Ask Claude to connect to your browser (e.g., "connect to my Chrome" or "use the extension")
When active, Claude can control your existing Chrome tabs with all your logged-in sessions, cookies, and extensions intact.
Permissions
To skip permission prompts, add to ~/.claude/settings.json:
{ "permissions": { "allow": ["Skill(dev-browser:dev-browser)", "Bash(npx tsx:*)"] } }
Or run with claude --dangerously-skip-permissions (skips all prompts).
Usage
Just ask Claude to interact with your browser:
"Open localhost:3000 and verify the signup flow works"
"Go to the settings page and figure out why the save button isn't working"
Benchmarks
| Method | Time | Cost | Turns | Success | | ----------------------- | ------- | ----- | ----- | ------- | | Dev Browser | 3m 53s | $0.88 | 29 | 100% | | Playwright MCP | 4m 31s | $1.45 | 51 | 100% | | Playwright Skill | 8m 07s | $1.45 | 38 | 67% | | Claude Chrome Extension | 12m 54s | $2.81 | 80 | 100% |
See dev-browser-eval for methodology.
How It's Different
| Approach | How It Works | Tradeoff | | ---------------------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------------ | | Playwright MCP | Observe-think-act loop with individual tool calls | Simple but slow; each action is a separate round-trip | | Playwright Skill | Full scripts that run end-to-end | Fast but fragile; scripts start fresh every time | | Dev Browser | Stateful server + agentic script execution | Best of both: persistent state with flexible execution |
License
MIT
Author
优点
- 跨交互的持久化浏览器状态提高了效率。
- 灵活的执行模式适应脚本化或探索性任务。
- 可选的Chrome扩展允许使用现有会话和扩展程序。
缺点
- Amp版本需要手动启动服务器,增加了设置复杂性。
- 授予AI对本地浏览器的控制权会引入安全风险。
- 完整功能集依赖于外部Chrome扩展。
相关技能
免责声明:本内容来源于 GitHub 开源项目,仅供展示和评分分析使用。
版权归原作者所有 SawyerHood.
