Skip to content
fast-playwright logo

Fast Playwright

fast-playwright

Fast, persistent, and token-optimized browser automation using Playwright. Supports navigation, clicking, typing, screenshots, batch execution, and more. Use when working with web pages, browser automation, or when the user mentions browsing, clicking, or web scraping.

SKILL.md

Full skill instructions

Fast Playwright

This skill provides a persistent, headless browser environment optimized for LLM agents. It keeps the browser open between calls to enable fast interactions.

Setup

Run the installation script once to set up dependencies and download browsers:

node scripts/​install.js

Usage

All tools are executed via client.js. Arguments must be valid JSON.

node scripts/​client.js <tool_name> '<json_args>'

Options

OptionDescription
--session <id>Use isolated browser session (for multi-agent)
--headedShow browser window (default: headless)
--sessionsList active sessions
--stopStop the server

Multi-Agent Session Isolation

Each session gets its own isolated browser context (cookies, storage, page state):

# Agent A uses session "agent-a"
node scripts/​client.js --session agent-a browser_navigate '{"url": "https://site-a.com"}'

# Agent B uses session "agent-b" (completely isolated)
node scripts/​client.js --session agent-b browser_navigate '{"url": "https://site-b.com"}'

# List active sessions
node scripts/​client.js --sessions

# Without --session, uses shared "default" session
node scripts/​client.js browser_navigate '{"url": "https://example.com"}'

Sessions auto-expire after 15 minutes of inactivity.

Headed Mode (Visible Browser)

Add --headed to see the browser window:

node scripts/​client.js --headed browser_navigate '{"url": "https://example.com"}'

Note: The server must be restarted to switch between headed/​headless modes:

node scripts/​client.js --stop

Token Optimization

Most tools accept an expectation object to control output size:

{
  "expectation": {
    "includeSnapshot": false,
    "diffOptions": { "enabled": true }
  }
}

Tools Reference

Navigation

browser_navigate

Navigate to a URL.

node scripts/​client.js browser_navigate '{"url": "https://example.com"}'
browser_navigate_back

Go back to previous page.

node scripts/​client.js browser_navigate_back '{}'
browser_navigate_forward

Go forward to next page.

node scripts/​client.js browser_navigate_forward '{}'

Interaction

browser_click

Click an element. Supports CSS, text, role selectors.

node scripts/​client.js browser_click '{"selectors": [{"css": "button.submit"}]}'
browser_type

Type text into an element.

node scripts/​client.js browser_type '{"selectors": [{"css": "#search"}], "text": "query"}'
browser_press_key

Press a keyboard key.

node scripts/​client.js browser_press_key '{"key": "Enter"}'
browser_hover

Hover over an element.

node scripts/​client.js browser_hover '{"selectors": [{"css": ".menu-item"}]}'
browser_drag

Drag and drop between elements.

node scripts/​client.js browser_drag '{"startSelectors": [{"css": "#source"}], "endSelectors": [{"css": "#target"}]}'
browser_select_option

Select option in dropdown.

node scripts/​client.js browser_select_option '{"selectors": [{"css": "select#country"}], "values": ["US"]}'
browser_file_upload

Upload files to file input.

node scripts/​client.js browser_file_upload '{"paths": ["/​path/​to/​file.pdf"]}'
browser_handle_dialog

Handle alert/​confirm/​prompt dialogs.

node scripts/​client.js browser_handle_dialog '{"accept": true}'

Page State

browser_snapshot

Get accessibility snapshot of current page.

node scripts/​client.js browser_snapshot '{}'
browser_take_screenshot

Take a screenshot.

node scripts/​client.js browser_take_screenshot '{"filename": "page.png"}'
browser_evaluate

Evaluate JavaScript on page.

node scripts/​client.js browser_evaluate '{"function": "() => document.title"}'
browser_console_messages

Get console messages.

node scripts/​client.js browser_console_messages '{}'
browser_network_requests

Get network requests.

node scripts/​client.js browser_network_requests '{}'

Element Discovery

browser_find_elements

Find elements by text, role, tag, or attributes.

node scripts/​client.js browser_find_elements '{"searchCriteria": {"text": "Submit"}}'
browser_inspect_html

Extract and analyze HTML content.

node scripts/​client.js browser_inspect_html '{"selectors": [{"css": "main"}]}'

Tab Management

browser_tab_list

List all open tabs.

node scripts/​client.js browser_tab_list '{}'
browser_tab_new

Open a new tab.

node scripts/​client.js browser_tab_new '{"url": "https://example.com"}'
browser_tab_select

Select a tab by index.

node scripts/​client.js browser_tab_select '{"index": 0}'
browser_tab_close

Close a tab.

node scripts/​client.js browser_tab_close '{}'

Browser Control

browser_resize

Resize browser window.

node scripts/​client.js browser_resize '{"width": 1920, "height": 1080}'
browser_close

Close the browser.

node scripts/​client.js browser_close '{}'
browser_install

Install the configured browser.

node scripts/​client.js browser_install '{}'

Utilities

browser_wait_for

Wait for text to appear/​disappear or time to pass.

node scripts/​client.js browser_wait_for '{"text": "Loading complete"}'
node scripts/​client.js browser_wait_for '{"textGone": "Loading..."}'
node scripts/​client.js browser_wait_for '{"time": 2}'
browser_diagnose

Analyze page complexity and performance.

node scripts/​client.js browser_diagnose '{}'

Batch Execution

browser_batch_execute

Execute multiple steps in sequence. Highly recommended for forms.

node scripts/​client.js browser_batch_execute '{
  "steps": [
    {"tool": "browser_type", "arguments": {"selectors": [{"css": "#user"}], "text": "me"}},
    {"tool": "browser_type", "arguments": {"selectors": [{"css": "#pass"}], "text": "123"}},
    {"tool": "browser_click", "arguments": {"selectors": [{"css": "#login"}]}}
  ]
}'

Selector Types

All interaction tools support multiple selector strategies:

  • CSS: {"css": "#id"}, {"css": ".class"}, {"css": "button[type=submit]"}
  • Role: {"role": "button"}, {"role": "textbox", "text": "Search"}
  • Text: {"text": "Click me"}
  • Ref: {"ref": "e3"} (from previous snapshot)

Multiple selectors act as fallbacks:

{"selectors": [{"css": "#submit"}, {"role": "button", "text": "Submit"}]}

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View