/playwright-cli
Automates browser interactions for web testing, form filling, screenshots, and data extraction using playwright-cli. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, extract information from web pages,
$ npx -y skills add zebbern/claude-code-guide --skill playwright-cli --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/playwright-cli
Context preview
The summary Claude sees to decide when to auto-load this skill.
Automates browser interactions for web testing, form filling, screenshots, and data extraction using playwright-cli. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, extract information from web pages,
SKILL.md
playwright-cli.SKILL.mdname: playwright-cli
description: Automates browser interactions for web testing, form filling, screenshots, and data extraction using playwright-cli. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, extract information from web pages, mock network requests, manage browser sessions, or generate test code.
allowed-tools: Bash(playwright-cli:*)
Browser Automation with playwright-cli
> Comprehensive CLI-driven browser automation — navigate, interact, mock, debug, record, and generate tests without writing a single script file.
Quick Start
# Install and set up
playwright-cli install --skills
playwright-cli install-browser
# Open a browser and navigate
playwright-cli open https://playwright.dev
# Take a snapshot to see interactive elements (refs like e1, e2, e3...)
playwright-cli snapshot
# Interact using element refs from the snapshot
playwright-cli click e15
playwright-cli fill e5 "search query"
playwright-cli press Enter
# Take a screenshot
playwright-cli screenshot
# Close the browser
playwright-cli close
Golden Rules
1. **Always `snapshot` first** — identify element refs before interacting; never guess ref numbers 2. **Use `fill` for inputs, `click` for buttons** — `type` sends keystrokes one-by-one, `fill` replaces the entire value 3. **Named sessions for parallel work** — `-s=name` isolates cookies, storage, and tabs per session 4. **Save auth state** — `state-save auth.json` after login, `state-load auth.json` to skip login next time 5. **Trace before debugging** — `tracing-start` before the failing step, not after 6. **`run-code` for advanced scenarios** — when CLI commands aren't enough, drop into full Playwright API 7. **Clean up sessions** — `close` or `close-all` when done; `kill-all` for zombie processes 8. **Descriptive filenames** — `screenshot --filename=checkout-step3.png` not `screenshot` 9. **Mock external APIs only** — use `route` to intercept third-party services, not your own app 10. **Persistent profiles for stateful flows** — `--persistent` keeps cookies and storage across restarts
Command Reference
Core Interaction
playwright-cli open [url] # Launch browser, optionally navigate
playwright-cli goto <url> # Navigate to URL
playwright-cli snapshot # Show page elements with refs
playwright-cli snapshot --filename=snap.yaml # Save snapshot to file
playwright-cli click <ref> # Click an element
playwright-cli dblclick <ref> # Double-click
playwright-cli fill <ref> "value" # Clear and fill input
playwright-cli type "text" # Type keystroke by keystroke
playwright-cli select <ref> "option-value" # Select dropdown option
playwright-cli check <ref> # Check a checkbox
playwright-cli uncheck <ref> # Uncheck a checkbox
playwright-cli hover <ref> # Hover over element
playwright-cli drag <src-ref> <dst-ref> # Drag and drop
playwright-cli upload <ref> ./file.pdf # Upload a file
playwright-cli eval "document.title" # Evaluate JS expression
playwright-cli eval "el => el.textContent" <ref> # Evaluate on element
playwright-cli close # Close the browser
Navigation
playwright-cli go-back # Browser back button
playwright-cli go-forward # Browser forward button
playwright-cli reload # Reload current page
Keyboard & Mouse
playwright-cli press Enter # Press a key
playwright-cli press ArrowDown # Arrow keys
playwright-cli keydown Shift # Hold key down
playwright-cli keyup Shift # Release key
playwright-cli mousemove 150 300 # Move mouse to coordinates
playwright-cli mousedown [right] # Mouse button down
playwright-cli mouseup [right] # Mouse button up
playwright-cli mousewheel 0 100 # Scroll (deltaX, deltaY)
Dialogs
playwright-cli dialog-accept # Accept alert/confirm/prompt
playwright-cli dialog-accept "text" # Accept prompt with input
playwright-cli dialog-dismiss # Dismiss/cancel dialog
Tabs
playwright-cli tab-list # List all open tabs
playwright-cli tab-new [url] # Open new tab
playwright-cli tab-select <index> # Switch to tab by index
playwright-cli tab-close [index] # Close tab (current or by index)
Screenshots & Media
playwright-cli screenshot # Screenshot current page
playwright-cli screenshot <ref> # Screenshot specific element
playwright-cli screenshot --filename=pg.png # Save with custom filename
playwright-cli pdf --filename=page.pdf # Save page as PDF
playwright-cli video-start # Start video recording
playwright-cli video-stop output.webm # Stop and save video
playwright-cli resize 1920 1080 # Resize viewport
Storage & Auth
playwright-cli state-save [file.json] # Save cookies + localStorage
playwright-cli state-load <file.json> # Restore saved state
playwright-cli cookie-list [--domain=...] # List cookies
playwright-cli cookie-get <name> # Get specific cookie
playwright-cli cookie-set <name> <value> [opts] # Set a cookie
playwright-cli cookie-delete <name> # Delete a cookie
playwright-cli cookie-clear # Clear all cookies
playwright-cli localstorage-list # List localStorage items
playwright-cli localstorage-get <key> # Get localStorage value
playwright-cli localstorage-set <key> <val> # Set localStorage value
playwright-cli localstorage-delete <key> # Delete localStorage item
playwright-cli localstorage-c
Read more
name: playwright-cli description: Automates browser interactions for web testing, form filling, screenshots, and data extraction using playwright-cli. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, extract information from web pages, mock network requests, manage browser sessions, or generate test code. allowed-tools: Bash(playwright-cli:*)
Browser Automation with playwright-cli
> Comprehensive CLI-driven browser automation — navigate, interact, mock, debug, record, and generate tests without writing a single script file.
Quick Start
# Install and set up playwright-cli install --skills playwright-cli install-browser # Open a browser and navigate playwright-cli open https://playwright.dev # Take a snapshot to see interactive elements (refs like e1, e2, e3...) playwright-cli snapshot # Interact using element refs from the snapshot playwright-cli click e15 playwright-cli fill e5 "search query" playwright-cli press Enter # Take a screenshot playwright-cli screenshot # Close the browser playwright-cli close
Golden Rules
1. **Always `snapshot` first** — identify element refs before interacting; never guess ref numbers 2. **Use `fill` for inputs, `click` for buttons** — `type` sends keystrokes one-by-one, `fill` replaces the entire value 3. **Named sessions for parallel work** — `-s=name` isolates cookies, storage, and tabs per session 4. **Save auth state** — `state-save auth.json` after login, `state-load auth.json` to skip login next time 5. **Trace before debugging** — `tracing-start` before the failing step, not after 6. **`run-code` for advanced scenarios** — when CLI commands aren't enough, drop into full Playwright API 7. **Clean up sessions** — `close` or `close-all` when done; `kill-all` for zombie processes 8. **Descriptive filenames** — `screenshot --filename=checkout-step3.png` not `screenshot` 9. **Mock external APIs only** — use `route` to intercept third-party services, not your own app 10. **Persistent profiles for stateful flows** — `--persistent` keeps cookies and storage across restarts
Command Reference
Core Interaction
playwright-cli open [url] # Launch browser, optionally navigate playwright-cli goto <url> # Navigate to URL playwright-cli snapshot # Show page elements with refs playwright-cli snapshot --filename=snap.yaml # Save snapshot to file playwright-cli click <ref> # Click an element playwright-cli dblclick <ref> # Double-click playwright-cli fill <ref> "value" # Clear and fill input playwright-cli type "text" # Type keystroke by keystroke playwright-cli select <ref> "option-value" # Select dropdown option playwright-cli check <ref> # Check a checkbox playwright-cli uncheck <ref> # Uncheck a checkbox playwright-cli hover <ref> # Hover over element playwright-cli drag <src-ref> <dst-ref> # Drag and drop playwright-cli upload <ref> ./file.pdf # Upload a file playwright-cli eval "document.title" # Evaluate JS expression playwright-cli eval "el => el.textContent" <ref> # Evaluate on element playwright-cli close # Close the browser
Navigation
playwright-cli go-back # Browser back button playwright-cli go-forward # Browser forward button playwright-cli reload # Reload current page
Keyboard & Mouse
playwright-cli press Enter # Press a key playwright-cli press ArrowDown # Arrow keys playwright-cli keydown Shift # Hold key down playwright-cli keyup Shift # Release key playwright-cli mousemove 150 300 # Move mouse to coordinates playwright-cli mousedown [right] # Mouse button down playwright-cli mouseup [right] # Mouse button up playwright-cli mousewheel 0 100 # Scroll (deltaX, deltaY)
Dialogs
playwright-cli dialog-accept # Accept alert/confirm/prompt playwright-cli dialog-accept "text" # Accept prompt with input playwright-cli dialog-dismiss # Dismiss/cancel dialog
Tabs
playwright-cli tab-list # List all open tabs playwright-cli tab-new [url] # Open new tab playwright-cli tab-select <index> # Switch to tab by index playwright-cli tab-close [index] # Close tab (current or by index)
Screenshots & Media
playwright-cli screenshot # Screenshot current page playwright-cli screenshot <ref> # Screenshot specific element playwright-cli screenshot --filename=pg.png # Save with custom filename playwright-cli pdf --filename=page.pdf # Save page as PDF playwright-cli video-start # Start video recording playwright-cli video-stop output.webm # Stop and save video playwright-cli resize 1920 1080 # Resize viewport
Storage & Auth
playwright-cli state-save [file.json] # Save cookies + localStorage playwright-cli state-load <file.json> # Restore saved state playwright-cli cookie-list [--domain=...] # List cookies playwright-cli cookie-get <name> # Get specific cookie playwright-cli cookie-set <name> <value> [opts] # Set a cookie playwright-cli cookie-delete <name> # Delete a cookie playwright-cli cookie-clear # Clear all cookies playwright-cli localstorage-list # List localStorage items playwright-cli localstorage-get <key> # Get localStorage value playwright-cli localstorage-set <key> <val> # Set localStorage value playwright-cli localstorage-delete <key> # Delete localStorage item playwright-cli localstorage-c
Claude Code Guide - Setup, Commands, workflows, agents, skills & tips-n-tricks from beginner to power user!
Repo: zebbern/claude-code-guide
Other skills on claude-code-guide.
- /academic-paper-reviewer
Simulates academic peer review, evaluating papers across Originality, Methodology, Results, and Writing to provide Major/Minor Revision recommendations with actionable feedback. Triggers when a user asks to \"review my paper,\" \"simulate peer review,\" or \"give my paper a peer
Open skill - /active-directory-attacks
This skill should be used when the user asks to "attack Active Directory", "exploit AD", "Kerberoasting", "DCSync", "pass-the-hash", "BloodHound enumeration", "Golden Ticket", "Silver Ticket", "AS-REP roasting", "NTLM relay", or needs guidance on Windows domain penetration
Open skill - /api-fuzzing-bug-bounty
This skill should be used when the user asks to "test API security", "fuzz APIs", "find IDOR vulnerabilities", "test REST API", "test GraphQL", "API penetration testing", "bug bounty API testing", or needs guidance on API security assessment techniques.
Open skill - /api-shape-explorer
Generate multiple radically different interface designs for a module using parallel sub-agents. Use when user wants to design an API, explore interface options, compare module shapes, or mentions "design it twice".
Open skill - /audit-flow
Interactive system flow tracing across CODE, API, AUTH, DATA, NETWORK layers with SQLite persistence and Mermaid export. Use for security audits, compliance documentation, flow tracing, feature ideation, brainstorming, debugging, architecture reviews, or incident post-mortems.
Open skill - /authentication-patterns
Authentication patterns: session vs JWT vs OAuth comparison, provider selection (NextAuth, Clerk, Supabase Auth), security checklist, and common mistakes. Use when implementing auth, reviewing auth flows, or choosing auth providers.
Open skill

