← Back to Skills Marketplace
473
Downloads
1
Stars
6
Active Installs
1
Versions
Install in OpenClaw
/install chrome-automation
Description
Linux服务器Chrome浏览器自动化方案。支持2K高清截图、表单填写、自动登录、绕过反爬虫检测。适用于B站、YouTube等网站自动化操作。
README (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
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install chrome-automation - After installation, invoke the skill by name or use
/chrome-automation - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Linux服务器Chrome自动化方案,支持2K高清截图和Playwright高级自动化
Metadata
Frequently Asked Questions
What is Chrome Automation?
Linux服务器Chrome浏览器自动化方案。支持2K高清截图、表单填写、自动登录、绕过反爬虫检测。适用于B站、YouTube等网站自动化操作。 It is an AI Agent Skill for Claude Code / OpenClaw, with 473 downloads so far.
How do I install Chrome Automation?
Run "/install chrome-automation" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Chrome Automation free?
Yes, Chrome Automation is completely free (open-source). You can download, install and use it at no cost.
Which platforms does Chrome Automation support?
Chrome Automation is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Chrome Automation?
It is built and maintained by Yang Bin (@kanoha222); the current version is v1.0.0.
More Skills