playwright-skill

playwright-skill is a skill for Claude Code, Codex from GetKlai/klai. It costs 69 tokens per session (1,842 once invoked), scanned A, a copy of playwright-skill, MIT.

A browser automation guide built around Playwright, a tool for controlling web browsers with code. It covers reusable test scripts, screenshots, responsive layouts, login flows, link checks, and other browser tasks.

In plain words
What is it for?
Use it to test websites, automate clicks and form submissions, check login journeys and links, capture screenshots, and validate responsive or user-facing behaviour.
Why use it?
It removes repetitive manual browser checks and provides a way to verify how a website behaves at different screen sizes and through user flows.

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

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 playwright-skill

README.md
[![agentmods](https://agentmods.dev/badge/skills/getklai/klai/playwright-skill.svg)](https://agentmods.dev/skills/getklai/klai/playwright-skill)
Your own site
<a href="https://agentmods.dev/skills/getklai/klai/playwright-skill"><img src="https://agentmods.dev/badge/skills/getklai/klai/playwright-skill.svg" alt="Measured on agentmods" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,842 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% 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.00069 $0.01842
Opus 5 $0.00034 $0.00921
Sonnet 5 $0.00014 $0.00368
Haiku 4.5 $0.00007 $0.00184

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

Security

Grade A, and why

playwright-skill 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.

The scan reads SKILL.md. This mod also ships 2 executable files (lib/helpers.js, run.js), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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

100% identical to playwright-skill — 0 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.

.agents/skills/playwright-skill/SKILL.md · 216 lines

How it starts

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

Playwright Browser Automation

Write and execute focused Playwright scripts for the user's request. Prefer the skill's executor and helpers, but use the full Playwright API when needed.

Path resolution

This skill can be installed in several locations, so resolve its directory first. Set SKILL_DIR to the directory containing this SKILL.md file, then run the commands below as written:

export SKILL_DIR=<absolute path of the directory containing this SKILL.md>
export TMP_DIR="$(node -p 'require("node:os").tmpdir()')"

If shell state does not persist between commands, substitute the literal paths for $SKILL_DIR and $TMP_DIR in each command instead.

Common installation paths:

  • Plugin system: ~/.claude/plugins/marketplaces/playwright-skill/skills/playwright-skill
  • Manual global: ~/.claude/skills/playwright-skill
  • Project-specific: <project>/.claude/skills/playwright-skill

Workflow

  1. For localhost work, detect running servers before writing a URL:

    node -e "require('$SKILL_DIR/lib/helpers').detectDevServers().then(s => console.log(JSON.stringify(s)))"
    

    Use the only result automatically. Ask which URL to use when there are multiple results. Ask for a URL or offer to start a server when none exist.

  2. Write reusable scripts to $TMP_DIR/playwright-test-*.js unless the user asks to save them in the project. Use PW_SCRIPT_DIR to preserve scripts.

  3. Use a visible browser by default. Use headless: true only when requested or when the environment has no display.

  4. Put the target URL in a constant or environment variable.

  5. Run scripts with node "$SKILL_DIR/run.js" <script.js>.

  6. Report actions, failures, and artifact paths. Do not claim success without checking the resulting page.

Setup

Run once:

cd "$SKILL_DIR" && npm run setup

This installs Playwright and Chromium. Use cd "$SKILL_DIR" && npm run install-all-browsers when Firefox or WebKit is required.

Minimal example

Read the full file on GitHub · 216 lines

Files

What ships with it

5 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. 4d ago First seen · 216 lines · 69 tokens per session scan A 6dc254f55239

Subscribe to this mod's changes

playwright-skill is a skill published in the GitHub repository GetKlai/klai (11 stars, last pushed today), licensed MIT. It adds 69 tokens to every session and 1,842 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to playwright-skill, differing in 0 lines, and is treated as a copy.