← 返回 Skills 市场
473
总下载
1
收藏
6
当前安装
1
版本数
在 OpenClaw 中安装
/install chrome-automation
功能描述
Linux服务器Chrome浏览器自动化方案。支持2K高清截图、表单填写、自动登录、绕过反爬虫检测。适用于B站、YouTube等网站自动化操作。
使用说明 (SKILL.md)
Chrome 浏览器自动化
服务器环境下的Chrome浏览器自动化方案,支持2K高清截图和复杂交互操作。
🚀 快速开始
方案1:Chrome 无头模式(简单截图)
# 2K高清截图(推荐默认)
google-chrome --headless=new --no-sandbox --disable-gpu \
--window-size=1920,1080 --force-device-scale-factor=2 \
--screenshot=/home/Kano/.openclaw/workspace/screenshot.png \
https://www.bilibili.com
参数说明:
| 参数 | 作用 |
|---|---|
--headless=new |
新版无头模式 |
--window-size=1920,1080 |
窗口分辨率 |
--force-device-scale-factor=2 |
2倍缩放(2K清晰度) |
--no-sandbox |
跳过沙箱(服务器必需) |
--disable-gpu |
禁用GPU(服务器必需) |
方案2:Playwright + Stealth(高级自动化)
适用于: 填表、登录、发帖、绕过反爬虫检测
# Stealth模式截图
python3 ~/.openclaw/workspace/skills/chrome-automation/scripts/playwright_stealth.py \x3CURL>
# 指定输出路径
python3 ~/.openclaw/workspace/skills/chrome-automation/scripts/playwright_stealth.py \x3CURL> -o \x3C输出路径>
Python调用:
import sys
sys.path.insert(0, '/home/Kano/.playwright-env/lib/python3.11/site-packages')
sys.path.insert(0, '/home/Kano/.openclaw/workspace/skills/chrome-automation/scripts')
from playwright_stealth import screenshot_with_stealth, auto_fill_form
# 截图(自动绕过反爬虫)
screenshot_with_stealth('https://bilibili.com')
# 自动填表登录
auto_fill_form('https://login.example.com', {
'#username': '用户名',
'#password': '密码'
}, submit_selector='button[type=submit]')
📊 方案对比
| 特性 | Chrome无头 | Playwright |
|---|---|---|
| 启动速度 | ⚡ 最快 | 🚀 快 |
| 截图质量 | ✅ 2K高清 | ✅ 2K高清 |
| 绕过反爬虫 | ⚠️ 容易被检测 | ✅ Stealth模式 |
| 填表/登录 | ❌ 不支持 | ✅ 完美支持 |
| 资源占用 | 低 | 中 |
| 推荐场景 | 简单截图 | 复杂自动化 |
🔧 常用命令
# ========== 基础截图 ==========
# 默认分辨率
google-chrome --headless=new --no-sandbox --disable-gpu \
--screenshot=output.png https://example.com
# 2K高清(推荐)
google-chrome --headless=new --no-sandbox --disable-gpu \
--window-size=1920,1080 --force-device-scale-factor=2 \
--screenshot=output.png https://example.com
# 全页面截图
google-chrome --headless=new --no-sandbox --disable-gpu \
--window-size=1920,1080 --hide-scrollbars \
--screenshot=output.png https://example.com
# ========== Playwright ==========
# Stealth截图
python3 ~/.openclaw/workspace/skills/chrome-automation/scripts/playwright_stealth.py \x3CURL>
# 自定义输出
python3 ~/.openclaw/workspace/skills/chrome-automation/scripts/playwright_stealth.py \x3CURL> -o \x3C路径>
🛠️ 环境信息
| 组件 | 版本/路径 |
|---|---|
| Google Chrome | /usr/bin/google-chrome (v145+) |
| Playwright | ~/.playwright-env/ (v1.58.0) |
| Python虚拟环境 | ~/.playwright-env/ |
| Stealth脚本 | scripts/playwright_stealth.py |
⚠️ 注意事项
- 每次运行都是新会话,不会保留登录状态
- 截图默认保存到
/home/Kano/.openclaw/workspace/ - B站等网站可能触发验证码,需要人工处理或使用已登录的Cookie
🔗 相关文件
- Stealth脚本:
scripts/playwright_stealth.py - 测试脚本:
scripts/test_playwright.py
安全使用建议
What to consider before installing/using this skill:
- Hardcoded paths: The skill and script use /home/Kano and ~/.playwright-env and save screenshots under that home. Edit the SKILL.md and scripts to use the agent's workspace or configurable paths before running; otherwise it will fail or use another user's home.
- Privileged install steps: The install commands call sudo apt and download a .deb. Don't run those blindly on production hosts — run them in an isolated VM or container and review commands first.
- Credential leakage: auto_fill_form prints each selector and value to stdout ("填写 {selector}: {value}"). If you feed real usernames/passwords or API tokens, they will appear in logs. Remove or sanitize these prints and avoid passing secrets directly as plaintext arguments.
- Missing test file / metadata mismatch: The registry metadata said 'no install spec' but SKILL.md contains one, and SKILL.md mentions a test script not included. Confirm the intended install flow with the author or adjust packaging.
- Browser flags and sandboxing: The instructions use --no-sandbox and Playwright launches with --no-sandbox. This is sometimes necessary on servers but weakens process isolation — prefer running inside a properly sandboxed container/VM.
- Network downloads during install: Playwright and Chromium will download additional binaries at install/runtime. If your environment restricts outbound downloads, account for that and verify sources.
Recommended immediate actions: run the skill only in an isolated environment, remove/replace hardcoded paths, remove printing of form values or otherwise secure secret handling, and confirm the install instructions with the skill author or maintainers before granting sudo or running on production systems.
功能分析
Type: OpenClaw Skill
Name: chrome-automation
Version: 1.0.0
The skill is classified as suspicious primarily due to the use of the `--no-sandbox` flag when launching Google Chrome in both the `SKILL.md` instructions and the `scripts/playwright_stealth.py` script. While often necessary for headless browser environments on servers, this flag significantly reduces the security posture by disabling Chrome's sandboxing, making the system more vulnerable to potential browser exploits. There is no evidence of intentional malicious behavior such as data exfiltration, unauthorized remote control, or persistence mechanisms. The `add_init_script` in `playwright_stealth.py` is for anti-bot detection, not malicious client-side attacks. The `sudo` commands in `SKILL.md` are for legitimate package installations.
能力评估
Purpose & Capability
The name/description align with the included code and commands: it uses Chrome and Playwright to take screenshots and automate forms. However, the SKILL.md and script assume a specific user/home (/home/Kano, ~/.playwright-env, ~/.openclaw/workspace) which is environment-specific and not justified in metadata. SKILL.md references a test script (scripts/test_playwright.py) that is not included in the package.
Instruction Scope
Runtime instructions include system-level install steps (wget + sudo apt install), creating a venv, and running playwright install (which downloads browser binaries). The Python script auto_fill_form prints each selector and value (i.e., it logs sensitive form values), creating a clear leakage risk. The instructions use --no-sandbox Chrome flags and write outputs to hardcoded home paths; they also modify navigator properties in-page (expected for 'stealth' behavior) — the latter is coherent, but the logging of form data and hardcoded paths are out-of-scope risk factors.
Install Mechanism
The SKILL.md contains an install section (wget from dl.google.com and apt install of the .deb; pip install playwright; playwright install chromium). Download sources are official (Google and Playwright), which is expected. However, registry metadata indicated 'No install spec' while SKILL.md includes install commands — this metadata vs. author instructions mismatch is inconsistent. The use of apt and sudo elevates privilege requirements for installation.
Credentials
The skill requests no environment variables or external credentials, which matches its purpose. But it hardcodes file system locations under /home/Kano and ~/.playwright-env, and the form auto-fill routine prints the actual values to stdout (risking credential leakage in logs). The number and type of environment accesses are otherwise minimal, but the hardcoded paths and plaintext logging of form values are disproportionate and risky.
Persistence & Privilege
The skill is not marked always:true and allows model invocation (defaults) — normal. The install commands require sudo for apt installs which requires elevated privileges at install time; the skill does not request persistent system-wide configuration or modify other skills, but the installer will write to system locations when run.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install chrome-automation - 安装完成后,直接呼叫该 Skill 的名称或使用
/chrome-automation触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Linux服务器Chrome自动化方案,支持2K高清截图和Playwright高级自动化
元数据
常见问题
Chrome Automation 是什么?
Linux服务器Chrome浏览器自动化方案。支持2K高清截图、表单填写、自动登录、绕过反爬虫检测。适用于B站、YouTube等网站自动化操作。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 473 次。
如何安装 Chrome Automation?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install chrome-automation」即可一键安装,无需额外配置。
Chrome Automation 是免费的吗?
是的,Chrome Automation 完全免费(开源免费),可自由下载、安装和使用。
Chrome Automation 支持哪些平台?
Chrome Automation 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Chrome Automation?
由 Yang Bin(@kanoha222)开发并维护,当前版本 v1.0.0。
推荐 Skills