agentleFS
brettatomsbrettatoms/agent-skills/playwright/SKILL.md

playwright

Skill3 starsChanged 10 months agoMITView on GitHub

Browser automation for web testing and interaction. Use for navigating pages, filling forms, clicking elements, taking screenshots, and inspecting page content. Maintains stateful browser session across commands.

  • Installs packages

55 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use doc, web-perf and 10 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.
  • 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 5 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 4 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

  • 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

  • kayamanSkill

    edit-article

    Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.

    Also in 4 projects that use this

  • OpenAISkill

    durable-objects

    Create and review Cloudflare Durable Objects. Use when building stateful coordination (chat rooms, multiplayer games, booking systems), implementing RPC methods, SQLite storage, alarms, WebSockets, or reviewing DO code for best practices. Covers Workers integration, wrangler config, and testing with Vitest. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.

    Also in 3 projects that use this

  • +2 more from openai

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 50 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use playwright-server for browser automation via curl commands.

    line 9

“Common” is measured: kept by at least 6 in 10 of the 50 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 Browser Automation Skill

Use playwright-server for browser automation via curl commands. The server maintains a stateful browser session.

Prerequisites

The server is installed at ~/.claude/bin/playwright-server.js. If not present:

cd ~/.claude/bin
npm init -y
npm install playwright
npx playwright install chromium

Server Lifecycle

# Start server (if not running)
curl -sf localhost:3210/health || (node ~/.claude/bin/playwright-server.js &>/dev/null & sleep 1)

# Check health
curl -sf localhost:3210/health

# Stop server
pkill -f playwright-server

Quick Reference

TaskCommand
Start browsercurl -s localhost:3210 -d '{"cmd":"start"}'
Navigatecurl -s localhost:3210 -d '{"cmd":"navigate","url":"URL"}'
Get snapshotcurl -s localhost:3210 -d '{"cmd":"snapshot"}'
Clickcurl -s localhost:3210 -d '{"cmd":"click","selector":"SEL"}'
Fill inputcurl -s localhost:3210 -d '{"cmd":"fill","selector":"SEL","value":"VAL"}'
Screenshotcurl -s localhost:3210 -d '{"cmd":"screenshot"}'
Stop browsercurl -s localhost:3210 -d '{"cmd":"stop"}'

Core Commands

Browser Lifecycle

curl -s localhost:3210 -d '{"cmd":"start"}'              # Headless
curl -s localhost:3210 -d '{"cmd":"start","headless":false}'  # Headed
curl -s localhost:3210 -d '{"cmd":"stop"}'
curl -s localhost:3210 -d '{"cmd":"status"}'

Navigation

curl -s localhost:3210 -d '{"cmd":"navigate","url":"http://localhost:3000"}'
curl -s localhost:3210 -d '{"cmd":"back"}'
curl -s localhost:3210 -d '{"cmd":"reload"}'

Page Inspection

snapshot - Get accessibility tree (use to understand page structure):

curl -s localhost:3210 -d '{"cmd":"snapshot"}'

Example output:

- heading "Page Title" [level=1]
- navigation:
  - link "Home"
  - link "About"
- main:
  - textbox "Email"
  - textbox "Password"
  - button "Sign In"

screenshot - Capture page:

curl -s localhost:3210 -d '{"cmd":"screenshot"}'
curl -s localhost:3210 -d '{"cmd":"screenshot","path":"/tmp/shot.png"}'
curl -s localhost:3210 -d '{"cmd":"screenshot","fullPage":true}'

Basic Interactions

curl -s localhost:3210 -d '{"cmd":"click","selector":"button[type=submit]"}'
curl -s localhost:3210 -d '{"cmd":"fill","selector":"input[name=email]","value":"test@example.com"}'
curl -s localhost:3210 -d '{"cmd":"type","selector":"input","text":"query"}'
curl -s localhost:3210 -d '{"cmd":"press","key":"Enter"}'

Waiting

curl -s localhost:3210 -d '{"cmd":"wait","selector":".loaded"}'
curl -s localhost:3210 -d '{"cmd":"wait","selector":".spinner","state":"hidden"}'
curl -s localhost:3210 -d '{"cmd":"waitUrl","pattern":"**/dashboard"}'
curl -s localhost:3210 -d '{"cmd":"waitLoad","state":"networkidle"}'

Selector Basics

# CSS selectors
"button[type=submit]"
"#login-form input[name=email]"

# Text selectors
"text=Sign In"

# Role selectors
"role=button[name='Sign In']"

# Combining
"#form >> input[name=email]"

For complete selector strategies: See references/selectors.md

Additional References

  • All commands: See references/commands.md for interaction, inspection, wait, tab, and dialog commands
  • Selectors: See references/selectors.md for selector strategies
  • Workflows: See references/workflows.md for common workflows and troubleshooting

Download now (ZIP)

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.