All skills
lexler avatar

/playwright-cli

@bacb49d
by Lada Kesselerlexler/skill-factory238 stars
61

Drive a browser from the terminal with playwright-cli: snapshot the page, then act on elements by ref. Use when automating browser interactions, filling web forms, testing UIs, or driving logged-in web apps from the command line.

Use this Skill: https://skilld.dev/gh/lexler/skill-factory/playwright-cli

This session only. Nothing lands on disk.

referencesattaching-to-chrome.md

≈367 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Driving a logged-in browser

To act inside a session that's already authenticated (an SSO'd internal app, a site behind a login you don't want to automate), attach to a running Chrome over the DevTools protocol instead of launching a fresh one.

Attach to a running Chrome

Start Chrome with remote debugging exposed, then attach:

playwright-cli attach --cdp=http://localhost:9222

The CLI also accepts a channel name when the browser isn't already listening:

playwright-cli attach --cdp=chrome
playwright-cli attach --cdp=msedge

Once attached, every command drives that real browser and its existing cookies and tabs. detach releases it and leaves the browser running; close would terminate it.

Persisting auth without attaching

When you control the launch, a persistent profile carries cookies between runs:

playwright-cli open --persistent
playwright-cli open --profile=/path/to/profile   # explicit directory

Or capture and replay storage state (cookies + localStorage):

playwright-cli state-save auth.json   # after logging in once
playwright-cli state-load auth.json   # in a later run

Notes

  • attach repoints the session slot to the attached browser. If a default session was already in use, attaching reuses that slot — name the session (-s=work) to keep them separate.
  • The underlying Chrome keeps running after detach; re-attach with the same --cdp endpoint to resume.

Source: SKILL.md on GitHub

1 warning2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    The skill provides a command-line interface for browser automation using a utility called playwright-cli. It allows an agent to navigate websites, interact with UI elements, and execute JavaScript within the browser. The primary security consideration is the potential for indirect prompt injection, as the agent processes untrusted content from external websites while possessing significant capabilities to interact with those sites.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: MEDIUM · 1 issue

Signed by skilld at bacb49d. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated 3 months ago

README badge

README badge for lexler/skill-factory/playwright-cli