This skill wraps Playwright CLI for browser automation from the terminal, navigation, form filling, screenshots, data extraction, the full suite. It bundles a wrapper script that uses npx so you don't need a global install, which is smart for ephemeral environments. The workflow is snapshot-driven: you open a page, snapshot to get stable element refs like e12, then interact using those refs. When the DOM changes or you navigate, you snapshot again. The guardrails push you toward explicit CLI commands over eval or run-code, and it defaults to CLI workflows instead of test specs. If you need to automate browsers without spinning up a test framework, this is the move.

skills.sh installs
185
GitHub stars
33.2K
last updated
Aug 21, 2026

Install

$ npx -y skills add davila7/claude-code-templates --skill playwright --agent claude-code

Installs into .claude/skills of the current project.

Files

Playwright CLI Skill

Drive a real browser from the terminal using playwright-cli. Prefer the bundled wrapper script so the CLI works even when it is not globally installed. Treat this skill as CLI-first automation. Do not pivot to @playwright/test unless the user explicitly asks for test files.

Prerequisite check (required)

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

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

If it is not available, pause and ask the user to install Node.js/npm (which provides npx). Provide 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 present, proceed with the wrapper script. A global install of playwright-cli is optional.

Skill path (set once)

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

User-scoped skills install under $CODEX_HOME/skills (default: ~/.codex/skills).

Quick start

Use the wrapper script:

Sponsors

Details

Repository
github.com/davila7/claude-code-templates
Categories
Frontend Development, Testing & QA, Debugging, Automation & Workflows, CLI & Terminal
First seen
Jun 3, 2026

More from davila7/claude-code-templates

All 618
1rand avatarelegant-designrand/cc-polymathCreate world-class, accessible, responsive interfaces with sophisticated interactive elements including chat, terminals, code display, and streaming content. Us184skills.sh installs
2google-labs-code avatarinkgoogle-labs-code/design.mdInk terminal renderer for json-render that turns JSON specs into interactive terminal UIs. Use when working with @json-render/ink, building terminal UIs from JS169skills.sh installs
3rohitg00 avatarwiki-viewerrohitg00/pro-workflowRender a self-contained HTML viewer for a pro-workflow wiki. Pages, sources, claims, seed queue, page-link graph and full-text search all in one file. No extern153skills.sh installs
4raphaelsalaja avatarpseudo-elementsraphaelsalaja/userinterface-wikiAudit CSS for pseudo-element best practices and View Transitions API usage. Use when reviewing hover effects, decorative layers, or page transitions. Outputs fi139skills.sh installs
5thebushidocollective avatarreactflow-fundamentalsthebushidocollective/hanUse when building node-based UIs, flow diagrams, workflow editors, or interactive graphs with React Flow. Covers setup, nodes, edges, controls, and interactivit138skills.sh installs
6charleswiltgen avataraxiom-realitykit-refcharleswiltgen/axiomRealityKit API reference — Entity, Component, System, RealityView, Model3D, anchor types, material system, physics, collision, animation, audio, accessibility136skills.sh installs