跳到正文
cccskills
免费在 GitHub 公开

playwright

Use when the task requires automating a real browser from the terminal (navigation, form filling, DOM snapshots, screenshots, data extraction, UI-flow debugging) via `playwright-cli` or the bundled wrapper script.

中文简介正在准备中。当前显示原文说明。

集成工具Playwright
查看安装方法

包含的文件(9)

  • SKILL.md3.8 KB
  • agents/openai.yaml313 B
  • assets/playwright-small.svg828 B
  • assets/playwright.png1.7 KB
  • LICENSE.txt11.3 KB
  • NOTICE.txt409 B
  • references/cli.md1.7 KB
  • references/workflows.md1.8 KB
  • scripts/playwright_cli.sh526 B

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Playwright CLI Skill

Drive a real browser from the terminal using playwright-cli. Prefer the bundled wrapper script so the CLI works even when it is not globally installed. Treat this skill as CLI-first automation. Do not pivot to @playwright/test unless the user explicitly asks for test files.

Prerequisite check (required)

Before proposing commands, check whether npx is available (the wrapper depends on it):

command -v npx >/dev/null 2>&1

If it is not available, pause and ask the user to install Node.js/npm (which provides npx). Provide these steps verbatim:

# Verify Node/npm are installed
node --version
npm --version

# If missing, install Node.js/npm, then:
npm install -g @playwright/cli@latest
playwright-cli --help

Once npx is present, proceed with the wrapper script. A global install of playwright-cli is optional.

Skill path (set once)

export PWCLI="<path-to-skill>/scripts/playwright_cli.sh"

Use the current skill directory for <path-to-skill>.

Quick start

Use the wrapper script:

"$PWCLI" open https://playwright.dev --headed
"$PWCLI" snapshot
"$PWCLI" click e15
"$PWCLI" type "Playwright"
"$PWCLI" press Enter
"$PWCLI" screenshot

If the user prefers a global install, this is also valid:

npm install -g @playwright/cli@latest
playwright-cli --help

Core workflow

  1. Open the page.
  2. Use a DOM snapshot to get stable element refs.
  3. Interact using refs from the latest snapshot.
  4. Re-snapshot after navigation or significant DOM changes.
  5. Capture artifacts (screenshot, pdf, traces) when useful.

snapshot returns text page state and element refs. It is not a screenshot. If the user asks for a screenshot or visual proof, run screenshot and report the image file path.

Minimal loop:

"$PWCLI" open https://example.com
"$PWCLI" snapshot
"$PWCLI" click e3
"$PWCLI" snapshot

When to snapshot again

Snapshot again after:

  • navigation
  • clicking elements that change the UI substantially
  • opening/closing modals or menus
  • tab switches

Refs can go stale. When a command fails due to a missing ref, snapshot again.

Recommended patterns

Form fill and submit

"$PWCLI" open https://example.com/form
"$PWCLI" snapshot
"$PWCLI" fill e1 "user@example.com"
"$PWCLI" fill e2 "password123"
"$PWCLI" click e3
"$PWCLI" snapshot

Debug a UI flow with traces

"$PWCLI" open https://example.com --headed
"$PWCLI" tracing-start
# ...interactions...
"$PWCLI" tracing-stop

Multi-tab work

"$PWCLI" tab-new https://example.com
"$PWCLI" tab-list
"$PWCLI" tab-select 0
"$PWCLI" snapshot

Wrapper script

The wrapper script uses npx --package @playwright/cli playwright-cli so the CLI can run without a global install:

"$PWCLI" --help

Prefer the wrapper unless the repository already standardizes on a global install.

References

Open only what you need:

  • CLI command reference: references/cli.md
  • Practical workflows and troubleshooting: references/workflows.md

Guardrails

  • Always snapshot before referencing element ids like e12.
  • Re-snapshot when refs seem stale.
  • Prefer explicit commands over eval and run-code unless needed.
  • When you do not have a fresh snapshot, use placeholder refs like eX and say why; do not bypass refs with run-code.
  • Use --headed when a visual check will help.
  • When capturing artifacts in this repo, use output/playwright/ and avoid introducing new top-level artifact folders.
  • Default to CLI commands and workflows, not Playwright test specs.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Build a period-end accrual schedule by computing each accrual, citing support, and drafting journal entries for controller approval. Use during month-end close; this drafts entries only and must not post them.

中文简介正在准备中。当前显示原文说明。

openinterpreter/interpreter-workstation282026年10月19日 更新

audit-xls

免费

Audit a spreadsheet for formula accuracy, errors, and common financial-model mistakes. Use for selected ranges, single sheets, or whole-workbook model checks including balance-sheet balance, cash tie-out, roll-forwards, and logic sanity.

中文简介正在准备中。当前显示原文说明。

openinterpreter/interpreter-workstation282026年10月19日 更新

Use this skill when the user needs advanced Playwright control of an already running browser session through Interpreter's app-managed browser bridge and the `builtin-js-repl` `js_repl` tool, after simple browser page work cannot be handled by the unified `builtin-interpreter` browser page tools.

中文简介正在准备中。当前显示原文说明。

openinterpreter/interpreter-workstation282026年10月19日 更新

Drive a native desktop app through Interpreter's builtin-cua-driver. Use get_app_state, click/type/scroll/drag, and verify by calling get_app_state again when the user asks to operate a real desktop app, browser chrome, native dialog, menu, secure prompt, file chooser, or hidden/background window.

中文简介正在准备中。当前显示原文说明。

openinterpreter/interpreter-workstation282026年10月19日 更新

doc

免费

Create, inspect, and edit Word documents (`.docx`) with local code-execution tools. Use for document drafting, structured edits, tables, comments, and layout-sensitive Word deliverables.

中文简介正在准备中。当前显示原文说明。

openinterpreter/interpreter-workstation282026年10月19日 更新

Design or revise Interpreter UI for non-developers with an ultra-minimal, utilitarian style inspired by the OpenAI website and ChatGPT, not the developer platform. Use when simplifying settings, onboarding, chat, forms, empty states, or helper copy; when removing extra containers, labels, or visual noise; when replacing technical wording with plain language; when clarifying hierarchy and making the main user action obvious; when making every visible label and status understandable to an average HR admin or other non-technical user; when hiding implementation details such as logs, IDs, endpoints, paths, or protocol names; or when a screen must respect the app's existing CSS variables and light/dark theme behavior.

中文简介正在准备中。当前显示原文说明。

openinterpreter/interpreter-workstation282026年10月19日 更新

查看 openinterpreter 的全部技能

报告此技能的问题