← 返回 Skills 市场
hansraj316

Webwright

作者 Hansraj Singh Thakur · GitHub ↗ · v1.0.1 · MIT-0
darwinlinux ✓ 安全检测通过
42
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install webwright
功能描述
Run long-horizon, multi-step browser automation by delegating to the Microsoft webwright CLI, which writes and executes Playwright scripts to drive a real Ch...
使用说明 (SKILL.md)

Webwright

Delegate browser tasks to the webwright CLI. Webwright is a code-as-action web agent: an LLM writes and runs Playwright scripts to drive a real Chromium browser, which is more robust and repeatable than click-by-click automation.

When to use

  • Multi-step web flows: logins, multi-page forms, checkout/wizard flows.
  • Long-horizon navigation across several pages where state must be carried.
  • Repeatable site tasks where you want a reusable generated script as the artifact.

When NOT to use

  • Simple single-page reads or extraction — use web_fetch / built-in web tools.
  • Anything that does not actually require a driven browser.

Preflight (do this before the first run)

This skill is opt-in. It only becomes available once skills.entries.webwright.enabled is true (an unset value counts as off), so enable it first:

openclaw config set skills.entries.webwright.enabled true

Run webwright doctor next as a setup check. Note its key check is OpenAI-specific: it always runs an OpenAI Key check, so if you intend to use Anthropic or OpenRouter, a doctor OpenAI Key FAIL is expected and is NOT a blocker — verify your chosen provider's key separately (step 3). Then confirm:

  1. webwright is on PATH (this skill is gated on it). If missing, see references/setup.md.
  2. Chromium is installed for Playwright: playwright install chromium.
  3. A provider API key is set in the environment for the model config you pick: OPENAI_API_KEY (default model_openai.yaml), ANTHROPIC_API_KEY (model_claude.yaml), or OPENROUTER_API_KEY (model_openrouter.yaml).
  4. The python, python3, and playwright that webwright's generated scripts will invoke must be webwright's own install (with Chromium). If you installed webwright in a venv, activate it (or prepend its bin to PATH) before running — otherwise generated scripts can pick up a different system Python that lacks the browser. See references/setup.md.
  5. Choose an output directory INSIDE the current workspace. Never write into ~/.openclaw, $OPENCLAW_STATE_DIR, or any active OpenClaw state directory.

Invocation

The CLI uses a main subcommand:

webwright main \
  -t "TASK INSTRUCTION" \
  --start-url "https://example.com" \
  -c base.yaml -c model_openai.yaml \
  --task-id my_task \
  -o ./webwright-out/my_task

-c defaults to base.yaml model_openai.yaml. You can also stack inline overrides, e.g. -c agent.step_limit=20 to cap the agent's step budget.

Then read the run artifacts (generated final_script.py, plan.md, step logs, screenshots under final_runs/run_\x3Cid>/) from the -o directory and report the generated script path to the user.

See references/cli.md for every flag, config stacking, and the output layout.

Hard rules

  • Always pass -o pointing inside the workspace; never inside OpenClaw state dirs.
  • Always pass --start-url and a specific, scoped -t task.
  • Browser runs take real actions on live sites and spend API tokens. Only run on user-authorized tasks and sites, and avoid destructive actions.
  • Never put secrets in the -t task text. The task is sent to the model provider and recorded in run artifacts (trajectories, logs, process args), so passwords or tokens placed there are exposed. For login-walled tasks, pass credentials via environment variables and tell the agent the env var NAMES to read in its generated script (e.g. "log in using $SITE_USER / $SITE_PASS"), or pre-authenticate a persistent browser profile — never the literal secret values.
  • Pick exactly one model config (model_openai.yaml, model_claude.yaml, model_openrouter.yaml) whose matching API key is present in the environment.

Examples

Search flights and read the results:

webwright main -t "Search flights SEA to JFK departing 2026-08-15 returning 2026-08-20" \
  --start-url "https://www.google.com/flights" \
  -c base.yaml -c model_openai.yaml --task-id flights -o ./webwright-out/flights

Extract a table behind a multi-step navigation (Claude model):

webwright main -t "Open the docs, go to the pricing page, and list every plan and price" \
  --start-url "https://example.com" \
  -c base.yaml -c model_claude.yaml --task-id pricing -o ./webwright-out/pricing
安全使用建议
Install only if you want an agent to drive a real browser on your behalf. Use it only on authorized sites, isolate the CLI install, keep outputs inside the workspace, and pass secrets through environment variables or an intentionally chosen browser profile rather than putting secret values in task text.
能力标签
requires-sensitive-credentials
能力评估
Purpose & Capability
The skill delegates to the Microsoft webwright CLI to generate and run Playwright scripts in Chromium for multi-step browser tasks, including login and checkout-style flows; these are high-impact capabilities but match the stated purpose.
Instruction Scope
The instructions require a start URL, a specific scoped task, workspace-contained outputs, user-authorized sites, and avoidance of destructive actions.
Install Mechanism
Setup requires installing an external Python CLI from the Microsoft GitHub source repository plus Playwright Chromium; this is disclosed and no executable payload is bundled in the skill artifacts.
Credentials
Provider API keys and optional site credentials are expected for browser automation and model use; the skill warns not to place literal secrets in prompts or config files.
Persistence & Privilege
The skill may use environment-provided credentials or a pre-authenticated persistent browser profile, but this is disclosed and user-directed; it does not add hidden background persistence.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install webwright
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /webwright 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
Review fixes: never put credentials in the task prompt (use env var names); document skills.entries.webwright.enabled opt-in; clarify webwright doctor checks the OpenAI key only.
v1.0.0
Initial release: delegate long-horizon browser automation to the Microsoft webwright CLI (Playwright code-as-action).
元数据
Slug webwright
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Webwright 是什么?

Run long-horizon, multi-step browser automation by delegating to the Microsoft webwright CLI, which writes and executes Playwright scripts to drive a real Ch... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 42 次。

如何安装 Webwright?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install webwright」即可一键安装,无需额外配置。

Webwright 是免费的吗?

是的,Webwright 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Webwright 支持哪些平台?

Webwright 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(darwin, linux)。

谁开发了 Webwright?

由 Hansraj Singh Thakur(@hansraj316)开发并维护,当前版本 v1.0.1。

💬 留言讨论