Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计提醒

chrome-for-openclawchrome FOR OpenClaw 搜索

Agent Skill

chrome-for-openclaw 用于处理浏览器自动化、网页检查和页面信息提取,适合在 OpenClaw 中需要让 Agent 打开页面、读取网页或验证前端流程时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,840

周安装

116

GitHub Stars

公开资料未说明

下载量

919
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:chrome-for-openclaw(chrome FOR OpenClaw 搜索)
来源仓库:https://github.com/joustonhuang/chrome-for-openclaw
安装命令:
openclaw skills install chrome-for-openclaw
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install chrome-for-openclaw

简介

chrome-for-openclaw 提供基于 CDP 的浏览器自动化能力,适合在 OpenClaw 中控制 Chrome 实例进行网页交互与内容提取。

  • 适用于需要通过远程调试协议实现页面导航、元素操作或动态内容抓取的任务场景。
  • 通过 clawhub 安装并连接到由 chrome_for_openclaw.sh 启动的 Chrome 实例完成自动化流程。
  • 使用前需确认本地 Chrome 已启用远程调试并支持 XRDP 会话连接,避免权限或端口冲突问题。
  • 该技能依赖本地浏览器实例运行,建议检查网络策略与防火墙设置以确保通信正常。

SKILL.md

name
chrome-for-openclaw
description
Browser automation CLI for AI agents using Google Chrome via CDP. Connects to a running Chrome instance started by chrome_for_openclaw.sh inside an XRDP session. Use when the user needs to interact with websites using their existing login sessions, navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, or automating browser tasks.
allowed-tools
Bash(agent-browser:*), Bash(npx agent-browser:*)
metadata
{"clawdbot":{"emoji":"🌐","requires":{"commands":["agent-browser"]},"homepage":"https://github.com/joustonhuang/chrome_for_openclaw"}}

Chrome Browser Skill (CDP Mode)

Read first: Complete setup guide, Chrome launcher script, and all reference docs at https://github.com/joustonhuang/chrome_for_openclaw

Browser automation via agent-browser connected to a real, running Google Chrome instance over CDP. All commands connect to Chrome at localhost:9222 — no separate Chromium download needed. Your existing Chrome login sessions (Gmail, GitHub, etc.) are immediately available.

Also install this skill in OpenClaw: openclaw-agent-browser-clawdbot — the original agent-browser skill that this one is based on and compatible with.

Prerequisites

Everything is handled by a single script: chrome_for_openclaw.sh.

Step 1 — One-time system setup (run once, requires sudo)

Installs Google Chrome if missing, then configures XRDP + XFCE. OpenClaw can run this step itself:

bash <(curl -fsSL https://raw.githubusercontent.com/joustonhuang/chrome_for_openclaw/main/chrome_for_openclaw.sh) --install

Other options:

# Reinstall everything from scratch
bash <(curl -fsSL https://raw.githubusercontent.com/joustonhuang/chrome_for_openclaw/main/chrome_for_openclaw.sh) --reinstall

# Undo all changes made by --install
bash <(curl -fsSL https://raw.githubusercontent.com/joustonhuang/chrome_for_openclaw/main/chrome_for_openclaw.sh) --uninstall

After --install completes, log out and reconnect via RDP to get a fresh XFCE session.

Step 2 — Start Chrome (run when Chrome is not already running)

Launch Chrome in CDP debug mode. Only needed if Chrome is not already open. OpenClaw can run this step itself:

bash <(curl -fsSL https://raw.githubusercontent.com/joustonhuang/chrome_for_openclaw/main/chrome_for_openclaw.sh)

Optional environment variable overrides:

DEBUG_PORT=9222 START_URL=https://gmail.com \
bash <(curl -fsSL https://raw.githubusercontent.com/joustonhuang/chrome_for_openclaw/main/chrome_for_openclaw.sh)

This kills any existing Chrome processes, starts Google Chrome with --remote-debugging-port=9222, and waits for the CDP endpoint to respond.

Step 3 — Install agent-browser

WARNING: Do NOT install agent-browser by cloning or building from the GitHub repo (https://github.com/vercel-labs/agent-browser). Doing so is known to break XRDP on Debian/Ubuntu. Install via npm only:
npm install -g agent-browser
# Do NOT run `agent-browser install` — we connect to Chrome via CDP, no Chromium needed.

CDP Connection

Every command uses --cdp 9222 to connect to the running Chrome:

agent-browser --cdp 9222 <command>

To avoid repeating it, export once for the session:

export AGENT_BROWSER_CDP_URL=http://127.0.0.1:9222
agent-browser <command>   # automatically connects to Chrome

Auto-discovery also works if you are unsure of the port:

agent-browser --auto-connect <command>

Core Workflow

Every browser automation follows this pattern:

  1. Navigate: agent-browser --cdp 9222 open <url>
  2. Snapshot: agent-browser --cdp 9222 snapshot -i (get element refs like @e1, @e2)
  3. Interact: Use refs to click, fill, select
  4. Re-snapshot: After navigation or DOM changes, get fresh refs
export AGENT_BROWSER_CDP_URL=http://127.0.0.1:9222

agent-browser open https://example.com/form
agent-browser snapshot -i
# Output: @e1 [input type="email"], @e2 [input type="password"], @e3 [button] "Submit"

agent-browser fill @e1 "user@example.com"
agent-browser fill @e2 "password123"
agent-browser click @e3
agent-browser wait 2000
agent-browser snapshot -i  # Check result

Command Chaining

Commands can be chained with &&. The browser persists between commands via a background daemon.

agent-browser --cdp 9222 open https://example.com && agent-browser --cdp 9222 snapshot -i
agent-browser --cdp 9222 fill @e1 "user@example.com" && agent-browser --cdp 9222 fill @e2 "password123" && agent-browser --cdp 9222 click @e3

When to chain: Use && when you don't need to read intermediate output before proceeding. Run commands separately when you need to parse snapshot output to discover refs first.

Handling Authentication

Because Chrome is already running with your login sessions, you are already authenticated on sites you have previously logged into. No login flow needed in most cases.

Option 1: Use the existing Chrome session (default — zero setup)

# Chrome already has your Gmail/GitHub/etc. cookies — just open and automate
agent-browser --cdp 9222 open https://mail.google.com/mail/u/0/#inbox
agent-browser --cdp 9222 snapshot -i

Option 2: Save session state for use outside CDP

# Export auth from the running Chrome
agent-browser --cdp 9222 state save ./auth.json
# Use it later in a standalone agent-browser session
agent-browser --state ./auth.json open https://app.example.com/dashboard

Option 3: Chrome profile reuse

agent-browser --cdp 9222 profiles  # List profiles in the running Chrome

Option 4: Auth vault (for recurring credentials)

echo "$PASSWORD" | agent-browser auth save myapp --url https://app.example.com/login --username user --password-stdin
agent-browser --cdp 9222 auth login myapp

See references/authentication.md for OAuth, 2FA, and cookie patterns.

Essential Commands

# Batch: ALWAYS use batch for 2+ sequential commands
agent-browser --cdp 9222 batch "open https://example.com" "snapshot -i"
agent-browser --cdp 9222 batch "open https://example.com" "screenshot"
agent-browser --cdp 9222 batch "click @e1" "wait 1000" "screenshot"

# Navigation
agent-browser --cdp 9222 open <url>              # Navigate (aliases: goto, navigate)
agent-browser --cdp 9222 close                   # Close browser
agent-browser --cdp 9222 close --all             # Close all active sessions

# Snapshot
agent-browser --cdp 9222 snapshot -i             # Interactive elements with refs (recommended)
agent-browser --cdp 9222 snapshot -i --urls      # Include href URLs for links
agent-browser --cdp 9222 snapshot -s "#selector" # Scope to CSS selector

# Interaction (use @refs from snapshot)
agent-browser --cdp 9222 click @e1               # Click element
agent-browser --cdp 9222 click @e1 --new-tab     # Click and open in new tab
agent-browser --cdp 9222 fill @e2 "text"         # Clear and type text
agent-browser --cdp 9222 type @e2 "text"         # Type without clearing
agent-browser --cdp 9222 select @e1 "option"     # Select dropdown option
agent-browser --cdp 9222 check @e1               # Check checkbox
agent-browser --cdp 9222 press Enter             # Press key
agent-browser --cdp 9222 keyboard type "text"    # Type at current focus (no selector)
agent-browser --cdp 9222 scroll down 500         # Scroll page

# Get information
agent-browser --cdp 9222 get text @e1            # Get element text
agent-browser --cdp 9222 get url                 # Get current URL
agent-browser --cdp 9222 get title               # Get page title
agent-browser --cdp 9222 get cdp-url             # Get CDP WebSocket URL

# Wait
agent-browser --cdp 9222 wait @e1                # Wait for element
agent-browser --cdp 9222 wait 2000               # Wait milliseconds
agent-browser --cdp 9222 wait --url "**/page"    # Wait for URL pattern
agent-browser --cdp 9222 wait --text "Welcome"   # Wait for text to appear
agent-browser --cdp 9222 wait --fn "!document.body.innerText.includes('Loading...')"

# Downloads
agent-browser --cdp 9222 download @e1 ./file.pdf
agent-browser --cdp 9222 wait --download ./output.zip

# Tab management
agent-browser --cdp 9222 tab list
agent-browser --cdp 9222 tab new https://example.com
agent-browser --cdp 9222 tab 2
agent-browser --cdp 9222 tab close

# Network
agent-browser --cdp 9222 network requests
agent-browser --cdp 9222 network requests --type xhr,fetch
agent-browser --cdp 9222 network route "**/ads/*" --abort

# Capture
agent-browser --cdp 9222 screenshot
agent-browser --cdp 9222 screenshot --full
agent-browser --cdp 9222 screenshot --annotate
agent-browser --cdp 9222 pdf output.pdf

Batch Execution

ALWAYS use batch when running 2+ commands in sequence:

# Navigate and snapshot
agent-browser --cdp 9222 batch "open https://example.com" "snapshot -i"

# Navigate, snapshot, and screenshot
agent-browser --cdp 9222 batch "open https://example.com" "snapshot -i" "screenshot"

# Click, wait, screenshot
agent-browser --cdp 9222 batch "click @e1" "wait 1000" "screenshot"

# With --bail to stop on first error
agent-browser --cdp 9222 batch --bail "open https://example.com" "click @e1" "screenshot"

Only use a single command (not batch) when you need to read the output before deciding the next step — e.g., after snapshot -i to discover refs. After reading, batch the remaining steps.

Efficiency Strategies

Use --urls to avoid re-navigation. Get all href URLs from one snapshot, then open each directly instead of clicking refs and navigating back.

Snapshot once, act many times. Extract all refs from a single snapshot, then batch actions.

Multi-page workflow:

# 1. Get all URLs in one call
agent-browser --cdp 9222 batch "open https://news.ycombinator.com" "snapshot -i --urls"
# Read output to extract URLs, then visit each directly:
agent-browser --cdp 9222 batch "open https://github.com/example/repo" "screenshot"
agent-browser --cdp 9222 batch "open https://example.com/article" "screenshot"

Common Patterns

Form Submission

agent-browser --cdp 9222 batch "open https://example.com/signup" "snapshot -i"
# Read snapshot to identify form refs, then fill and submit
agent-browser --cdp 9222 batch "fill @e1 \"Jane Doe\"" "fill @e2 \"jane@example.com\"" "click @e3" "wait 2000"

Gmail Workflow (already logged in via Chrome)

export AGENT_BROWSER_CDP_URL=http://127.0.0.1:9222

agent-browser batch "open https://mail.google.com/mail/u/0/#inbox" "wait 2000" "snapshot -i"
# Agent identifies Compose button ref @e4
agent-browser batch "click @e4" "wait 1000" "snapshot -i"
# Agent fills To/Subject/Body
agent-browser batch \
  "fill @e5 \"recipient@example.com\"" \
  "fill @e6 \"Subject\"" \
  "fill @e7 \"Body text\"" \
  "click @e8"

Save Auth State from Running Chrome

# Export your current Chrome login cookies for later reuse
agent-browser --cdp 9222 state save ./auth.json
# Reuse without CDP (standalone session)
agent-browser state load ./auth.json
agent-browser open https://app.example.com/dashboard

Working with Iframes

Iframe content is automatically inlined in snapshots. Refs inside iframes work directly.

agent-browser --cdp 9222 batch "open https://example.com/checkout" "snapshot -i"
# @e2 [Iframe] "payment-frame"
#   @e3 [input] "Card number"
#   @e4 [button] "Pay"
agent-browser --cdp 9222 batch "fill @e3 \"4111111111111111\"" "click @e4"

Parallel Sessions

agent-browser --cdp 9222 --session site1 open https://site-a.com
agent-browser --cdp 9222 --session site2 open https://site-b.com

agent-browser --cdp 9222 --session site1 snapshot -i
agent-browser --cdp 9222 --session site2 snapshot -i

agent-browser --cdp 9222 session list

Annotated Screenshots (Vision Mode)

agent-browser --cdp 9222 screenshot --annotate
# Output: image path + legend:
#   [1] @e1 button "Submit"
#   [2] @e2 link "Home"
agent-browser --cdp 9222 click @e2

Semantic Locators (Alternative to Refs)

agent-browser --cdp 9222 find text "Sign In" click
agent-browser --cdp 9222 find label "Email" fill "user@test.com"
agent-browser --cdp 9222 find role button click --name "Submit"
agent-browser --cdp 9222 find placeholder "Search" type "query"
agent-browser --cdp 9222 find testid "submit-btn" click

JavaScript Evaluation

agent-browser --cdp 9222 eval 'document.title'

# Complex JS — use --stdin to avoid shell escaping issues
agent-browser --cdp 9222 eval --stdin <<'EVALEOF'
JSON.stringify(Array.from(document.querySelectorAll("a")).map(a => a.href))
EVALEOF

Streaming

agent-browser --cdp 9222 stream enable           # Start WebSocket stream
agent-browser --cdp 9222 stream enable --port 9223
agent-browser --cdp 9222 stream status
agent-browser --cdp 9222 stream disable

Timeouts and Slow Pages

Default timeout: 25 seconds. Override with AGENT_BROWSER_DEFAULT_TIMEOUT (milliseconds).

open already waits for the page load event. Only add explicit waits for async content.

agent-browser --cdp 9222 wait "#content"        # Wait for element (preferred)
agent-browser --cdp 9222 wait 2000              # Fixed duration for slow SPAs
agent-browser --cdp 9222 wait --url "**/dashboard"
agent-browser --cdp 9222 wait --text "Results loaded"

Avoid wait --load networkidle — ad-heavy or websocket sites will hang. Use wait 2000 or wait <selector> instead.

Session Cleanup

agent-browser --cdp 9222 close --all            # Close all sessions
AGENT_BROWSER_IDLE_TIMEOUT_MS=60000 agent-browser --cdp 9222 open example.com

Security

# Wrap page content to protect against prompt injection
export AGENT_BROWSER_CONTENT_BOUNDARIES=1
agent-browser --cdp 9222 snapshot

# Restrict navigation to trusted domains
export AGENT_BROWSER_ALLOWED_DOMAINS="example.com,*.example.com"

# Gate destructive actions via policy file
export AGENT_BROWSER_ACTION_POLICY=./policy.json

Observability Dashboard

agent-browser --cdp 9222 dashboard start   # Start live dashboard on port 4848
agent-browser --cdp 9222 dashboard stop

Ref Lifecycle (Important)

Refs (@e1, @e2, …) are invalidated when the page changes. Always re-snapshot after:

  • Clicking links or buttons that navigate
  • Form submissions
  • Dynamic content loading (dropdowns, modals)
agent-browser --cdp 9222 click @e5       # Navigates
agent-browser --cdp 9222 snapshot -i     # MUST re-snapshot
agent-browser --cdp 9222 click @e1       # Use new refs

Installation Summary

# Step 1: One-time system setup (Chrome + XRDP + XFCE, requires sudo)
bash <(curl -fsSL https://raw.githubusercontent.com/joustonhuang/chrome_for_openclaw/main/chrome_for_openclaw.sh) --install
# → Log out and reconnect via RDP after this completes

# Step 2: Launch Chrome in CDP debug mode (only if not already running)
bash <(curl -fsSL https://raw.githubusercontent.com/joustonhuang/chrome_for_openclaw/main/chrome_for_openclaw.sh)

# Step 3: Install agent-browser via npm ONLY
# WARNING: Do NOT clone/build from https://github.com/vercel-labs/agent-browser
#          — it breaks XRDP on Debian/Ubuntu. Use npm only:
npm install -g agent-browser

# Step 4: Connect and automate
export AGENT_BROWSER_CDP_URL=http://127.0.0.1:9222
agent-browser batch "open https://example.com" "snapshot -i"

Deep-Dive Reference Docs

ReferenceWhen to Use
references/commands.mdFull command reference with all options
references/snapshot-refs.mdRef lifecycle, invalidation, troubleshooting
references/session-management.mdParallel sessions, state persistence
references/authentication.mdLogin flows, OAuth, 2FA, state reuse
references/video-recording.mdRecording workflows for debugging
references/profiling.mdChrome DevTools performance profiling
references/proxy-support.mdProxy configuration, geo-testing

Credits

Chrome launcher script: joustonhuang/chrome_for_openclaw

agent-browser CLI: vercel-labs/agent-browser (Apache 2.0)

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

93.63%
按下载量换算860

安全审计

VirusTotal

可疑

ClawScan

可疑

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills