agentleFS
wachawowachawo/claude-skills/skills/playwright/SKILL.md

playwright

Skill0 starsChanged 6 months agoMITView on GitHub

Use when the task requires automating a real browser from the terminal (navigation, form filling, snapshots, screenshots, data extraction, debugging user scenarios) via `playwright-cli` or the bundled wrapper script.

  • Installs packages

We split this skill into the rules it gives an agent

12 rules. 0 are common, 4 are distinctive, and 8 are very specific to this project.

  • 0

    Common

    Most of the 79 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Treat this skill as CLI-first automation.

    line 10
  2. Very specific:

    Before suggesting commands, check whether npx is available (the wrapper depends on it):

    line 14
  3. Very specific:

    If it is not available, stop and ask the user to install Node.js/npm (which provide npx).

    line 20
  4. Distinctive:

    Use the wrapper script:

    line 45
  5. Distinctive:

    If the user prefers a global install, that is also fine:

    line 56
  6. Distinctive:

    Prefer the wrapper unless the repository has already standardized on a global install.

    line 130
  7. Very specific:

    Always take a snapshot before using identifiers like e12.

    line 141
  8. Very specific:

    Prefer explicit commands over eval and run-code unless necessary.

    line 143
  9. Very specific:

    If you don't have a fresh snapshot, use placeholder references like eX and explain why.

    line 144
  10. Very specific:

    Use --headed when visual verification helps.

    line 145
  11. Very specific:

    When saving artifacts in this repository, use output/playwright/ and don't create new top-level artifact folders.

    line 146
  12. Distinctive:

    Default to CLI commands and scripts, not Playwright test specs.

    line 147

“Common” is measured: kept by at least 6 in 10 of the 79 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Playwright CLI Skill

Drive a real browser from the terminal with playwright-cli. Prefer the bundled wrapper script so the CLI works even without a global install. Treat this skill as CLI-first automation. Do not switch to @playwright/test unless the user explicitly asks for test files.

Prerequisite check (mandatory)

Before suggesting commands, check whether npx is available (the wrapper depends on it):

command -v npx >/dev/null 2>&1

If it is not available, stop and ask the user to install Node.js/npm (which provide npx). Give them these steps verbatim:

# Verify Node/npm are installed
node --version
npm --version

# If missing, install Node.js/npm, then:
npm install -g @playwright/cli@latest
playwright-cli --help

Once npx is available, switch to the wrapper script. A global playwright-cli install is optional.

Skill path (set once)

export CODEX_HOME="${CODEX_HOME:-$HOME/.codex}"
export PWCLI="$CODEX_HOME/skills/playwright/scripts/playwright_cli.sh"

User skills are installed under $CODEX_HOME/skills (default: ~/.codex/skills).

Quick start

Use the wrapper script:

"$PWCLI" open https://playwright.dev --headed
"$PWCLI" snapshot
"$PWCLI" click e15
"$PWCLI" type "Playwright"
"$PWCLI" press Enter
"$PWCLI" screenshot

If the user prefers a global install, that is also fine:

npm install -g @playwright/cli@latest
playwright-cli --help

Core workflow

  1. Open the page.
  2. Take a snapshot to get stable element references.
  3. Interact using the references from the latest snapshot.
  4. Take a fresh snapshot after navigation or significant DOM changes.
  5. Save artifacts (screenshot, pdf, traces) when useful.

Minimal cycle:

"$PWCLI" open https://example.com
"$PWCLI" snapshot
"$PWCLI" click e3
"$PWCLI" snapshot

When to re-snapshot

Take a new snapshot after:

  • navigation
  • clicking elements that change the UI substantially
  • opening/closing modals or menus
  • switching tabs

References can go stale. If a command fails due to a missing reference, take a new snapshot.

Recommended patterns

Filling and submitting a form

"$PWCLI" open https://example.com/form
"$PWCLI" snapshot
"$PWCLI" fill e1 "user@example.com"
"$PWCLI" fill e2 "password123"
"$PWCLI" click e3
"$PWCLI" snapshot

Debugging a user scenario with traces

"$PWCLI" open https://example.com --headed
"$PWCLI" tracing-start
# ...interactions...
"$PWCLI" tracing-stop

Working with multiple tabs

"$PWCLI" tab-new https://example.com
"$PWCLI" tab-list
"$PWCLI" tab-select 0
"$PWCLI" snapshot

Wrapper script

The wrapper script uses npx --package @playwright/cli playwright-cli so the CLI runs without a global install:

"$PWCLI" --help

Prefer the wrapper unless the repository has already standardized on a global install.

Reference material

Open only what you need:

  • CLI command reference: references/cli.md
  • Practical scenarios and troubleshooting: references/workflows.md

Guardrails

  • Always take a snapshot before using identifiers like e12.
  • Take a new snapshot whenever references look stale.
  • Prefer explicit commands over eval and run-code unless necessary.
  • If you don't have a fresh snapshot, use placeholder references like eX and explain why; don't bypass references with run-code.
  • Use --headed when visual verification helps.
  • When saving artifacts in this repository, use output/playwright/ and don't create new top-level artifact folders.
  • Default to CLI commands and scripts, not Playwright test specs.

Download now (ZIP)

  • Other versions91 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 37

    1. openai/skills★ 27k55% same
    2. netease-youdao/LobsterAI★ 6.2k47% same
    3. freestylefly/wesight★ 94147% same
    4. JetBrains/skills★ 38652% same
    5. matyasstoch/david-skills★ 5955% same
    6. z91772524-ai/pojia-next-mac★ 3955% same
    7. VoDaiLocz/kilo-kit-mcp★ 2855% same
    8. ingpoc/SKILLS★ 955% same
    9. 4gentic/obelus★ 854% same
    10. Envy-7z/katalyst★ 452% same

    27 more not listed

    Wrote their own version · 54

    1. openai/openai-agents-python★ 30ksame name
    2. prowler-cloud/prowler★ 15ksame name
    3. hyperdxio/hyperdx★ 9.9ksame name
    4. bluesky-social/atproto★ 9.7ksame name
    5. Kiln-AI/Kiln★ 5.2ksame name
    6. Gram-ax/gramax★ 609same name
    7. Mindrally/skills★ 275same name
    8. alexeykrol/claude-code-starter★ 194same name
    9. magnus919/agent-skills★ 162same name
    10. kandada/aacode★ 134same name

    44 more not listed

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • Used alongsideProjects with it also use develop-web-game, web-perf and 8 more.

    Other files people use alongside this one.

    Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
    • hebertzhuSkill

      develop-web-game

      Use when building or iterating on a web game and you need a tight implement-test-observe loop; prefer the bundled Playwright client, inspect screenshots and text state, and validate every meaningful change before moving on.

      Also in 4 projects that use this

    • OpenAISkill

      web-perf

      Analyzes web performance using Chrome DevTools MCP. Measures Core Web Vitals (FCP, LCP, TBT, CLS, Speed Index), identifies render-blocking resources, network dependency chains, layout shifts, caching issues, and accessibility gaps. Use when asked to audit, profile, debug, or optimize page load performance, Lighthouse scores, or site speed. Biases towards retrieval from current documentation over pre-trained knowledge.

      Also in 5 projects that use this

    • JetBrainsSkill

      doc

      Use when the task involves reading, creating, or editing `.docx` documents, especially when formatting or layout fidelity matters; prefer `python-docx` plus the bundled `scripts/render_docx.py` for visual checks.

      Also in 4 projects that use this

    • CloudflareSkill

      cloudflare-one

      Design, configure, troubleshoot, or review Cloudflare One Zero Trust and SASE deployments. Use cloudflare-one-migrations for migration planning from other vendors.

      Also in 3 projects that use this

    • hajekimSkill

      mcp-setup

      This skill should be used when the user wants to "Model Context Protocol", "MCP server", "MCP client", "standardized tool integration", "JSON-RPC agent tools", "LLM tool protocol", "connect agents to external tools", "MCP primitives", "FastMCP", "ADK MCPToolset", "plug-and-play agent tools", "MCP integration", "tool server for agents", "MCP tools", "agent plugin system", "MCP setup", "model context protocol integration", or build agents that use the standardized MCP protocol for tool and resource integration. Also responds to Korean: "모델 컨텍스트 프로토콜", "MCP 서버", "MCP 클라이언트", "표준화된 도구 통합", "플러그 앤 플레이 에이전트 도구", "ADK MCP 툴셋", "MCP 구성", "MCP 설정", "MCP 써보고 싶어", "MCP 툴 연결", "MCP 서버 만들어줘", "도구 표준화해줘", "플러그인 에이전트". Also responds to Japanese: "モデルコンテキストプロトコル", "MCPサーバー", "MCPクライアント", "標準化ツール統合", "MCPの設定", "MCPを使いたい", "MCP構成", "エージェントのプラグインシステム", "ツールサーバー", "MCPツール連携" Also responds to Chinese: "模型上下文协议", "MCP服务器", "MCP客户端", "标准化工具集成", "MCP配置", "想用MCP", "MCP构建", "智能体插件系统", "工具服务器", "MCP工具集成".. Apply this skill to design or implement the Model Context Protocol (MCP) agentic design pattern.

      Also in 3 projects that use this

    • CloudflareSkill

      turnstile-spin

      Set up, repair, or migrate to Cloudflare Turnstile bot verification in an existing frontend and backend, including server-side Siteverify.

      Also in 3 projects that use this

  • In this repository34 other files it gives its agents.

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.