maverick-software

Playwright Headless Browser (Chromium)

開發程式設計v1.0.0
作者:maverick-software更新於 2026-05-17playwright-headless-browser@clawhub_maverick-software/playwright-headless-browser
指令碼工具#Playwright#Browser Automation

據 AlphaMoat 統計,截至 2026-09,Playwright Headless Browser (Chromium) 累計下載 3,671 次、獲 1 個星標,在全部 5,078 個 AI 技能中排名第 2,948 位,在「開發程式設計」分類(577 個)中排名第 382 位。

累計安裝
210
累計下載
3671
星標
1
全站排名
#2,948
全站前 59% · 「開發程式設計」前 67%
平台累計安裝累計下載星標評論
ClawHub ↗10536711-
SkillHub ↗21033691—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

提供一鍵 ./scripts/setup.sh(安裝 Playwright 與 Chromium、安裝所需系統庫(需 sudo)、修改 Clawdbot 配置)與手動流程:先 npx playwright install chromium;Chromium 需要 NSS 與 ALSA 庫(Ubuntu/Debian 下為 libnss3 與 libasound2t64,舊版 Ubuntu 用 libasound2);再在 ~/.cache/ms-playwright 下定位 chrome 可執行檔案;最後用 clawdbot config patch 寫入 executablePath、headless: true、noSandbox: true。官方註明 noSandbox: true 為 WSL/容器環境所必需,headless: true 表示無可見視窗執行;需要可見瀏覽器時設 headless: false 並配置 WSLg 或 X11。配套 skill-card 提醒:後續瀏覽器會話可能以禁用沙箱的 Chromium 執行;安裝指令碼可能執行未鎖版本的 npm/Playwright 程式碼與特權包管理命令;該技能會持久修改 Clawdbot 瀏覽器配置。安裝可能使用 sudo 並持續設定 noSandbox: true;啟用瀏覽器工作階段前先審查指令碼及最終設定。

資料釋出於 2026-10-27

可以用來做什麼

  • 在 WSL/Linux 為 Clawdbot 安裝並配置無頭 Chromium
  • 補齊 Chromium 所需系統庫依賴
  • 驗證無頭瀏覽器可正常抓取頁面

什麼時候用

  • 在 WSL、Linux 或容器環境需要瀏覽器自動化時
  • Clawdbot 瀏覽器工具需要指向 Playwright 管理的 Chromium 時

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

在這臺 WSL 機器上配置 Playwright Chromium 無頭瀏覽器
手動安裝 Chromium 依賴並寫入 Clawdbot 配置

月度資料趨勢

累計下載3671
1563269538272026-03 · 累計下載 17192026-05 · 累計下載 26102026-06 · 累計下載 27732026-07 · 累計下載 30762026-08 · 累計下載 35062026-09 · 累計下載 367126-0326-09
星標1
0122026-03 · 星標 12026-05 · 星標 12026-06 · 星標 12026-07 · 星標 12026-08 · 星標 12026-09 · 星標 126-0326-09

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-093671—1
2026-083506+14.0%1
2026-073076+10.9%1
2026-062773+6.2%1
2026-052610—1
2026-031719—1

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

1.8 KB · ClawHub v1.0.0
---
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
展開全部(共 76 行)

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

「開發程式設計」分類下的熱門技能

maverick-software 的其他技能

資料月份:2026-09 · 下載/星標/安裝數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。