Playwriter

作者 remorses525732a474a1無授權條款3.9K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫昨天更新

Control the user own Chrome browser via Playwriter extension with Playwright code snippets in a stateful local js sandbox. 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 cli for navigating JS-heavy websites (Instagram, Twitter, cookie/login walls, lazy-loaded UIs) instead of webfetch/curl. ALWAYS load this skill before using any playwriter commands

AI 產生的概覽

透過 Playwriter 擴充功能在本地 JS 沙箱中執行 Playwright 程式碼片段,控制使用者現有的 Chrome 瀏覽器。

功能
此技能指示代理透過 Playwriter 擴充功能操作使用者自己的 Chrome 瀏覽器,在具狀態的本地 JavaScript 沙箱中執行 Playwright 程式碼片段。內容涵蓋工作階段建立、頁面導覽以及與 JavaScript 密集型頁面的互動,並要求代理在每個工作階段首次執行命令前完整閱讀 playwriter 文件。產出為瀏覽器自動化操作與頁面狀態,而非檔案。
適用情境
適用於在使用者現有 Chrome 工作階段中自動化瀏覽,尤其是 JavaScript 密集型網站、Cookie 或登入牆以及延遲載入介面,這些情況下一般抓取或 curl 會失敗。它也被定位為其他會啟動新瀏覽器的 Playwright MCP 替代方案。
執行需求
需要在使用者 Chrome 中安裝 Playwriter 瀏覽器擴充功能,並具備 playwriter CLI(或 npx/bunx playwriter@latest)、本地 JavaScript 沙箱以及對目標網站的網路存取。此技能不附帶指令碼,僅為說明文件。

Read Full Documentation (once per session)

Before the first playwriter command in a session, run:

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 examples below will fail without understanding timeouts, selector rules, and pitfalls from the full docs. You only need to do this once per session; subsequent playwriter commands in the same session do not require re-reading.

Read the ENTIRE output. Do NOT pipe through head, tail, or any truncation command. Critical rules are spread throughout the document, not just at the top.

Minimal Example (after reading full docs)

bash
playwriter session newplaywriter -s 1 -e 'state.page = await context.newPage(); await state.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.

來源與署名

來源:remorses/playwriter位於skills/playwriter提交525732a

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架