playwright-skill

playwright-skill is a skill for Claude Code, Codex from huuanh20/awesome-ai-agent-skills. It costs 78 tokens per session (1,107 once invoked), scanned A, original, MIT.

A browser automation and testing tool based on Playwright, a framework for controlling real web browsers with code.

In plain words
What is it for?
Use it to test pages, fill forms, check links and login flows, take screenshots, inspect responsive layouts, and automate browser tasks.
Why use it?
It removes repetitive manual checking when you need to verify how a website behaves, looks, or responds to user actions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; installed under .agents/ (shared by several agents).

Good fit Use it to test pages, fill forms, check links and login flows, take screenshots, inspect responsive layouts, and automate browser tasks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/huuanh20/awesome-ai-agent-skills/playwright-skill
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 huuanh20/awesome-ai-agent-skills --skill playwright-skill
Clone the repo
git clone --depth 1 https://github.com/huuanh20/awesome-ai-agent-skills

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/huuanh20/awesome-ai-agent-skills/playwright-skill/github.svg)](https://agentmods.dev/skills/huuanh20/awesome-ai-agent-skills/playwright-skill)
Your own site
<a href="https://agentmods.dev/skills/huuanh20/awesome-ai-agent-skills/playwright-skill"><img src="https://agentmods.dev/badge/skills/huuanh20/awesome-ai-agent-skills/playwright-skill/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for playwright-skill

Your own site · 80×15
<a href="https://agentmods.dev/skills/huuanh20/awesome-ai-agent-skills/playwright-skill"><img src="https://agentmods.dev/badge/skills/huuanh20/awesome-ai-agent-skills/playwright-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,107 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.00078 $0.01107
Opus 5 $0.00039 $0.00553
Sonnet 5 $0.00016 $0.00221
Haiku 4.5 $0.00008 $0.00111

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

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

How it starts

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

IMPORTANT - Path Resolution: Determine the skill directory from where this SKILL.md was loaded. Replace $SKILL_DIR with that path in all commands below.

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

Playwright Browser Automation

CRITICAL WORKFLOW

Follow these steps in order for every request:

1. Detect dev servers (localhost testing — run this first, always):

cd $SKILL_DIR && node -e "require('./lib/helpers').detectDevServers().then(s => console.log(JSON.stringify(s)))"
  • 1 server found → use it automatically, inform user
  • Multiple found → ask user which one
  • None found → ask for URL or offer to start dev server

2. Write script to /tmp — never write to skill directory or user's project:

/tmp/playwright-test-<task>.js

3. Execute via run.js:

cd $SKILL_DIR && node run.js /tmp/playwright-test-<task>.js

Script Template

Every script must follow this structure:

const { chromium } = require('playwright');
const TARGET_URL = 'http://localhost:3001'; // detected or user-provided

(async () => {
  const browser = await chromium.launch({ headless: false });
  const page = await browser.newPage();
  try {
    // automation here
  } catch (e) {
    console.error('Error:', e.message);
  } finally {
    await browser.close();
  }
})();

Inline Execution

For quick one-off tasks, skip writing a file:

cd $SKILL_DIR && node run.js "
await page.goto('http://localhost:3001');
await page.screenshot({ path: '/tmp/shot.png', fullPage: true });
console.log('Done');
"

Use inline for: screenshots, element checks, page title. Use files for: multi-step flows, responsive tests, anything user might re-run.

Setup

cd $SKILL_DIR && npm run setup

Only needed once. Installs Playwright and Chromium.

Read the full file on GitHub · 139 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. 12d ago First seen · 139 lines · 78 tokens per session scan A c6d97b802bd8

Subscribe to this mod's changes

playwright-skill is a skill published in the GitHub repository huuanh20/awesome-ai-agent-skills (1 stars, last pushed 1mo ago), licensed MIT. It adds 78 tokens to every session and 1,107 once invoked, about $0.0004 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

generate

Generate Playwright tests. Use when user says "write tests", "generate tests", "add tests for", "test this component", "e2e test", "create test for", "test this page", or "test this feature".

adriannoes/awesome-agentic-ai · 51 tokens

init

Set up Playwright in a project. Use when user says "set up playwright", "add e2e tests", "configure playwright", "testing setup", "init playwright", or "add test infrastructure".

adriannoes/awesome-agentic-ai · 44 tokens

playwright-pro

Production-grade Playwright testing toolkit. Use when the user mentions Playwright tests, end-to-end testing, browser automation, fixing flaky tests, test migration, CI/CD testing, or test suites. Generate tests, fix flaky failures, migrate from Cypress/Selenium, sync with TestRail, run on BrowserStack. 55 templates…

adriannoes/awesome-agentic-ai · 77 tokens

migrate

Migrate from Cypress or Selenium to Playwright. Use when user mentions "cypress", "selenium", "migrate tests", "convert tests", "switch to playwright", "move from cypress", or "replace selenium".

adriannoes/awesome-agentic-ai · 50 tokens

fix

Fix failing or flaky Playwright tests. Use when user says "fix test", "flaky test", "test failing", "debug test", "test broken", "test passes sometimes", or "intermittent failure".

adriannoes/awesome-agentic-ai · 47 tokens

browser-testing-with-devtools

Tests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser. Use when you need to inspect the DOM, capture console errors, analyze network requests, profile performance, or verify visual output with real runtime data. Requires the chrome-devtools MCP server to be…

ishandutta2007/Awesome-Agent-Skills · 68 tokens