Tool v1.0.0

playwright-headless-browser

在 Clawdbot 中使用 Playwright Chromium 设置无头浏览器自动化。适用于配置 WSL/Linux 环境下的浏览器工具、安装浏览器依赖项或启用无头网页自动化。自动处理 Chromium 安装、系统库依赖及...

ClawHub 更新于 2026-03-23 32 浏览
下载 SKILL

技能说明

在 Clawdbot 中使用 Playwright Chromium 设置无头浏览器自动化。适用于配置 WSL/Linux 环境下的浏览器工具、安装浏览器依赖项或启用无头网页自动化。自动处理 Chromium 安装、系统库依赖及 Clawdbot 浏览器配置。

使用场景

Set up headless Chromium automation in Clawdbot for WSL/Linux with Playwright, including dependency installation and browser configuration

查看英文原始说明

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.

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

帮我下载并安装这个SKILL:https://skillhub.cstcloud.cn/download/playwright-headless-browser
  1. 点击上方「下载 SKILL」按钮,获取技能压缩包。
  2. 将压缩包解压到你的 Agent 技能目录。
  3. 重启客户端后即可在技能列表中选择该技能。

技能文件内容

6 个文件 · 14 kB · zip 8.2 kB
手动下载 zip · 8.2 kB
SKILL.md text/markdown
---
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.
---

# Playwright Browser Setup

Configure Clawdbot's browser tool to use Playwright-managed Chromium for headless automation in WSL/Linux environments.

## Quick Setup

Run the setup script to install everything:

```bash
./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

## Manual Setup

### 1. Install Playwright Chromium

```bash
npx playwright install chromium
```

### 2. Install System Dependencies

Chromium requires NSS and ALSA libraries:

```bash
# Ubuntu/Debian
sudo apt-get install -y libnss3 libasound2t64

# If libasound2t64 doesn't exist (older Ubuntu):
sudo apt-get install -y libnss3 libasound2
```

### 3. Find Chromium Path

```bash
find ~/.cache/ms-playwright -name "chrome" -path "*/chrome-linux64/*" 2>/dev/null | head -1
```

### 4. Configure Clawdbot

Patch the gateway config:

```bash
clawdbot config patch '{"browser": {"executablePath": "<path-from-step-3>", "headless": true, "noSandbox": true}}'
```

Or use the provided script:

```bash
./scripts/configure-clawdbot.sh
```

## Verification

Test the browser works:

```bash
~/.cache/ms-playwright/chromium-*/chrome-linux64/chrome --headless --no-sandbox --disable-gpu --dump-dom https://example.com
```

## Notes

- `noSandbox: true` is required for WSL/container environments
- `headless: true` runs without a visible window (faster, no display needed)
- For visible browser, set `headless: false` and ensure WSLg or X11 is configured

文件内容直接读取自技能仓库,仅供安装前审阅;以实际下载的压缩包为准。