Skip to main content

Skills

Skills teach coding agents how to use playwright-cli effectively, providing structured reference documentation that agents can discover and use.

Installing skills

playwright-cli install --skills # Claude Code layout (default)
playwright-cli install --skills=agents # .agents/skills layout
playwright-cli install --skills -g # install into the home directory

The skill is copied to .claude/skills/playwright-cli (or .agents/skills/playwright-cli) in the current workspace. With --global (alias -g) it goes to ~/.claude/skills or ~/.agents/skills instead, making it available in every project.

What skills provide

SKILL.md covers the command surface — core interactions, snapshots and refs, sessions, raw output, and the open/attach parameters — and links to detailed reference guides for specific tasks:

  • Running and Debugging Playwright tests — run, debug and manage Playwright test suites
  • Request mocking — intercept and mock network requests
  • Running Playwright code — execute arbitrary Playwright scripts with run-code
  • Browser session management — manage multiple browser sessions, attach and detach
  • Storage state (cookies, localStorage) — persist and restore browser state
  • Test generation — plan, generate and heal Playwright tests
  • Tracing — record and inspect execution traces
  • Video recording — capture browser session videos, including scripted hero videos
  • Inspecting element attributes — get element attributes not visible in snapshots

Skills-less operation

You can use playwright-cli without installing skills. Point your agent at the CLI and let it discover commands:

Test the "add todo" flow on https://demo.playwright.dev/todomvc using playwright-cli.
Check playwright-cli --help for available commands.

Supported agents

Skills work with:

  • Claude Code
  • GitHub Copilot
  • Cursor
  • Any coding agent that supports locally installed skills