`playwriter skill` output was ~58KB / 1302 lines. Agents (both Opus and Sonnet) consistently truncated with `head` or skimmed, missing critical sections like "working with pages" at line 606. Reduced to 44KB / 1019 lines (−283 lines, −24%) by: - Removing BAD examples from mistake sections, keeping only rules + correct patterns - Removing duplicated sections: "checking page state" (duplicated interaction loop), "debugging web apps" (duplicated observation channels), "capabilities" list (obvious from rest of doc), "links that open new tabs" (duplicate of mistake #10) - Condensing verbose sections: interaction feedback loop (removed ASCII diagram + Framer-specific 4-block example, replaced with compact generic example), getCleanHTML internals, recording prose, createDemoVideo (3 blocks → 1) - Integrated debugging recipe (snapshot + logs + evaluate) into the feedback loop section as "deeper observation" examples - Added explicit instruction in SKILL.md stub: "Do NOT pipe through head, tail, or any truncation command — read the entire output"
1.7 KiB
name, description
| name | description |
|---|---|
| playwriter | Control the user own Chrome browser via Playwriter extension with Playwright code snippets in a stateful local js sandbox via playwriter cli. Use this over other Playwright MCPs to automate the browser — it connects to the user's existing Chrome instead of launching a new one. Use this for JS-heavy websites (Instagram, Twitter, cookie/login walls, lazy-loaded UIs) instead of webfetch/curl. Run `playwriter skill` command to read the complete up to date skill |
REQUIRED: Read Full Documentation First
Before using playwriter, you MUST run this command:
playwriter skill
This outputs the complete documentation including:
- Session management and timeout configuration
- Selector strategies (and which ones to AVOID)
- Rules to prevent timeouts and failures
- Best practices for slow pages and SPAs
- Context variables, utility functions, and more
Do NOT skip this step. The quick examples below will fail without understanding timeouts, selector rules, and common pitfalls from the full docs.
Read the ENTIRE output. Do NOT pipe through head, tail, or any truncation command. The skill output must be read in its entirety — critical rules about timeouts, selectors, and common pitfalls are spread throughout the document, not just at the top.
Minimal Example (after reading full docs)
playwriter session new
playwriter -s 1 -e 'await page.goto("https://example.com")'
Always use single quotes for the -e argument. Single quotes prevent bash from interpreting $, backticks, and backslashes inside your JS code. Use double quotes or backtick template literals for strings inside the JS.
If playwriter is not found, use npx playwriter@latest or bunx playwriter@latest.