Token导航 LogoToken导航

Agent Skill · 研究检索

run-playwright(RUN Playwright 搜索)

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

run-playwright 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 56,650。

总安装 447周安装 19GitHub Stars 5下载 157核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:run-playwright(RUN Playwright 搜索)
来源仓库:https://github.com/yigitkonur/skills-by-yigitkonur
仓库路径:skills/run-playwright
安装命令:
npx skills add https://github.com/yigitkonur/skills-by-yigitkonur --skill run-playwright
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/yigitkonur/skills-by-yigitkonur --skill run-playwright

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于辅助测试设计、自动化测试、用例整理和回归验证。适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑。涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

run-playwright 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/run-playwright

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/yigitkonur/skills-by-yigitkonur --skill run-pl…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

run-playwright 怎么安装?

在终端执行 npx skills add https://github.com/yigitkonur/skills-by-yigitkonur --skill run-playwright。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

run-playwright 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

run-playwright 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

run-playwright 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

run-playwright 用的人多吗?

公开数据是累计安装 447 次,近一周安装 19 次,下载 157 次,GitHub 5 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

run-playwright 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
run-playwright

RUN Playwright 搜索 · 本页

4475操作浏览器未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Playwright CLI

Use @anthropic-ai/playwright-cli to drive a live browser from the terminal. Keep this file focused on trigger logic, workflow, guardrails, and reference routing. Use references/ for detailed commands, edge cases, and larger patterns.

Invocation model — read this first. playwright-cli is a command-per-invocation CLI backed by persistent session state. Run each action from the shell as its own command, for example playwright-cli tab-list, playwright-cli open https://example.com, playwright-cli snapshot. There is no required > prompt workflow in the shipped CLI.

Trigger boundary

Use this skill when the task requires a real browser session and interactive CLI control:

  • open pages, navigate, and verify what actually rendered
  • fill forms, upload files, submit flows, and prove the result
  • manage tabs, popups, or session state during a live run
  • collect screenshots, console logs, network logs, or traces as evidence
  • use short run-code snippets only when the CLI lacks a direct command

Do not use this skill when:

  • the job is writing or reviewing Playwright test code instead of driving the CLI
  • plain HTTP fetching or static scraping is enough
  • the site needs Browserbase-style hosted browsing, anti-bot bypass, or remote browser routing; prefer run-agent-browser

Non-negotiable rules

  1. Prefer the current browser context when it already has the right state. Do not reset sessions or reinstall tools just because a browser exists.
  2. Prefer a new tab over a new window. Use a popup or new window only when the site forces one, such as OAuth or target=_blank flows.
  3. Keep a running tab map in your notes: index -> purpose -> expected URL/state. Refresh it after every tab-new, tab-close, tab-select, or popup event.
  4. Verify the active tab before every action. Use tab-list, tab-select if needed, eval "() => window.location.href", then snapshot.
  5. Follow observe -> act -> verify. Never chain blind actions across unknown state.
  6. Treat refs as disposable. Re-snapshot after navigation, SPA rerender, submission, tab switch, popup handling, or run-code.
  7. Use CLI commands first. Reach for run-code only for waits, popups, downloads, iframes/shadow DOM, or missing primitives; then immediately re-enter the snapshot loop.
  8. Treat screenshots as evidence, not default observation. Use snapshot for structure, eval for truth, screenshots for visual proof.
  9. Clean up only what you created. Close transient tabs and temporary sessions, but do not destroy shared or pre-existing contexts.

Recommended workflow

1) Attach or bootstrap

Only bootstrap when the CLI or browser support is missing:

which playwright-cli || npm install -g @anthropic-ai/playwright-cli@latest
playwright-cli install --browser=chrome   # always run — ensures browser binary exists
Steering experience: Always run playwright-cli install --browser=chrome even if the CLI is already installed. It is a no-op when the binary exists, but skipping it causes cryptic "browser not found" errors when the binary is missing. This is a one-second check that prevents a five-minute debug session.

When you need an isolated session (parallel work, risky experiments), add to bootstrap:

playwright-cli config --isolated
playwright-cli session-list
  • If an existing session or tab already contains the needed login or state, inspect it first instead of resetting everything.
  • Start a named session or isolated browser only when you need clean-room state, parallel isolation, or risky experimentation; use references/tabs.md for the exact bootstrap patterns.
  • For isolated scratch work, stop the session you created at cleanup time: use session-stop for the current unnamed isolated session or session-stop <name> for a named one.
  • Do not begin with session-stop-all unless you intentionally want to discard every active browser.
  • Session state persists behind the CLI. Inspect it with playwright-cli session-list. Artifacts such as snapshots, console output, and screenshots are usually written under .playwright-cli/ relative to the shell working directory; the printed path is the source of truth.

2) Establish tab and session ground truth

  • Run tab-list.
  • Decide whether to reuse the current tab or open a temporary work tab.
  • When you need a new work surface, use tab-new first and open <url> second.
  • For local fixtures, do not assume file://, localhost, or LAN URLs are reachable from the browser context. If open file:///... is blocked or open http://127.0.0.1:... fails from the session, switch to one of these paths:

- use a data: URL for a tiny self-contained fixture - expose the page on a publicly reachable staging/tunnel URL - stop and tell the user the current browser context cannot reach the local target

Steering experience: Do NOT use tab-new <url>. It is documented but unreliable — in testing it frequently opens about:blank instead of the requested URL. The safe two-step pattern is tab-new then open <url>.
  • Record the tab map before you continue.
  • If a popup or forced new window is expected, route to references/tabs.md before acting.

3) Observe before touching the page

Steering experience: snapshot writes a YAML accessibility-tree file to .playwright-cli/page-<timestamp>.yml and prints the file path, not the tree content. You must cat the file to read the actual refs. Example flow: ``bash playwright-cli snapshot # prints: Snapshot saved to .playwright-cli/page-1710456789.yml cat .playwright-cli/page-1710456789.yml # read the YAML to find refs like e0, e1, e5 ``

Use the cheapest command that gives trustworthy state:

playwright-cli snapshot
playwright-cli eval "() => window.location.href"

Add only the extra proof you need:

  • playwright-cli screenshot --filename=... for layout, visual regressions, or before/after evidence
  • playwright-cli eval "() => document.title" or more specific eval checks when correctness matters
  • playwright-cli console error and playwright-cli network when diagnosing failures or proving backend behavior
  • Treat playwright-cli eval "() => window.location.href" as the URL source of truth. The CLI's printed page metadata can lag or report about:blank after odd tab/navigation flows.

4) Act with the smallest direct command

The CLI has far more commands than just click and fill. Here is the task-focused command surface for this skill:

CategoryCommandsReference
Navigationopen, reload, go-back, go-forwardreferences/navigation.md
Inputsfill, fill --submit, type, type --submit, select, check, uncheckreferences/forms.md
Click / hoverclick, dblclick, hoverreferences/selectors.md
Keyboardpress <Key> (e.g., press Enter, press Tab, press Escape)references/forms.md
Viewportresize <w> <h>, mousewheel <deltaX> <deltaY>references/screenshots.md
Filesupload /absolute/path/to/file (file chooser must be active first)references/forms.md
Tabstab-new, tab-list, tab-select <i>, tab-close [i]references/tabs.md
Dialogsdialog-accept [text], dialog-dismissreferences/tabs.md
Screenshotsscreenshot [--full-page] [--filename=...], screenshot <ref>references/screenshots.md
PDFpdf --filename=...references/screenshots.md
Videovideo-start, video-stopreferences/screenshots.md
Observationsnapshot, eval "() =>...", eval "(el) =>..." <ref>references/selectors.md
Debug`console [error\warning\info], console --clear, network [--static], network --clear`references/debugging.md
Tracingtracing-start, tracing-stopreferences/debugging.md
Sessionssession-list, session-stop [name], session-stop-all, session-restart [name]references/tabs.md
Coderun-code 'async (page) => {...}'references/selectors.md

For session reuse, persisted auth, cookie/storage inspection, downloads, and route mocking, use references/patterns.md. The current CLI build handles those cases through named sessions, eval, and run-code, not dedicated state-save, cookie-*, localstorage-*, sessionstorage-*, or route shell subcommands.

Use direct commands with these rules:

  • use check for radios and checkboxes when possible; it is safer than blind click
  • after fill, select, or check, verify the live value with eval
  • for uploads, trigger the file chooser first, then call upload
  • if the page needs a wait, wait for a selector, URL, or response with run-code, then snapshot
Steering experience: The mousewheel <deltaX> <deltaY> parameter order may be swapped in some CLI versions (deltaY first, deltaX second). Always test with a small value first and verify with eval "() => window.scrollY" before relying on large scroll distances. See references/screenshots.md for details.

5) Verify immediately after each meaningful action

Steering experience: All artifact commands (console, network, snapshot, screenshot) write results to files, not to stdout. The CLI prints the file path; you must cat or inspect that file to see actual content. Never assume the page is clean or broken based on command output alone — always read the artifact file. Likewise, do not trust the header-style "Page URL" line over eval "() => window.location.href".

Use the lightest proof that actually confirms success:

GoalMinimum proof
Navigation or redirect workedeval "() => window.location.href" + snapshot
Form field changedeval "(el) => el.value" <ref> or eval "(el) => el.checked" <ref>
Upload succeededeval file list + screenshot if the UI must show the file
Visual state mattersscreenshot with descriptive filename + state proof
A bug or regression is suspectedconsole --clear / network --clear, reproduce, then cat returned artifact files
Steering experience: console --clear and network --clear produce no visible output — they succeed silently. This is expected behavior, not an error. Do not re-run them thinking they failed.

Use progressively stronger evidence when risk increases:

  1. State proof — snapshot + eval
  2. Behavior proof — state proof + action-specific assertion
  3. Visual proof — behavior proof + screenshot(s)
  4. Diagnosis proof — visual/state proof + console, network, or tracing artifacts

Do this, not that

Do thisNot that
Reuse a good existing tab or session when it already has the right stateReset or isolate by default
tab-new then open <url>tab-new <url> (unreliable — may open about:blank)
Keep a live tab map and confirm the active tab before each actionAssume tab indexes and URLs stayed the same
snapshot → cat <file> to read refs, and re-snapshot after page changesReuse old refs after navigation or rerender
eval for URL, value, checked state, counts, and ready stateTrust headers or command echo alone
check or uncheck for radios and checkboxesBlind click on stateful inputs
Click the upload trigger, then upload /absolute/path/...Call upload before the chooser is active
cat the file returned by console or network to inspect artifactsAssume the command output alone proves anything
Use run-code only for waits or missing primitives, then snapshotStay in custom code longer than necessary
Close transient tabs when finishedLeave disposable tabs or scratch sessions behind
Run playwright-cli install --browser=chrome every time during bootstrapSkip it and assume browser binary exists
Test mousewheel with a small value + eval "() => window.scrollY" firstAssume parameter order is correct

Recovery rules

If the workflow drifts, recover in this order:

  1. Unsure which tab is active — tab-list, tab-select, eval "() => window.location.href", snapshot
  2. Ref not found or action did nothing — re-snapshot (snapshot → cat <file>), then retry with fresh refs
  3. SPA or lazy UI did not settle — use run-code to wait for a selector, URL, or response, then snapshot
  4. Popup or new window appeared — handle it via references/tabs.md, then re-verify the main tab before continuing
  5. Form or upload state is unclear — eval live values or files; do not infer from command success
  6. Bug evidence is weak — console --clear (silent), network --clear (silent), reproduce once, cat artifact files, then capture a screenshot
  7. You used run-code — assume refs are dead and rebuild state with snapshot
  8. mousewheel scrolled wrong direction — try swapping deltaX/deltaY parameters; verify with eval "() => window.scrollY"
  9. --clear seemed to fail — it didn't; --clear produces no output by design

Reference routing

Read only what matches the current job:

NeedReference
Page loads, redirects, waits, SPA navigation, URL verificationreferences/navigation.md
Inputs, selects, radios, uploads, date pickers, multi-step forms, submission proofreferences/forms.md
Screenshots, responsive checks, dark mode, before/after comparisons, layout integrityreferences/screenshots.md
Tabs, named sessions, popups, shared-session work, cleanup boundariesreferences/tabs.md
Console/network artifacts, tracing, truth checks, diagnosis workflow, troubleshootingreferences/debugging.md
Refs, eval usage, extraction, CSS fallback, iframes, shadow DOM, run-code selectorsreferences/selectors.md
Login, search and filter, downloads, storage, multi-step flows, E2E verification levelsreferences/patterns.md

Common starting points

  • Navigate and verify a page — references/navigation.md
  • Fill, submit, and prove a form — references/forms.md and references/debugging.md if submit is flaky
  • Work across multiple tabs or popups — references/tabs.md
  • Collect visual proof — references/screenshots.md
  • Diagnose why something failed — references/debugging.md
  • Run a full workflow such as login or download — references/patterns.md

Cleanup

When browser work ends:

  • close transient tabs you opened for the task
  • stop or delete only the scratch sessions you created — use session-stop for the current isolated session or session-stop <name> for a named one
  • keep shared or preexisting sessions alive unless the user asked for teardown
  • if you collected evidence, preserve the returned artifact paths in your answer

平台分布

Codex

34.99%
按下载量换算55

Claude

29.84%
按下载量换算47

Cursor

19.28%
按下载量换算30

Gemini CLI

8.71%
按下载量换算14

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills