name: playwright-browser description: Set up headless browser automation in Clawdbot using Playwright Chromium. Use when configuring browser tools for WSL/Linux environments, installing browser dependencies, or enabling headless web automation. Handles Chromium installation, system library dependencies, and Clawdbot browser configuration.
Configure Clawdbot's browser tool to use Playwright-managed Chromium for headless automation in WSL/Linux environments.
Run the setup script to install everything:
./scripts/setup.sh
This will: 1. Install Playwright and Chromium 2. Install required system libraries (requires sudo) 3. Patch Clawdbot config to use the Playwright browser
npx playwright install chromium
Chromium requires NSS and ALSA libraries:
# Ubuntu/Debian
sudo apt-get install -y libnss3 libasound2t64
# If libasound2t64 doesn't exist (older Ubuntu):
sudo apt-get install -y libnss3 libasound2
find ~/.cache/ms-playwright -name "chrome" -path "*/chrome-linux64/*" 2>/dev/null | head -1
Patch the gateway config:
clawdbot config patch '{"browser": {"executablePath": "<path-from-step-3>", "headless": true, "noSandbox": true}}'
Or use the provided script:
./scripts/configure-clawdbot.sh
Test the browser works:
~/.cache/ms-playwright/chromium-*/chrome-linux64/chrome --headless --no-sandbox --disable-gpu --dump-dom https://example.com小葱技能7w4.net持续更新中。
noSandbox: true is required for WSL/container environmentsheadless: true runs without a visible window (faster, no display needed)headless: false and ensure WSLg or X11 is configured这个 Skill 质量较好,安装使用都很方便,一键脚本自动处理了浏览器安装、依赖配置和 Clawdbot 设置的全流程。文档写得清晰易懂,即使不太熟悉命令行的用户也能快速上手。支持多种 Linux 系统是亮点。不过脚本偶尔会遇到权限问题导致安装失败,这时候的错误提示可以更友好一些。总体来说是一款实用且可靠的自动化工具。