← 返回 Skills 市场
redf426

Chromium

作者 redf426 · GitHub ↗ · v1.1.0 · MIT-0
cross-platform ⚠ suspicious
137
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install chromium
功能描述
Launch a persistent headless Chromium with remote debugging (CDP) for browser automation — page navigation, clicks, form filling, screenshots, and cookie imp...
使用说明 (SKILL.md)

Chromium (persistent headless profile)

What it does

  • Launches headless Chromium with a persistent profile (logins, cookies, localStorage survive restarts).
  • Exposes Chrome DevTools Protocol (CDP) on 127.0.0.1 for browser tool integration.
  • Supports cookie import for pre-authenticated sessions.

Quick start

1. Launch Chromium

~/.openclaw/workspace/skills/chromium/scripts/start_chromium.sh

Environment variables (all optional):

Variable Default Description
CHROMIUM_PROFILE_DIR $HOME/.openclaw/workspace/chromium-profile User data directory
CHROMIUM_DEBUG_PORT 18801 CDP remote debugging port
CHROMIUM_LOG_FILE $HOME/.openclaw/workspace/logs/chromium.log Log file path
CHROMIUM_BIN auto-detect (chromium, chromium-browser, google-chrome) Browser binary

2. Verify CDP is ready

curl -s http://127.0.0.1:18801/json/version

If you get JSON with Browser and webSocketDebuggerUrl — it's ready.

3. Use browser tools

browser navigate url=https://example.com
browser wait --load networkidle
browser snapshot

Browser tool cheatsheet

Action Command
Open page browser navigate url=\x3CURL>
Wait for load browser wait --load networkidle
Read page content browser snapshot
Click element browser click ref=\x3Cref>
Type text browser type ref=\x3Cref> text=\x3Ctext>
Scroll to element browser scrollintoview \x3Cref>
Take screenshot browser screenshot
Run JavaScript browser evaluate --fn "document.title"

Snapshot format — important

Always use the default snapshot format (no extra parameters):

browser snapshot

Do NOT use:

  • refs=aria — returns accessibility tree without actionable refs
  • depth=2 or other depth limits — truncates DOM and hides content

The default AI format returns full page text with refs (e12, e293, etc.) suitable for click/type.

Working with dynamic pages (SPAs)

Single-page apps (React, Next.js, etc.) continuously update the DOM. Refs become stale between snapshots.

After every navigation:

browser wait --load networkidle
browser snapshot

Before clicking:

browser scrollintoview \x3Cref>
browser click \x3Cref>

If click fails ("Element not found or not visible"):

  1. Take a fresh browser snapshot — never reuse old refs
  2. Use browser screenshot to see the visual state
  3. For links, navigate directly by URL instead of clicking
  4. As a last resort, use JavaScript: browser evaluate --fn "document.querySelector('...').click()"

Cookie import (pre-authenticated sessions)

To use a site that requires login, export cookies from a browser where you're already logged in and import them:

Step 1 — Export cookies (in your regular browser):

  • Install Cookie-Editor extension
  • Go to the target site (make sure you're logged in)
  • Export cookies as JSON, save as cookies.json
  • Copy to server: scp cookies.json server:/tmp/

Step 2 — Import:

python3 ~/.openclaw/workspace/skills/chromium/scripts/import_cookies.py \
  /tmp/cookies.json \
  --domain example.com

Step 3 — Verify by navigating to the site and checking if you're logged in.

Data locations

What Path
Browser profile $CHROMIUM_PROFILE_DIR (default: ~/.openclaw/workspace/chromium-profile)
Launch log $CHROMIUM_LOG_FILE (default: ~/.openclaw/workspace/logs/chromium.log)

Troubleshooting

If CDP doesn't respond within 3 seconds after launch, check the log:

cat ~/.openclaw/workspace/logs/chromium.log

Common issues:

  • "Address already in use" — another Chromium is running. The script kills previous instances automatically, but you can run pkill -f "chromium.*remote-debugging" manually.
  • SingletonLock — stale lock file. The script removes it if Chromium isn't running.
  • No chromium binary — set CHROMIUM_BIN to the correct path (e.g., /usr/bin/google-chrome).

Requirements

  • Chromium, Chromium Browser, or Google Chrome installed on the host
  • Python 3 (for cookie import script)
  • OpenClaw with browser tool support
安全使用建议
This skill appears to implement the advertised functionality, but be aware it will read your OpenClaw gateway token from ~/.openclaw/openclaw.json and use it to POST cookies to a local browser-control endpoint. That credential access is not declared in the registry metadata. Before installing or running it: (1) review the two bundled scripts (start_chromium.sh and import_cookies.py) yourself, (2) run the cookie importer with --dry-run first, (3) consider running Chromium in an isolated VM or container (the script launches with --no-sandbox), and (4) ask the skill author to document required config paths/env vars (OPENCLAW_GATEWAY_PORT, gateway token, Python3, Chromium binary) so you can make an informed trust decision.
功能分析
Type: OpenClaw Skill Name: chromium Version: 1.1.0 The skill bundle provides headless Chromium automation but includes several high-risk configurations. The 'start_chromium.sh' script disables the browser's security sandbox ('--no-sandbox' and '--disable-setuid-sandbox') and exposes a remote debugging port (18801). Additionally, 'import_cookies.py' programmatically retrieves the OpenClaw gateway's authentication token from the local filesystem to facilitate cookie injection. While these behaviors are aligned with the stated purpose of browser automation, the reduction in security boundaries and automated handling of sensitive tokens warrant a suspicious classification.
能力评估
Purpose & Capability
The skill's name, README, SKILL.md and scripts align with the stated purpose: launching a persistent headless Chromium and importing cookies for pre-authenticated sessions. However, the cookie import implementation requires access to the OpenClaw gateway token (read from ~/.openclaw/openclaw.json) and to a local browser-control port — a capability not declared in the registry metadata (no required config paths or primary credential listed). This is proportionate to cookie import but is not documented in metadata.
Instruction Scope
SKILL.md tells operators to run the included start_chromium.sh and import_cookies.py. The import script reads ~/.openclaw/openclaw.json to obtain the gateway auth token and then POSTs cookies to a local browser-control endpoint (127.0.0.1:<port>). The start script also kills previous browser processes by pattern, removes a SingletonLock file, and launches Chromium with flags including --no-sandbox. These actions go beyond a simple 'launch browser' instruction surface because they read a local config file containing an auth token and manipulate processes/files — important runtime behaviors that are not reflected in the top-level requirements.
Install Mechanism
This is an instruction-only skill with bundled scripts (no install spec). That keeps disk write risk low and makes the install mechanism low-risk. The included scripts will be executed locally when you follow the README/SKILL.md instructions.
Credentials
Registry metadata declares no required env vars or credentials, but the code reads OPENCLAW_GATEWAY_PORT (env) and, crucially, ~/.openclaw/openclaw.json to extract a gateway auth token. Accessing another component's auth token is sensitive. While reading the gateway token is functionally necessary for the cookie-import flow, it's a credential access that should be declared (primaryEnv/config path) and highlighted to users.
Persistence & Privilege
The skill is not marked always:true and does not modify other skills' configuration. It creates/uses a persistent browser profile directory and suggests optional autorun via a user cron entry, which is normal for this sort of tool. The start script removes a stale lock file and kills previous instances of Chromium launched with that profile — operations scoped to the profile.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install chromium
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /chromium 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.0
Add README.md with installation guide, setup steps, configuration, troubleshooting
v1.0.0
Initial public release: headless Chromium with persistent profile, CDP remote debugging, cookie import, browser tool cheatsheet
元数据
Slug chromium
版本 1.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Chromium 是什么?

Launch a persistent headless Chromium with remote debugging (CDP) for browser automation — page navigation, clicks, form filling, screenshots, and cookie imp... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 137 次。

如何安装 Chromium?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install chromium」即可一键安装,无需额外配置。

Chromium 是免费的吗?

是的,Chromium 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Chromium 支持哪些平台?

Chromium 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Chromium?

由 redf426(@redf426)开发并维护,当前版本 v1.1.0。

💬 留言讨论