🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

Patchright Skill

by @smallnest

Patchright-based browser automation with bot detection bypass. Use when Claude needs to interact with local web applications, test localhost/dev servers, tak...

πŸ’‘ Examples

Login Test

cd ~/.claude/skills/patchright-skill
python scripts/server.py start &
sleep 2

Navigate to login page

python scripts/server.py call '{"tool": "navigate", "args": {"url": "http://localhost:3000/login"}}' python scripts/server.py call '{"tool": "screenshot", "args": {"path": "login_page.png"}}'

Fill form

python scripts/server.py call '{"tool": "type", "args": {"selector": "#email", "text": "admin@test.com"}}' python scripts/server.py call '{"tool": "type", "args": {"selector": "#password", "text": "admin123"}}' python scripts/server.py call '{"tool": "screenshot", "args": {"path": "login_filled.png"}}'

Submit

python scripts/server.py call '{"tool": "click", "args": {"selector": "button[type=submit]"}}' sleep 2 python scripts/server.py call '{"tool": "screenshot", "args": {"path": "login_result.png"}}'

App Navigation

# Enter app
python scripts/server.py call '{"tool": "navigate", "args": {"url": "http://localhost:3000"}}'
python scripts/server.py call '{"tool": "click", "args": {"selector": "body"}}'  # Click to enter
sleep 2
python scripts/server.py call '{"tool": "screenshot", "args": {"path": "app_main.png", "full_page": true}}'

Explore features

python scripts/server.py call '{"tool": "click", "args": {"selector": ".create-btn"}}' python scripts/server.py call '{"tool": "screenshot", "args": {"path": "after_action.png"}}'

πŸ“‹ Tips & Best Practices

"Server not running" error:

python scripts/server.py start &
sleep 2

Browser not visible:

  • headless=False is default, browser window should appear
  • In server mode, browser persists in background
  • Session disconnected:

  • Use scripts/server.py instead of scripts/executor.py
  • Server keeps session alive once started
  • Element not found:

  • Use wait_for to wait first
  • Verify selector in DevTools
  • View on ClawHub
    TERMINAL
    clawhub install patchright-skill

    πŸ§ͺ Use this skill with your agent

    Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

    πŸ” Can't find the right skill?

    Search 60,000+ AI agent skills β€” free, no login needed.

    Search Skills β†’