Skip to content

/playwriter

Browser automation via Playwriter (remorses) using persistent Chrome sessions and the full Playwright Page API.

From plugin
ralph-orchestrator
3.2k17 skills3 agents

Claude Code

$ npx -y skills add mikeyobrien/ralph-orchestrator --skill playwriter --agent claude-code

SKILL.md

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

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)"

Common Patterns

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`.
Read more
@mikeyobrien
Ships withralph-orchestrator

A hat-based orchestration framework that keeps AI agents in a loop until the task is done. "Me fail English? That's unpossible!" - Ralph Wiggum

Stars on GitHub

Momentum

stars in total
3.2k
Star history of mikeyobrien/ralph-orchestrator on GitHub, a chart by star-history.com

Other skills on ralph-orchestrator.

code-assist
Auto-invoked

code-assist

Guides implementation of code tasks using test-driven development in an Explore, Plan, Code, Commit workflow. Acts as a Technical…

pdd
Auto-invoked

pdd

Transforms a rough idea into a detailed design document with implementation plan. Follows Prompt-Driven Development — iterative…

pr-demo
Auto-invoked

pr-demo

Use when creating animated demos (GIFs) for pull requests or documentation. Covers terminal recording with asciinema and…

More skills from other plugins.

1password

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

clawdis2w393k
@steipete@steipeteInstall Skill
computer-use

computer-use

Drives the GUI of a visible local app window through `orca computer`: accessibility tree, clicks, typing, menus, dialogs, and…

orca2w111k
@stablyai@stablyaiInstall Skill
agentmail

agentmail

Use your assigned AgentMail inbox to read email tasks, explicitly send or reply, and check delivery. Provided automatically by…

paperclip2w109k
@paperclipai@paperclipaiInstall Skill
adr-create

adr-create

Create a new Architecture Decision Record with sequential numbering and AgentDB registration

@ruvnet@ruvnetInstall Skill

Questions about playwriter.

Which coding agents can use playwriter?
playwriter installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.