简介
基于 Claude Code 的 Chrome 浏览器扩展,支持网页浏览、元素交互和自动化任务执行,是 OpenClaw 内置浏览器工具的替代方案
原始描述
Use Claude Code with Chrome browser extension for web browsing and automation tasks. Alternative to OpenClaw's built-in browser tools.
通过你的 Agent 添加
安装目录:claude-chrome/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
Claude Chrome 是一个文档型 skill,提供通过 Claude Code CLI 调用 Chrome 浏览器扩展能力的指南。用户需在节点上安装 Claude Code 及其 Chrome 扩展,然后通过 nodes.run 执行带 --chrome 和 --dangerously-skip-permissions 标志的命令,实现非交互式浏览器自动化。
典型工作流程:
- 检查 Chrome 扩展原生宿主进程是否运行(
pgrep -f "claude --chrome-native-host") - 使用
claude --dangerously-skip-permissions --chrome -p "任务指令"执行浏览任务 - 根据任务复杂度设置超时(简单任务30秒,复杂任务可达3分钟)
显著优点
- 深度浏览器能力:支持点击、表单填写、页面导航、内容读取等完整交互
- 与 Claude 智能体结合:可在同一会话中结合编程与浏览任务
- 后台持续执行:即使网关10秒超时断开,任务仍在节点后台运行并通过系统消息返回结果
- 无外部依赖:纯 Markdown 文档型 skill,零供应链攻击风险
- 性能可预期:提供详细的 Benchmark 参考(简单任务13秒,复杂任务90秒+)
潜在局限性与风险
- 权限风险:必须使用
--dangerously-skip-permissions 参数实现自动化,这会绕过 Claude Code 的所有安全确认机制,存在潜在的权限升级风险
- 域名授权限制:Claude Code 的 Chrome 扩展对新域名可能需要人工授权,无法完全自动化
- 环境依赖严格:仅适用于有桌面环境、运行中的 Chrome 浏览器及已激活扩展的节点
- 来源可信度:T3 级别(社区项目/个人开发者),缺乏企业级背书
- 网关层限制:OpenClaw 网关硬编码 10 秒连接超时,虽不影响后台执行,但用户体验不够直观
适合人群
- 需要自动化浏览器任务的开发者与运维人员
- 已部署 Claude Code 环境且熟悉终端命令的高级用户
- 在受信任本地/私有节点上执行任务的场景
- 需要结合 AI 推理与网页交互的自动化工作流(如数据抓取、表单自动填写、跨页面信息汇总)
常规风险管控建议
- 严格限制使用环境:仅在受信任的本地或私有节点使用
--dangerously-skip-permissions,避免在共享或多租户环境中部署
- 预先规划域名白名单:如需频繁访问特定域名,建议预先在 Chrome 扩展中授权,减少对危险参数的依赖
- 设置合理超时:根据任务复杂度配置
commandTimeoutMs,避免无限等待
- 替代方案优先:对于简单的数据抓取,优先使用
web_fetch 等无浏览器依赖的方案
- 监控扩展进程:定期检查
claude --chrome-native-host 进程状态,确保扩展桥接正常运行
- 权限风险:必须使用
--dangerously-skip-permissions参数实现自动化,这会绕过 Claude Code 的所有安全确认机制,存在潜在的权限升级风险 - 域名授权限制:Claude Code 的 Chrome 扩展对新域名可能需要人工授权,无法完全自动化
- 环境依赖严格:仅适用于有桌面环境、运行中的 Chrome 浏览器及已激活扩展的节点
- 来源可信度:T3 级别(社区项目/个人开发者),缺乏企业级背书
- 网关层限制:OpenClaw 网关硬编码 10 秒连接超时,虽不影响后台执行,但用户体验不够直观
适合人群
- 需要自动化浏览器任务的开发者与运维人员
- 已部署 Claude Code 环境且熟悉终端命令的高级用户
- 在受信任本地/私有节点上执行任务的场景
- 需要结合 AI 推理与网页交互的自动化工作流(如数据抓取、表单自动填写、跨页面信息汇总)
常规风险管控建议
- 严格限制使用环境:仅在受信任的本地或私有节点使用
--dangerously-skip-permissions,避免在共享或多租户环境中部署
- 预先规划域名白名单:如需频繁访问特定域名,建议预先在 Chrome 扩展中授权,减少对危险参数的依赖
- 设置合理超时:根据任务复杂度配置
commandTimeoutMs,避免无限等待
- 替代方案优先:对于简单的数据抓取,优先使用
web_fetch 等无浏览器依赖的方案
- 监控扩展进程:定期检查
claude --chrome-native-host 进程状态,确保扩展桥接正常运行
- 严格限制使用环境:仅在受信任的本地或私有节点使用
--dangerously-skip-permissions,避免在共享或多租户环境中部署 - 预先规划域名白名单:如需频繁访问特定域名,建议预先在 Chrome 扩展中授权,减少对危险参数的依赖
- 设置合理超时:根据任务复杂度配置
commandTimeoutMs,避免无限等待 - 替代方案优先:对于简单的数据抓取,优先使用
web_fetch等无浏览器依赖的方案 - 监控扩展进程:定期检查
claude --chrome-native-host进程状态,确保扩展桥接正常运行
技能正文
name: claude-chrome
description: Use Claude Code with Chrome browser extension for web browsing and automation tasks. Alternative to OpenClaw's built-in browser tools.
metadata: {"clawdbot":{"emoji":"🌐","requires":{"anyBins":["claude"]}}}
Claude Chrome — Browser Automation via Claude Code
Use Claude Code's Chrome integration to browse the web, interact with pages, and automate browser tasks. This is an alternative to OpenClaw's built-in browser tools (Chrome Relay, OpenClaw profile).
Prerequisites
- Claude Code installed on the node (e.g.
/opt/homebrew/bin/claude)
- Claude Code Chrome extension installed and enabled in Chrome
- Chrome running on the node
How It Works
/opt/homebrew/bin/claude)Claude Code can connect to Chrome via its built-in browser extension (MCP server). When enabled, Claude Code gains browser tools — it can navigate pages, click elements, fill forms, read content, and more.
Step 1: Check if Chrome Extension is Active
Look for the native host process to confirm the Chrome extension is running:
nodes.run node=<your-node-id> command='["bash", "-lc", "pgrep -f \"claude --chrome-native-host\""]'
If this returns a PID, the Chrome extension bridge is active and ready.
Step 2: Run Claude Code with Chrome
Use nodes.run with your node to execute browser tasks:
nodes.run node=<your-node-id> commandTimeoutMs=120000 command='["bash", "-lc", "claude --dangerously-skip-permissions --chrome -p \"Go to example.com and read the headline\""]'
Flags:
--dangerously-skip-permissions— auto-approve all actions (required for automation)--chrome— enable Chrome browser integration-p/--print— non-interactive print mode (required for automated use)bash -lc— login shell to ensure PATH is loaded
Timeout: See benchmarks below for guidance. Recommended defaults:
- Simple tasks (single page read):
commandTimeoutMs=30000(30 seconds) - Medium complexity (multi-step navigation):
commandTimeoutMs=120000(2 minutes) - Complex workflows (multiple pages + summarization):
commandTimeoutMs=180000(3 minutes)
Performance Benchmarks
Task Type
Example
Duration
Recommended Timeout
Simple
Read button text on Google
13s
30s (30000ms)
Medium
Wikipedia search + navigate + summarize
76s
2min (120000ms)
Complex
Multi-page navigation + external links
~90s+
3min (180000ms)
| Task Type | Example | Duration | Recommended Timeout |
|---|---|---|---|
| Simple | Read button text on Google | 13s | 30s (30000ms) |
| Medium | Wikipedia search + navigate + summarize | 76s | 2min (120000ms) |
| Complex | Multi-page navigation + external links | ~90s+ | 3min (180000ms) |
Gateway timeout note: OpenClaw's gateway has a hardcoded 10-second connection timeout. Commands will error immediately but continue running in the background. Results arrive via system messages when complete.
Limitations
- Domain permissions: Claude Code's Chrome extension may require user approval for new domains (cannot be automated)
- Gateway timeout: Initial connection times out at 10s, but commands continue running
- Desktop required: Only works on nodes with a desktop environment, Chrome, and the extension active
Tips
- Always use
--dangerously-skip-permissions for automated runs
- Always use
-p / --print for non-interactive output
- Always use
bash -lc for login shell (PATH loading)
- Be aggressive with timeouts - commands complete in background even after gateway timeout
- Claude Code can combine coding and browsing in a single session
- Check the native host process before attempting browser tasks
- For simple data scraping, consider
web_fetch instead (faster, no domain permissions needed)
- Always use
--dangerously-skip-permissionsfor automated runs - Always use
-p/--printfor non-interactive output - Always use
bash -lcfor login shell (PATH loading) - Be aggressive with timeouts - commands complete in background even after gateway timeout
- Claude Code can combine coding and browsing in a single session
- Check the native host process before attempting browser tasks
- For simple data scraping, consider
web_fetchinstead (faster, no domain permissions needed)
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。