playwriter

A way to control the Chrome browser already open on your computer through Playwright code. Playwright is a tool for automating web browsers.

In plain words
What is it for?
Use it to open pages and automate JavaScript-heavy websites through the Playwriter command-line tool and its stateful browser sessions.
Why use it?
It can work with the existing browser session, which helps when a website depends on your current login or browser state.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/djrhails/dotfiles/playwriter
Any agent
npx skills add DJRHails/dotfiles --skill playwriter
Clone the repo
git clone --depth 1 https://github.com/DJRHails/dotfiles

Made for: Claude Code, Codex.

Per session 99 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,171 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00099 $0.01171
Opus 5 $0.00049 $0.00585
Sonnet 5 $0.00020 $0.00234
Haiku 4.5 $0.00010 $0.00117

Measured 2d ago against content hash fd543f2ca775, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

playwriter scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

description: Control the user own Chrome browser via Playwriter extension with Playwright code snippets in a stateful local js sandbox via playwriter cli. Use this over other Playwright MCPs to automate the browser — it
modules/agents/skills/playwriter/SKILL.md · 71 lines

How it starts

The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.

REQUIRED: Read Full Documentation First

Before using playwriter, you MUST run this command:

playwriter skill # IMPORTANT! do not use | head here. read in full!

This outputs the complete documentation including:

  • Session management and timeout configuration
  • Selector strategies (and which ones to AVOID)
  • Rules to prevent timeouts and failures
  • Best practices for slow pages and SPAs
  • Context variables, utility functions, and more

Do NOT skip this step. The quick examples below will fail without understanding timeouts, selector rules, and common pitfalls from the full docs.

Read the ENTIRE output. Do NOT pipe through head, tail, or any truncation command. The skill output must be read in its entirety — critical rules about timeouts, selectors, and common pitfalls are spread throughout the document, not just at the top.

Minimal Example (after reading full docs)

playwriter session new
playwriter -s 1 -e 'await page.goto("https://example.com")'

Always use single quotes for the -e argument. Single quotes prevent bash from interpreting $, backticks, and backslashes inside your JS code. Use double quotes or backtick template literals for strings inside the JS.

If playwriter is not found, use npx playwriter@latest or bunx playwriter@latest.

Enable Playwriter in Arc (via cua-driver)

Trigger: the user says something like "turn on playwriter", "enable playwriter", "the playwriter icon isn't green". Don't ask for clarification — drive Arc directly.

The Playwriter Arc extension shows a toolbar icon at the top-right of every regular tab. Green = active, black = inactive. Clicking it toggles. The relay (playwriter serve / playwriter-ws-server) usually runs in the background already — the click is just an extension-side activation per tab/session.

Recipe (assumes cua-driver is installed and its daemon is running — if not, see the cua-driver skill prereqs):

  1. Verify the relay side is alive: playwriter browser list should list install:Chromium:.... If not, run playwriter serve --replace in a background process first.
  2. Find a usable Arc window. Arc's pid is stable — get it with cua-driver call launch_app '{"bundle_id":"company.thebrowser.Browser"}'. Pick a window from the returned windows array with bigBrowserWindow- id prefix, on_current_space: true, is_on_screen: true, and bounds.width > 800. If the only on-Space window is on arc://* or chrome://*, navigate it to any real URL first (⌘T + type_text "example.com" + Return). Extension popups and icon-state are disabled on Arc/Chrome internal pages.
  3. Find the icon's pixel coords. The Playwriter icon is the leftmost of the four top-right toolbar icons, immediately left of iCloud Passwords (three keys). DO NOT eyeball coords from a Read-rendered screenshot — the display scaling lies. Instead:

Read the full file on GitHub · 71 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 71 lines · 99 tokens per session scan A fd543f2ca775

Subscribe to this mod's changes

playwriter is a skill published in the GitHub repository DJRHails/dotfiles (2 stars, last pushed 8d ago), licensed MIT. It adds 99 tokens to every session and 1,171 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

walkthrough

Generate a hands-on browser walkthrough of a PR's user-facing changes to exercise before review; --publish posts the final version to the PR for QA.

joshukraine/dotfiles · 33 tokens

prd-view

Render a PRD Markdown file as a rich, self-contained HTML reading view (Dashboard style) and open it in the browser. The Markdown stays authoritative; the HTML is a derived, ephemeral presentation.

joshukraine/dotfiles · 43 tokens

autopilot-batch

Fan out a batch of autopilot-queued issues to parallel background worktree subagents — each runs /autopilot at the build model from its 'model:' label — with a gating review at Opus 5 or above and never below the build (Opus reviews Sonnet and Opus builds, Fable reviews Fable builds).

joshukraine/dotfiles · 75 tokens

todoist-cli

Manage Todoist tasks, projects, labels, filters, sections, comments, reminders, and workspaces via the td CLI. Use when the user wants to view, create, update, complete, or organize Todoist items, or mentions tasks, inbox, today, upcoming, projects, labels, or filters.

joshukraine/dotfiles · 68 tokens

autopilot

Carry a well-scoped GitHub issue through the full dev loop autonomously, stopping at a per-run tier boundary (PR-ready, or merge+deploy for small reversible changes).

joshukraine/dotfiles · 40 tokens

qa-handoff

Generate a hands-on QA testing guide as a self-contained HTML page — for Rails apps or static (Hugo) sites. --publish uploads the HTML to the project's configured QA host.

joshukraine/dotfiles · 41 tokens