playwright-cli

A command-line guide for controlling a web browser with Playwright, including navigation, interaction, screenshots, and tests.

In plain words
What is it for?
Use it to navigate live websites, fill in forms, inspect dynamic pages, manage authenticated sessions, or run Playwright tests.
Why use it?
It makes browser automation repeatable while accounting for login sessions and pages that need manual interaction.

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/ne11nn/cantos-plugin/playwright-cli
Any agent
npx skills add ne11nn/cantos-plugin --skill playwright-cli
Clone the repo
git clone --depth 1 https://github.com/ne11nn/cantos-plugin

Made for: Claude Code, Codex.

Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,408 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00030 $0.02408
Opus 5 $0.00015 $0.01204
Sonnet 5 $0.00006 $0.00482
Haiku 4.5 $0.00003 $0.00241

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

Security

Grade A, and why

playwright-cli scanned grade A with 0 findings 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/playwright-cli/SKILL.md · 353 lines

How it starts

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

Browser Automation with playwright-cli

Always

  • --headed is mandatory. Always open browsers with --headed. Headless sessions cannot be interrupted — if a page needs sign-in, CAPTCHA, or manual action, the workflow is stuck with no recovery path.
  • --persistent for auth sessions. Use whenever the page may require login state (Google properties, any site with auth).
  • Named sessions. Always use -s=<name> (e.g. -s=maps, -s=research) so sessions are addressable and close cleanly.
  • Sign-in flow. When auth is needed: open → navigate → tell the user → wait for their confirmation → then continue.
  • Headless only when: page is a public URL, no auth, no CAPTCHA risk (e.g. localhost screenshots).

Quick start

# open new browser
playwright-cli open
# navigate to a page
playwright-cli goto https://playwright.dev
# interact with the page using refs from the snapshot
playwright-cli click e15
playwright-cli type "page.click"
playwright-cli press Enter
# take a screenshot (rarely used, as snapshot is more common)
playwright-cli screenshot
# close the browser
playwright-cli close

Commands

Core

playwright-cli open
# open and navigate right away
playwright-cli open https://example.com/
playwright-cli goto https://playwright.dev
playwright-cli type "search query"
playwright-cli click e3
playwright-cli dblclick e7
# --submit presses Enter after filling the element
playwright-cli fill e5 "[email protected]"  --submit
playwright-cli drag e2 e8
playwright-cli hover e4
playwright-cli select e9 "option-value"
playwright-cli upload ./document.pdf
playwright-cli check e12
playwright-cli uncheck e12
playwright-cli snapshot
playwright-cli eval "document.title"
playwright-cli eval "el => el.textContent" e5
# get element id, class, or any attribute not visible in the snapshot
playwright-cli eval "el => el.id" e5
playwright-cli eval "el => el.getAttribute('data-testid')" e5
playwright-cli dialog-accept
playwright-cli dialog-accept "confirmation text"
playwright-cli dialog-dismiss
playwright-cli resize 1920 1080
playwright-cli close

Read the full file on GitHub · 353 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 · 353 lines · 30 tokens per session scan A 39c8e09f23d1

Subscribe to this mod's changes

playwright-cli is a skill published in the GitHub repository ne11nn/cantos-plugin (1 stars, last pushed 2d ago), licensed MIT. It adds 30 tokens to every session and 2,408 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. 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

tutti-record-agent-session-replay

From a Tutti checkout, run, audit, freshly replay, publish, or diagnose Session Replay cassettes that are driven by case-repository scenario scripts (CDP), not by interactive UI recording. Use for real-Provider capture while a scenario.mjs executes, cassette transport or semantic-state mismatches, fresh replay…

tutti-os/tutti · 127 tokens

penguin-harness-manual-test

Use when standing PenguinHarness up to try a change by hand — launching the Web App, the desktop shell, the landing page or the docs site to click through it, screenshot it, or reproduce a report. Covers the four dev entry points and their ports, which data root each writes to, and the four ways a healthy setup looks…

Prism-Shadow/penguin-harness · 77 tokens

browser-testing-with-screenshots

Use when testing web applications with visual verification - automates Chrome browser interactions, element selection, and screenshot capture for confirming UI functionality.

AgentWorkforce/relay · 32 tokens

kane-cli

Browser automation + AI test authoring via kane-cli - run browser objectives, generate & refine test scenarios/cases from a description, design requirement-linked test suites from a PRD/spec (assurance), parse NDJSON output, inspect logs, save runnable test.md. Use for any task requiring a real browser (navigate…

LambdaTest/kane-cli · 159 tokens

e2e-verification

Use when manually verifying a Chorus frontend change in a real browser — finding local login credentials, driving the running dev server with the Playwright MCP, logging in, navigating to a page, and capturing snapshots/screenshots for e2e acceptance.

Chorus-AIDLC/Chorus · 54 tokens

tlamatini-daily-chat-test

Run the daily automated Tlamatini chat regression — drive a visible Chrome via Playwright, log into agentpage.html, ask up to 1000 curated safe questions one-by-one (Multi-Turn ON, ACPX/Ask-Execs/Exec-Report/Internet OFF), wait for and qualify each answer (heuristic + LLM judge on failures), then write a dated report…

XAIHT/Tlamatini · 125 tokens