一键导入
playwriter
Drives the user's running Chrome via the Playwriter CLI. Use when the task needs their browser identity — cookies, logins, open tabs, profile.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Drives the user's running Chrome via the Playwriter CLI. Use when the task needs their browser identity — cookies, logins, open tabs, profile.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when writing skills, CLAUDE.md files, agent prompts, or any code/directive that involves shell commands, environment variables, API credentials, file creation, or git operations - prevents secrets leakage into LLM context, unsafe shell patterns, and credential exposure.
Use when writing or revising any instruction Claude will read - skills, CLAUDE.md files, agent prompts, system prompts, hook output. Covers token efficiency, compliance techniques, discovery, and per-format templates.
An independent advisor you shell out to for a second opinion. Use when planning complex changes, debugging across multiple files, making architecture decisions, reviewing your own work, or when a different perspective would help.
Review changed code for reuse, quality, and efficiency, then fix any issues found.
| name | playwriter |
| description | Drives the user's running Chrome via the Playwriter CLI. Use when the task needs their browser identity — cookies, logins, open tabs, profile. |
Control Chrome via the Playwriter CLI using Playwright code snippets executed in a sandboxed Node.js environment.
Always invoke Playwriter via npx:
npx playwriter@latest <command>
Use @latest for the first session command of a task to pick up the newest version.
Read the files relevant to your current task. Read setup.md and workflow.md first before any
automation task.
| File | Read when... |
|---|---|
setup.md | Starting a new session, Chrome isn't running, or using --direct CDP mode. |
workflow.md | Required before any task. Core rules, context variables, the observe→act→observe loop, and bash quoting. |
observation.md | You need to inspect page state: find elements, read text, check for errors, or decide between snapshot/screenshot. |
interaction.md | You need to click, type, scroll, drag, upload files, or take screenshots. |
navigation.md | Working with tabs, popups, iframes, dialogs, or managing the page lifecycle. |
obstacles.md | Clicks aren't working, a modal is blocking the page, or content isn't loading. |
scraping.md | Extracting data, intercepting network requests, downloading media, or using page.evaluate. |
recording.md | Recording videos or creating demo videos. |
advanced.md | Using CDP, debugger, live editor, React source inspection, or pinned elements. |
state.page stored in session state for all operations.snapshot() — you can't judge fine visual detail from a screenshot
yourself (observation.md).-e to prevent bash from corrupting JS code.npx playwriter@latest session new
npx playwriter@latest -s 1 -e 'state.page = context.pages().find((p) => p.url() === "about:blank") ?? (await context.newPage()); await state.page.goto("https://example.com", { waitUntil: "domcontentloaded" })'
workflow.md):
npx playwriter@latest -s 1 -e 'console.log("URL:", state.page.url()); await snapshot({ page: state.page }).then(console.log)'