Patchright Browser Automation for Openclaw

A powerful browser automation tool based on Patchright that enables AI agents to interact with local web applications while bypassing bot detection.

smallnest
v1.0.0
Apr 6, 2026
0
721
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install patchright-skill

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 patchright-skill 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 Patchright Browser Automation?

The Patchright Browser Automation skill leverages an undetected Playwright fork to allow AI agents to navigate web applications, specifically targeting local development environments and private networks. This skill is essential for developers using Openclaw Skills who need to perform end-to-end testing, UI verification, or frontend debugging without being blocked by automated bot detection systems.

Unlike standard automation scripts that lose session state, this skill utilizes a persistent server mode. This allows the AI agent to maintain a browser session across multiple interactions, enabling complex workflows like multi-step logins, form submissions, and real-time visual feedback directly within a local Chrome instance. It is the ideal bridge between an AI agent and a running development server.

Patchright Browser Automation Use Cases

  • Automated QA testing for local dev servers (localhost) and private web apps.
  • Frontend debugging through visual screenshots and element text extraction.
  • Verifying UI changes and layout responsiveness during the active development cycle.
  • Automating complex multi-step user workflows like signup, login, and checkout.
  • Pre-deployment verification on localhost or private staging environments.

How Patchright Browser Automation Works

  1. The user initializes the skill by starting a persistent background server to maintain the browser session and prevent state loss.
  2. The AI agent sends commands to the server via JSON-formatted calls to the server.py script.
  3. The Patchright engine launches a Chrome instance configured specifically to bypass common bot detection mechanisms like Cloudflare or reCAPTCHA.
  4. The agent executes navigation, interaction (click/type), or data extraction (screenshot/text) tasks based on the provided parameters.
  5. The server persists the session state, allowing the agent to continue the interaction in subsequent steps without needing to re-authenticate or restart the browser.

Patchright Browser Automation Setup

To begin using this skill within the Openclaw Skills framework, you must start the background server to enable session persistence:

cd ~/.claude/skills/patchright-skill
python scripts/server.py start &

You can then verify the server status or execute tool calls directly:

# Check if server is active
python scripts/server.py status

# Navigate to a local development server
python scripts/server.py call '{"tool": "navigate", "args": {"url": "http://localhost:3000"}}'

Patchright Browser Automation Data Schema & Taxonomy

The skill organizes data through command parameters and visual outputs. It primarily interacts with web elements via CSS or text-based selectors.

Data Type Description Format
Selectors CSS or text-based identifiers for UI elements String (e.g., #id, .class, text=Login)
Screenshots Visual captures of the current browser state .png files
Metadata Current URL, page title, and element text JSON/Plain Text
State Session persistence managed via background process Background Server
Browser Underlying browser engine used for execution Google Chrome

Patchright Browser Automation Advanced Features

  • Bot Detection Bypass: Uses a specialized undetected Playwright fork to evade Cloudflare, reCAPTCHA, and other security filters.
  • Session Persistence: Dedicated server mode prevents session loss between individual tool calls, allowing for long-running workflows.
  • Full-Page Screenshots: Capture entire scrolling pages for comprehensive design and layout verification.
  • Intelligent Waiting: Built-in tools to wait for specific elements to appear, handling asynchronous loading and dynamic UI elements.
  • Local Network Support: Full compatibility with localhost, private IP ranges, and custom dev server ports.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*