playwright-rs-usage

playwright-rs-usage is a skill for Claude Code, Codex from padamson/playwright-rust. It costs 98 tokens per session (3,910 once invoked), scanned A, original, Apache-2.0.

A procedural reference for using playwright-rs, Rust bindings for Microsoft Playwright, a browser-automation tool for controlling pages and testing websites.

In plain words
What is it for?
Use it when writing or debugging Rust code that opens browsers, finds page elements, waits for actions, installs browser engines, or inspects failure traces.
Why use it?
It explains the browser, page, and locator objects, waiting behavior, setup, and trace inspection needed to diagnose failed browser-automation code.

Skill for Claude CodeCodex

Part of the playwright-rust plugin — 4 skills shipped together

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

Made for: Claude Code, Codex.

Or install playwright-rust, the plugin that ships this one along with the rest of its 4 skills.

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 playwright-rs-usage

README.md
[![agentmods](https://agentmods.dev/badge/skills/padamson/playwright-rust/playwright-rs-usage.svg)](https://agentmods.dev/skills/padamson/playwright-rust/playwright-rs-usage)
Your own site
<a href="https://agentmods.dev/skills/padamson/playwright-rust/playwright-rs-usage"><img src="https://agentmods.dev/badge/skills/padamson/playwright-rust/playwright-rs-usage.svg" alt="Measured on agentmods" height="20"></a>
Per session 98 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,910 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.00098 $0.03910
Opus 5 $0.00049 $0.01955
Sonnet 5 $0.00020 $0.00782
Haiku 4.5 $0.00010 $0.00391

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

Security

Grade A, and why

playwright-rs-usage 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 4d 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-rs-usage/SKILL.md · 330 lines

How it starts

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

Using playwright-rs

Rust bindings for Microsoft Playwright. This crate is a thin JSON-RPC client to the upstream Playwright server, so the API mirrors playwright-python / java / .NET semantics. When unsure about a method's behavior, the upstream Playwright docs are the authoritative reference.

Drift discipline. The canonical API tour lives in the crate-level rustdoc at https://docs.rs/playwright-rs — that's compile-checked against the actual code. This skill is the "what to reach for, what to avoid" overlay: durable conventions, not a method-by-method reference. Two build gates hold it to the crate: the Rust code block below is compiled against the real API, and every cargo feature and browser engine the crate exposes must be named somewhere in this file, so a capability cannot ship here undocumented.

Neither gate checks that this prose is accurate. That residue is real. The text is written in concepts (auto-wait, builder pattern) rather than specific method names so it ages slowly, but when it and the crate disagree, the crate wins: check https://docs.rs/playwright-rs for the version you actually have.

Before any of this works

Two things, and the second one is the one that surprises people.

The crate. playwright-rs in [dependencies], or [dev-dependencies] if it is test-only, alongside tokio with the full feature. Defaults are native-tls, macros and ring: transport, the locator!() macro, and the crypto backend respectively.

Prefer leaving them on. default-features = false is only needed to swap ring for aws-lc, and it drops all three, so the replacements have to be listed back explicitly or locator!() disappears and no TLS transport remains:

playwright-rs = { version = "0.17", default-features = false, features = [
    "aws-lc",
    "native-tls",
    "macros",
] }

Two capabilities are opt-in and off unless asked for. screenshot-diff turns on pixel-diff screenshot assertions, so reach for it when the task calls for comparing a rendering against a baseline rather than asserting on the DOM. cli builds an installer binary for use outside a Cargo project; inside one, prefer the example below, because cargo install compiles a second copy of the crate that then has to be kept in sync with the project's lockfile.

Read the full file on GitHub · 330 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. 4d ago First seen · 330 lines · 98 tokens per session scan A ed68bb97e1e3

Subscribe to this mod's changes

playwright-rs-usage is a skill published in the GitHub repository padamson/playwright-rust (141 stars, last pushed 4d ago), licensed Apache-2.0. It adds 98 tokens to every session and 3,910 once invoked, about $0.0005 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-30.

Related

Other skills, from other repositories

webcmd-browser

Use when a live browser task requires Playwright interaction, authenticated handoff, visible UI verification, or ad-hoc page inspection.

agentrhq/webcmd · 30 tokens

moli-webfetch

Fetch, inspect, crawl, and capture live, JavaScript-rendered websites with Moli. Use when Codex needs current web content, web research, fact lookup, link following, a bounded crawl, client-rendered or response-gated content, network diagnostics, or a standalone HTML, Markdown, JSON, semantic-tree, viewport or…

lexmount/moli · 90 tokens

moli-cdp-server

Start Moli's CDP server and connect Playwright, Puppeteer, or raw CDP clients. Use to run a headless-browser CDP endpoint, replace a Chromium process, attach over CDP, enable real layout and screenshot surfaces, or diagnose CDP discovery, connection, and target startup—even when Moli is not named.

lexmount/moli · 74 tokens

opensteer

Direct browser control via CDP. Use when the user wants to automate, inspect, scrape, test, or interact with web pages.

steerlabs/opensteer · 31 tokens

apitap

ApiTap gives AI agents cheap access to web data through three layers.

n1byn1kt/apitap · 0 tokens

shadow-web

Browser automation for Cursor via Shadow Web MCP and shadow-web exec: detail levels (minimal/terse/xml/full), page classifier, shadowgrep, navigate/click/fill by data-sid, SchemaSnap, diff snapshots, self-healing, Camoufox. Use when browsing the web, scraping, running shadow-web exec, compressing HTML, or when the…

ulinycoin/shadow-web · 97 tokens