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.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "fast-playwright" with this command: npx skills add tontoko/fast-playwright-skill/tontoko-fast-playwright-skill-fast-playwright

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"}]}

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

openclaw-version-monitor

监控 OpenClaw GitHub 版本更新,获取最新版本发布说明,翻译成中文, 并推送到 Telegram 和 Feishu。用于:(1) 定时检查版本更新 (2) 推送版本更新通知 (3) 生成中文版发布说明

Archived SourceRecently Updated
Coding

ask-claude

Delegate a task to Claude Code CLI and immediately report the result back in chat. Supports persistent sessions with full context memory. Safe execution: no data exfiltration, no external calls, file operations confined to workspace. Use when the user asks to run Claude, delegate a coding task, continue a previous Claude session, or any task benefiting from Claude Code's tools (file editing, code analysis, bash, etc.).

Archived SourceRecently Updated
Coding

ai-dating

This skill enables dating and matchmaking workflows. Use it when a user asks to make friends, find a partner, run matchmaking, or provide dating preferences/profile updates. The skill should execute `dating-cli` commands to complete profile setup, task creation/update, match checking, contact reveal, and review.

Archived SourceRecently Updated