playwright-cli

A command-line browser automation tool for controlling web pages.

In plain words
What is it for?
It is for opening sites, navigating pages, clicking and filling forms, taking screenshots, testing web applications, and extracting page data.
Why use it?
It removes repetitive manual browser work and provides page snapshots with references for later interactions.

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

Made for: Claude Code, Codex.

Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 661 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 81% copy Near-identical to another mod 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.00052 $0.00661
Opus 5 $0.00026 $0.00331
Sonnet 5 $0.00010 $0.00132
Haiku 4.5 $0.00005 $0.00066

Measured 2d ago against content hash 933c2004cd15, 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.

Origin

This is a copy

81% identical to playwright-cli — 242 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/skills/playwright-cli/SKILL.md · 75 lines

How it starts

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

Browser Automation with playwright-cli

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

How interaction refs work

After every command, playwright-cli emits a snapshot file (.playwright-cli/page-*.yml). Element refs (e3, e7, e15) come from that snapshot, read it before the next interactive command. Use playwright-cli snapshot to refresh on demand.

> playwright-cli goto https://example.com
### Page
- Page URL: https://example.com/
- Page Title: Example Domain
### Snapshot
[Snapshot](.playwright-cli/page-2026-02-14T19-22-42-679Z.yml)

If --filename is not provided, a new snapshot file is created with a timestamp. Default to automatic file naming; use --filename= when the artifact is part of the workflow result.

Local installation fallback

If running globally-available playwright-cli fails, prefix with npx:

npx playwright-cli open https://example.com
npx playwright-cli click e1

Browser sessions

Use -s=<name> to run multiple parallel sessions:

playwright-cli -s=mysession open example.com --persistent
playwright-cli -s=mysession click e6
playwright-cli -s=mysession close
playwright-cli list           # list active sessions
playwright-cli close-all      # close every browser

Command reference

Full surface, core, navigation, keyboard, mouse, save-as, tabs, storage (cookies / localStorage / sessionStorage), network, devtools, open parameters, snapshots, browser sessions, end-to-end examples, is in references/commands.md.

Specific tasks

Read the full file on GitHub · 75 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 75 lines · 52 tokens per session scan A 933c2004cd15

Subscribe to this mod's changes

playwright-cli is a skill published in the GitHub repository gaia-react/gaia (22 stars, last pushed 2d ago), licensed MIT. It adds 52 tokens to every session and 661 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 81% identical to playwright-cli, differing in 242 lines, and is treated as a copy.

Related

Other skills, from other repositories

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

next-rspack

Maintain @next/rspack-core and @next/rspack-binding packages. Use when editing rspack/package.json, rspack/crates/binding/Cargo.toml, rspack/rust-toolchain.toml, or packages/next-rspack/package.json. Covers upgrading @rspack/core npm version, rspack crate versions, Rust toolchain version, building and linking for…

vercel/next.js · 113 tokens

next-dev-loop

Verify Next.js runtime behavior after editing app code. Use this skill to confirm a change actually works in a running app — not just that it compiles or type-checks. Combines /next/mcp (Next.js's view) with agent-browser (the browser's view). Requires a running next dev.

vercel/next.js · 68 tokens

column-filtering

Filter columns with columnFilteringFeature, filteredRowModel, filterFns, filterMeta, nested-row direction, and manualFiltering. Load for accessor compatibility, controlled filter updaters, fuzzy metadata, or client/server ownership.

TanStack/table · 48 tokens

global-filtering

Apply globalFilter across eligible columns with globalFilteringFeature, columnFilteringFeature, filteredRowModel, globalFilterFn, and manual server filtering. Load when columns unexpectedly participate or a global filter changes state without changing rows.

TanStack/table · 47 tokens

sorting

Sort with rowSortingFeature, sortedRowModel, sortFns, multi-sort and removal options, sortUndefined, and manualSorting. Load for comparator direction, incoming server order, or product-specific sorting cycles.

TanStack/table · 43 tokens