---
id: ssh2-playwriter
name: "playwriter"
url: https://skills.yangsir.net/skill/ssh2-playwriter
author: remorses
domain: ai-agent-external-interaction
tags: ["scriptwriting", "creative-writing", "storytelling", "ai-assisted-writing", "narrative-design"]
install_count: 3700
rating: 4.40 (76 reviews)
github: https://github.com/remorses/playwriter
---

# playwriter

> 通过Playwriter扩展和Playwright代码控制用户的Chrome浏览器。

**Stats**: 3,700 installs · 4.4/5 (76 reviews)

## Before / After 对比

### 通过Playwriter扩展控制浏览器

## Readme

## REQUIRED: Read Full Documentation First

**Before using playwriter, you MUST run this command:**

```bash
playwriter skill # IMPORTANT! do not use | head here. read in full!
```

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)

```bash
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`.


---
*Source: https://skills.yangsir.net/skill/ssh2-playwriter*
*Markdown mirror: https://skills.yangsir.net/api/skill/ssh2-playwriter/markdown*