Help us improve
Share bugs, ideas, or general feedback.
From patchright-cli
Provides undetected browser automation via Patchright (Playwright fork) that bypasses Cloudflare, Akamai, and similar bot protections. Use for scraping, form filling, login, and screenshot tasks that fail with regular Playwright.
npx claudepluginhub ahaimk01/patchright-cli --plugin patchright-cliHow this skill is triggered — by the user, by Claude, or both
Slash command
/patchright-cli:patchright-cliThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
patchright-cli drives a real Chrome browser that passes bot detection (Cloudflare, Akamai, etc.). It works as a CLI: you issue commands, get back page state. This is the tool to reach for whenever regular Playwright or Chrome DevTools gets blocked.
CLI for browser automation: navigate sites, snapshot elements for refs, fill forms, click buttons, screenshot, scrape data, test web apps. Chains commands, imports auth state.
CLI for AI agents to automate browser tasks: open sites, snapshot DOM refs, fill forms, click elements, screenshot, extract data, test web apps.
Bypasses bot detection for stealth web browsing and content extraction using Patchright (Playwright fork), Xvfb virtual display, and headed Chromium to access personal content on protected sites.
Share bugs, ideas, or general feedback.
patchright-cli drives a real Chrome browser that passes bot detection (Cloudflare, Akamai, etc.). It works as a CLI: you issue commands, get back page state. This is the tool to reach for whenever regular Playwright or Chrome DevTools gets blocked.
patchright-cli open https://example.com # launch browser + navigate
patchright-cli snapshot # get element refs
# read the snapshot YAML to find the right ref, then:
patchright-cli click e5 # interact by ref
patchright-cli fill e3 "search query" # type into an input
patchright-cli press Enter # press a key
patchright-cli screenshot # capture the page
patchright-cli close # done
Every interaction follows: open -> snapshot -> read refs -> interact -> snapshot again -> repeat. Refs are ephemeral -- they change on every page update. If a ref fails, re-snapshot.
Commands can be chained with &&. The browser persists via a background daemon, so chaining is safe.
# Chain when you don't need intermediate output
patchright-cli open https://example.com && patchright-cli screenshot
# Run separately when you need to read refs first
patchright-cli snapshot # read refs from output
patchright-cli click e5 # use discovered ref
These go before the command:
--headless # Run headless (default: headed -- headed is less detectable)
--persistent # Use persistent profile (keeps cookies/storage across sessions)
--profile=/path # Custom profile directory
--proxy=<url> # Proxy server (http, https, socks5) -- supports user:pass@host auth
-s=mysession # Named session (default: "default", or PATCHRIGHT_CLI_SESSION env var)
--port=9322 # Custom daemon port (default: 9321)
--config=<path> # Load options from JSON config file
--cdp=<url> # Attach to Chrome via CDP endpoint (use with `attach` command)
--device="iPhone 15" # Emulate a device
--viewport-size=1280x720 # Set viewport size
--locale=en-US # Browser locale
--timezone=America/New_York # Timezone ID
--geolocation=40.7,-74.0 # Geolocation override (lat,lon)
--user-agent=<ua> # Custom user agent string
--grant-permissions=geolocation,camera # Grant permissions at launch
--timeout-action=10000 # Default action timeout (ms)
--timeout-navigation=30000 # Default navigation timeout (ms)
--show-port=9322 # Dashboard port (default: 9322)
--raw # Strip page/snapshot decorations from output
--json # Wrap full response as JSON ({success, output, ...})
open [url] # Launch browser (optionally navigate)
open --persistent # Keep cookies/storage between runs
open --headless # Headless mode
attach --cdp=<url> # Attach to existing Chrome via CDP
close # Close session (closes the browser)
detach # Detach an attached session (keeps external browser running)
goto <url> # Navigate to URL
go-back / go-forward # History navigation
reload # Reload page
url # Print current URL
title # Print page title
snapshot # Full page snapshot
snapshot <ref> # Subtree of a specific element
snapshot --depth=N # Limit depth
snapshot -i # Interactive elements only
snapshot --boxes # Append [box=x,y,w,h] to each [ref=eN] line
click <ref> # Left-click (smart: navigates links directly)
click <ref> right # Right-click
click <ref> --modifiers=Alt # Click with modifier keys
dblclick <ref> # Double-click
hover <ref> # Hover
drag <ref> <target-ref> # Drag element to target
drop <ref> --path=./file.png # Drop file onto element (HTML5 drop from outside)
drop <ref> --data="text/plain=hello" # Drop arbitrary MIME data
fill <ref> "value" # Clear field and type value
fill <ref> "value" --submit # Fill and press Enter
type "text" # Type via keyboard (no target)
type "text" --submit # Type and press Enter
select <ref> "option" # Select dropdown option
check <ref> / uncheck <ref> # Checkbox/radio
text <ref> # Get text content by ref
text "css-selector" # Get text by CSS selector
screenshot # Page screenshot
screenshot <ref> # Element screenshot
screenshot --full-page # Full scrollable page
screenshot --filename=F # Custom filename
scroll <dx> <dy> # Scroll by pixels
scroll-to <ref> # Scroll element into view
wait <ms> # Wait N milliseconds
wait-for <ref> # Wait until element visible
wait-for <ref> --state=hidden # Wait until hidden
press <key> # Keypress (Enter, ArrowDown, etc.)
keydown <key> / keyup <key> # Hold/release key
mousemove <x> <y> # Move to coordinates
mousedown / mouseup # Button down/up
mousewheel <dx> <dy> # Scroll wheel
tab-list # List open tabs
tab-new <url> # Open new tab
tab-select <index> # Switch to tab
tab-close [index] # Close tab
Dialogs must be pre-armed before the action that triggers them:
dialog-accept # Accept next dialog
dialog-accept "OK" # Accept with text input
dialog-dismiss # Dismiss next dialog
console # Show console messages
console warning # Filter by level
network # Show network requests (each line is `#<id> METHOD STATUS URL`)
requests # Alias for `network`
network --static # Include static assets
request <id> # Full detail for one request (headers + body)
request <id> --body # Also fetch response body
generate-locator <ref> # Emit Playwright locator string for a ref
highlight <ref> # Persistent overlay on element [--style=CSS]
highlight <ref> --hide # Remove overlay; `highlight --hide` clears all
screenshot / pdf # Static capture
video-start / video-stop # Video recording
tracing-start / tracing-stop # Playwright trace
codegen / codegen-stop # Record interactions as script
resize <w> <h> # Viewport resize
upload <file> [ref] # File upload
show # Live dashboard
cookie-list / cookie-get / cookie-set / cookie-delete / cookie-clear
cookie-export / cookie-import
localstorage-list / localstorage-get / localstorage-set / localstorage-delete / localstorage-clear
sessionstorage-list / sessionstorage-get / sessionstorage-set / sessionstorage-delete / sessionstorage-clear
state-save <file> / state-load <file>
route "<pattern>" [options] # Mock requests (--status, --body, --content-type, --header)
route-list / unroute # Manage routes
network-state-set offline # Simulate offline
network-state-set online # Restore connectivity
list # List active sessions
close-all # Close all sessions
kill-all # Force-kill all + stop daemon
delete-data # Delete session profile data
grant-permissions <perms> # Grant browser permissions
patchright-cli open https://example.com/login --persistent
patchright-cli snapshot
patchright-cli fill e3 "user@example.com"
patchright-cli fill e5 "password123"
patchright-cli click e8
patchright-cli snapshot
# With --persistent, cookies survive across sessions
patchright-cli open https://example.com/data
patchright-cli snapshot
cat > /tmp/extract.js << 'JSEOF'
JSON.stringify(
[...document.querySelectorAll('table tr')].map(row =>
[...row.cells].map(cell => cell.textContent.trim())
)
)
JSEOF
patchright-cli eval --file=/tmp/extract.js
patchright-cli --proxy=http://host:port open https://example.com
patchright-cli --proxy=socks5://host:port open https://example.com
patchright-cli --proxy=http://user:pass@host:port open https://example.com
patchright-cli dialog-accept # Arm before triggering action
patchright-cli click e5 # This click triggers the dialog
patchright-cli wait-for e12 # Wait for element
patchright-cli wait 1000 # Fixed wait
# For custom conditions, use run-code (see references/running-code.md)
navigator.webdriver and other detection vectors automaticallyattach --cdp lets you connect to an existing Chrome instanceCreate .patchright-cli/config.json in your project directory (auto-discovered) or pass --config=<path>:
{
"headless": false,
"persistent": true,
"proxy": "http://proxy:8080",
"device": "iPhone 15",
"locale": "en-US",
"timezone": "America/New_York"
}
CLI flags always override config file values.
# Recommended -- always runs latest version
uvx patchright-cli <command>
# Or install globally
pip install patchright-cli
# Install for all detected agents (Claude Code, Cursor, Gemini, Codex, 40+ more)
npx skills add AhaiMk01/patchright-cli
Other methods:
# Via patchright-cli itself
pip install patchright-cli && patchright-cli install --skills
# Or just tell your agent:
# "Install patchright-cli skill from https://raw.githubusercontent.com/AhaiMk01/patchright-cli/main/skills/patchright-cli/SKILL.md"