Playwright CLI for Openclaw

A token-efficient browser automation tool designed for AI agents to interact with web pages via a command-line interface.

rullys
v1.0.0
Feb 28, 2026
0
0
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install onivor-playwright

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install onivor-playwright using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Playwright CLI?

Playwright CLI provides a robust interface for automating web browsers using the powerful Playwright engine. It is specifically designed as an efficient tool for AI coding agents within the ecosystem of Openclaw Skills, allowing agents to navigate the web, interact with elements, and capture state through a streamlined command-line interface.

By leveraging this skill, developers can empower their agents to perform complex web-based tasks like form filling, data extraction, and visual verification. The tool emphasizes token efficiency by using element references and snapshots, making it an ideal choice for integrating web capabilities into LLM-driven workflows across Chromium, Firefox, and WebKit engines.

Playwright CLI Use Cases

  • Automating web regression tests within CI/CD pipelines.
  • Enabling AI agents to perform research or data gathering from web pages.
  • Generating PDF reports or screenshots of web dashboards automatically.
  • Debugging web applications by inspecting console logs and network traffic via CLI.
  • Managing persistent browser sessions for complex, multi-step authentication flows.

How Playwright CLI Works

  1. Initialize a browser instance using the open command to navigate to a target URL.
  2. Utilize element snapshots to identify interactive components and receive unique references.
  3. Execute interaction commands such as click, type, or fill using those element references.
  4. Manage page state through navigation commands like reload or go-back.
  5. Capture output data in the form of screenshots, PDFs, or console logs for analysis.
  6. Terminate sessions or close tabs to clean up resources once the task is complete.

Playwright CLI Setup

Install the package globally using npm to integrate it with your Openclaw Skills:

npm install -g @playwright/mcp@latest

Verify the installation and view available commands:

playwright-cli --help

Ensure you have Node.js 18 or higher installed on your system.

Playwright CLI Data Schema & Taxonomy

Component Description
Sessions Persistent storage for cookies and local storage, stored by session name.
Config File playwright-cli.json for managing browser types and output directories.
Snapshots Returns JSON-formatted element references for precise interaction.
Outputs Screenshots (PNG/JPEG) and document exports (PDF) saved to defined directories.

Playwright CLI Advanced Features

  • Multi-tab management allowing agents to switch contexts and handle pop-ups seamlessly.
  • Session isolation using the --session flag to maintain distinct browser environments.
  • Integrated DevTools access for monitoring network requests and JavaScript console messages.
  • Support for headed and headless modes via environment variables or CLI flags.
  • Custom JavaScript execution within the page context using the run-code command.
  • Tracing capabilities to record and debug complex browser interactions within Openclaw Skills workflows.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*