Single-commit clean baseline after security scrub of niche-tells, project codenames, internal jargon, and contributor-email leaks. Contents: - 100 Rust crates (_primitives/_rust/) - 37 agent manifests (_manifests/) + generated specs (_generated/) - 67 user-invocable skills (skills/) - 33 hooks (hooks/) - Composition blocks (_blocks/) - Documentation (docs/, README.md) - TS adapter packages (_ts_packages/) - Assembler (_assembler/) - Roles (_roles/) - Templates (_templates/) - Forgejo CI (.forgejo/) Author: Denis Parfionovich <info@greendragon.info> License: see LICENSE.
4.1 KiB
4.1 KiB
| name | description |
|---|---|
| playwright-cli | Browser automation via Playwright CLI — UI testing, form filling, screenshots, scraping. Token-efficient alternative to MCP. Use when user asks to test UI, automate browser, take screenshots, fill forms, or scrape web pages. |
Browser Automation with playwright-cli
Overview
playwright-cli is a token-efficient CLI tool for browser automation. It saves the accessibility tree to disk and only passes a summary to the agent — ~90K tokens cheaper than MCP per task.
Run via: npx @playwright/cli <command> (installed globally would be just playwright-cli <command>)
Key Workflow Pattern
1. npx @playwright/cli open [url] — launch browser (headless by default)
2. npx @playwright/cli snapshot — get accessibility tree, identify element refs
3. npx @playwright/cli click <ref> — interact using refs from snapshot
4. npx @playwright/cli screenshot — capture result
5. npx @playwright/cli close — cleanup
For headed (visible) browser: npx @playwright/cli open --headed [url]
Essential Commands
Opening & Navigation
open [url]— launch browser (add--headedto see it)goto <url>— navigate to URLgo-back/go-forward— browser historyclose— close browser session
Page Interaction (use refs from snapshot)
click <ref>— click elementdblclick <ref>— double clickfill <ref> <text>— fill input fieldtype <text>— type text into focused elementselect <ref> <value>— select dropdown optioncheck <ref>/uncheck <ref>— checkboxeshover <ref>— hover over elementdrag <startRef> <endRef>— drag and dropupload <file>— file upload
Inspection
snapshot— capture page accessibility tree, get element refsscreenshot— take screenshot (saved to disk)pdf— export page as PDF
Keyboard & Mouse
press <key>— press key (Enter, Tab, etc.)keydown <key>/keyup <key>— key press/releasemousemove <x> <y>/mousedown/mouseup/mousewheel
Storage & Cookies
cookie-list/cookie-get <name>/cookie-set/cookie-deletelocalstorage-list/localstorage-get/localstorage-set/localstorage-deletesessionstorage-list/sessionstorage-get/sessionstorage-set
Network
route <pattern>— mock network requestsroute-list— list active mocksunroute [pattern]— remove mocksnetwork— list all network requests
DevTools & Recording
console [min-level]— list console messageseval <func> [ref]— evaluate JS on page or elementrun-code <code>— run Playwright code snippettracing-start/tracing-stop— trace recordingvideo-start/video-stop— video recording
Session Management
list— list browser sessionsclose-all— close all sessionskill-all— force kill stale sessions- Use
-s=<session>flag to work with named sessions (parallel testing)
Browser Options
- Chrome (default), Firefox, WebKit, Edge
--browser=firefoxto use different browser- Persistent profiles supported
Parallel UI Testing Pattern
For parallel sub-agent testing (recommended for form/UI validation):
Prompt to Claude Code:
"Use playwright-cli to test [feature]. Run 3 parallel sub-agents:
1. Happy path — valid inputs, expected flow
2. Edge cases — empty fields, special characters, very long input
3. Validation — invalid email, missing required fields, XSS attempts
Use headed browsers so I can see. Take screenshots of results."
Each sub-agent gets its own session via -s=<name> flag.
Tips
- Default is headless — add
--headedtoopencommand to see the browser - Always
snapshotfirst — to get element refs before interacting - Sessions for parallelism — use
-s=agent1,-s=agent2etc. for parallel agents - Screenshots for evidence — always take screenshots of test results
- Close sessions — always
closeorclose-allwhen done - Token efficiency — CLI saves accessibility tree to disk, only passes summary to agent