playwriter

playwriter is a skill for Claude Code, Codex from DJRHails/dotfiles. It costs 99 tokens per session (1,180 once invoked), scanned A, original, MIT.

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

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is # Save as /tmp/grid.py, run with: uv run --with pillow python3 /tmp/grid.py <screenshot.png>.

Good fit Use it to open pages and automate JavaScript-heavy websites through the Playwriter command-line tool and its stateful browser sessions.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

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

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for playwriter

README.md
[![agentmods](https://agentmods.dev/badge/skills/djrhails/dotfiles/playwriter/github.svg)](https://agentmods.dev/skills/djrhails/dotfiles/playwriter)
Your own site
<a href="https://agentmods.dev/skills/djrhails/dotfiles/playwriter"><img src="https://agentmods.dev/badge/skills/djrhails/dotfiles/playwriter/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for playwriter

Your own site · 80×15
<a href="https://agentmods.dev/skills/djrhails/dotfiles/playwriter"><img src="https://agentmods.dev/badge/skills/djrhails/dotfiles/playwriter.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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,180 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00099 $0.01180
Opus 5.5 $0.00040 $0.00472
Sonnet 5.5 $0.00020 $0.00236
Haiku 4.5 $0.00010 $0.00118

Measured 25d ago against content hash a37d964cb1ea, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 25d 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 'state.page = await context.newPage(); await state.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):

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. 25d ago Changed a37d964cb1ea
  2. 3mo 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 today), licensed MIT. It adds 99 tokens to every session and 1,180 once invoked, about $0.0004 per session on Opus 5.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

playwriter compared with skills from other repositories

playwriter next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
playwriterDJRHails/dotfilesSkill2todayMITA99Claude Code, Codex
walkthroughjoshukraine/dotfilesSkill430yesterdayMITA33Claude Code
prd-viewjoshukraine/dotfilesSkill430yesterdayMITA43Claude Code
todoist-clijoshukraine/dotfilesSkill430yesterdayMITA68Claude Code
autopilot-batchjoshukraine/dotfilesSkill430yesterdayMITA75Claude Code
autopilotjoshukraine/dotfilesSkill430yesterdayMITA40Claude Code
qa-handoffjoshukraine/dotfilesSkill430yesterdayMITA41Claude Code