playwright-skill

playwright-skill is a skill for Claude Code, Codex from Agent-Threat-Rule/agent-threat-rules. It costs 60 tokens per session (3,343 once invoked), scanned A, original, MIT.

A browser automation guide built around Playwright, a tool for controlling web browsers with code. It includes steps for finding a local development server before testing.

In plain words
What is it for?
Use it to write and run browser tests or other scripted browser tasks against a local or hosted web application.
Why use it?
It provides a repeatable way to exercise websites instead of checking them manually, while avoiding commands aimed at the wrong project server.

Skill for Claude CodeCodex

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

Good fit Use it to write and run browser tests or other scripted browser tasks against a local or hosted web application.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/agent-threat-rule/agent-threat-rules/playwright
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.

Any agent
npx skills add Agent-Threat-Rule/agent-threat-rules --skill playwright
Clone the repo
git clone --depth 1 https://github.com/Agent-Threat-Rule/agent-threat-rules

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/agent-threat-rule/agent-threat-rules/playwright.svg)](https://agentmods.dev/skills/agent-threat-rule/agent-threat-rules/playwright)
Your own site
<a href="https://agentmods.dev/skills/agent-threat-rule/agent-threat-rules/playwright"><img src="https://agentmods.dev/badge/skills/agent-threat-rule/agent-threat-rules/playwright.svg" alt="Measured on agentmods" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,343 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00060 $0.03343
Opus 5 $0.00030 $0.01672
Sonnet 5 $0.00012 $0.00669
Haiku 4.5 $0.00006 $0.00334

Measured 2d ago against content hash cd34e7487c26, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, 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 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

Copies of this mod

1 near-identical copy found in the catalogue:

data/skills-sh/skills/sickn33/playwright-skill.md · 465 lines

How it starts

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

IMPORTANT - Path Resolution: This skill can be installed in different locations (plugin system, manual installation, global, or project-specific). Before executing any commands, determine the skill directory based on where you loaded this SKILL.md file, and use that path in all commands below. Replace $SKILL_DIR with the actual discovered path.

Common installation paths:

  • Plugin system: <plugin-root>/skills/playwright-skill
  • Manual global: <agent-home>/skills/playwright-skill
  • Project-specific: <project>/.agent/skills/playwright-skill

Playwright Browser Automation

General-purpose browser automation skill. I'll write custom Playwright code for any automation task you request and execute it via the universal executor.

CRITICAL WORKFLOW - Follow these steps in order:

  1. Auto-detect dev servers - For localhost testing, ALWAYS run server detection FIRST:

    cd $SKILL_DIR && node -e "require('./lib/helpers').detectDevServers().then(servers => console.log(JSON.stringify(servers)))"
    
    • If 1 server found: Use it automatically, inform user
    • If multiple servers found: Ask user which one to test
    • If no servers found: Ask for URL or offer to help start dev server
  2. Write scripts to /tmp - NEVER write test files to skill directory; always use /tmp/playwright-test-*.js

  3. Use visible browser by default - Always use headless: false unless user specifically requests headless mode

  4. Parameterize URLs - Always make URLs configurable via environment variable or constant at top of script

How It Works

  1. You describe what you want to test/automate
  2. I auto-detect running dev servers (or ask for URL if testing external site)
  3. I write custom Playwright code in /tmp/playwright-test-*.js (won't clutter your project)
  4. I execute it via: cd $SKILL_DIR && node run.js /tmp/playwright-test-*.js
  5. Results displayed in real-time, browser window visible for debugging
  6. Test files auto-cleaned from /tmp by your OS

Read the full file on GitHub · 465 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 · 465 lines · 60 tokens per session scan A cd34e7487c26

Subscribe to this mod's changes

playwright-skill is a skill published in the GitHub repository Agent-Threat-Rule/agent-threat-rules (385 stars, last pushed today), licensed MIT. It adds 60 tokens to every session and 3,343 once invoked, about $0.0003 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-09-05.