一键导入
verify-playwright-method-throws
Analyze a Playwright method's source code to determine if it can throw errors (sync or async).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Analyze a Playwright method's source code to determine if it can throw errors (sync or async).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Implement a Playwright method in effect-playwright by analyzing source code and mapping types
Upgrade playwright-core and update effect-playwright to match new APIs and breaking changes.
| name | verify-playwright-method-throws |
| description | Analyze a Playwright method's source code to determine if it can throw errors (sync or async). |
I perform a deep analysis of a Playwright method's implementation to determine if it can throw an error. This involves tracing execution paths, checking for asynchronous operations (IPC calls), and identifying explicit throw statements or validations.
Use this skill when you need to decide whether a Playwright method should be wrapped in an Effect (if it can throw) or mapped 1:1 (if it is guaranteed safe).
Find the method definition in the Playwright codebase.
context/playwright/packages/playwright-core/src/client/ (e.g., page.ts, locator.ts).context/playwright/packages/protocol/src/protocol.yml (can help identify commands).Examine the method body.
Async / Promise-returning:
Promise?await?Synchronous:
throw new Error(...)?assert(...), checks on options).If the method calls other internal methods, trace them.
this._channel.send(...) or similar?
this._mainFrame or this._context?
frame.ts or browserContext.ts.assertMaxArguments, parseResult, serializeArgument?
Based on the analysis, classify the method into one of two categories:
throw statements.page.url() (returns a string from local state).page.locator(...) (creates a locator object).page.viewportSize() (returns cached size).Promise (Async).Error.page.click(...) (Async, IPC).page.title() (Async, IPC - even if it seems like a property).page.evaluate(...) (Async, script execution).locator.elementHandle() (Async).Effect<T, PlaywrightError>.When reporting the result of this skill, please provide:
this._channel.click, which is an IPC call").