skills$openclaw/playwriter
paulpete9.2k

by paulpete

playwriter – OpenClaw Skill

playwriter is an OpenClaw Skills integration for coding workflows. Browser automation via Playwriter (remorses) using persistent Chrome sessions and the full Playwright Page API.

9.2k stars8.9k forksSecurity L1
Updated Feb 7, 2026Created Feb 7, 2026coding

Skill Snapshot

nameplaywriter
descriptionBrowser automation via Playwriter (remorses) using persistent Chrome sessions and the full Playwright Page API. OpenClaw Skills integration.
ownerpaulpete
repositorypaulpete/playwriter
languageMarkdown
licenseMIT
topics
securityL1
installopenclaw add @paulpete/playwriter
last updatedFeb 7, 2026

Maintainer

paulpete

paulpete

Maintains playwriter in the OpenClaw Skills directory.

View GitHub profile
File Explorer
2 files
.
_meta.json
274 B
SKILL.md
2.8 KB
SKILL.md

name: playwriter description: Browser automation via Playwriter (remorses) using persistent Chrome sessions and the full Playwright Page API. hats: [developer, qa_tester]

Playwriter

Overview

Use Playwriter to run Playwright Page scripts against your local Chrome session. This preserves logins, cookies, and extensions, which is ideal for web dashboard testing and authenticated flows.

When to Use

  • Validating the Ralph web dashboard UI
  • Navigating authenticated pages without re-logging in
  • Testing flows that require browser extensions or saved state
  • Capturing accessibility snapshots for element discovery

Prerequisites

  • Install the CLI:
    npm i -g playwriter
    
  • Install the Playwriter Chrome extension (see the Playwriter repo instructions)
  • Ensure Chrome is running and the extension is enabled

Core Workflow

  1. Create a session:
    playwriter session new
    
  2. List sessions and copy the session id:
    playwriter session list
    
  3. Execute Playwright code against that session:
    playwriter -s <session_id> -e "await page.goto('https://example.com')"
    

Execution Environment

Within -e, these are available in scope:

  • page (Playwright Page)
  • context (BrowserContext)
  • state (persistent object across calls in the same session)
  • require (for loading helper modules)

Example state persistence:

playwriter -s <session_id> -e "state.lastUrl = page.url()"
playwriter -s <session_id> -e "console.log(state.lastUrl)"

Navigate + click

playwriter -s <session_id> -e "await page.goto('http://localhost:3000'); await page.getByRole('button', { name: 'Run' }).click();"

Fill forms

playwriter -s <session_id> -e "await page.getByLabel('Email').fill('qa@example.com'); await page.getByLabel('Password').fill('secret'); await page.getByRole('button', { name: 'Sign in' }).click();"

Accessibility snapshots (labeled)

playwriter -s <session_id> -e "const { screenshotWithAccessibilityLabels } = require('playwriter'); await screenshotWithAccessibilityLabels(page, { path: '/tmp/a11y.png' });"

Network interception

playwriter -s <session_id> -e "await page.route('**/api/**', async route => { const res = await route.fetch(); const body = await res.json(); await route.fulfill({ json: { ...body, injected: true } }); });"

Read page content

playwriter -s <session_id> -e "const text = await page.locator('main').innerText(); console.log(text);"

Tips

  • Prefer getByRole and getByLabel for stable selectors.
  • Use accessibility snapshots to discover reliable roles and labels.
  • Keep sessions focused: reset or close them if state becomes messy.
  • For multi-step flows, store intermediate data on state.
README.md

No README available.

Permissions & Security

Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.

```bash playwriter -s <session_id> -e "const { screenshotWithAccessibilityLabels } = require('playwriter'); await screenshotWithAccessibilityLabels(page, { path: '/tmp/a11y.png' });" ```

Requirements

- Install the CLI: ```bash npm i -g playwriter ``` - Install the Playwriter Chrome extension (see the Playwriter repo instructions) - Ensure Chrome is running and the extension is enabled

FAQ

How do I install playwriter?

Run openclaw add @paulpete/playwriter in your terminal. This installs playwriter into your OpenClaw Skills catalog.

Does this skill run locally or in the cloud?

OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.

Where can I verify the source code?

The source repository is available at https://github.com/openclaw/skills/tree/main/skills/paulpete/playwriter. Review commits and README documentation before installing.