一键导入
playwright-browser
Use when automating browsers, testing pages, taking screenshots, checking UI, verifying login flows, or testing responsive behavior
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when automating browsers, testing pages, taking screenshots, checking UI, verifying login flows, or testing responsive behavior
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when facing hard architectural decisions, multiple valid approaches exist, need diverse perspectives before committing, or want M-of-N synthesis on complex problems
Use when rough ideas need design before code, requirements are fuzzy, multiple approaches exist, or you need to explore options before implementation
Use when testing MCP servers, debugging MCP tool responses, exploring MCP capabilities, or diagnosing why an MCP tool returns unexpected data
Use when debugging bugs, test failures, unexpected behavior, or needing to find root cause before fixing
Use when managing project learnings - view, add, search, prune, or export operational knowledge that persists across sessions
Use when shipping code - complete workflow: merge main, run tests, multi-review with auto-fix, commit, push, create PR. Replaces manual commit-push-pr flows.
| name | playwright-browser |
| description | Use when automating browsers, testing pages, taking screenshots, checking UI, verifying login flows, or testing responsive behavior |
| version | 1.1.0 |
| category | testing |
| triggers | ["browser","playwright","screenshot","test the page","check the UI","login flow","fill form","responsive","viewport"] |
node $SKILL_DIR/run.js /tmp/playwright-task.js
For inline code (variables are auto-injected, see below):
node $SKILL_DIR/run.js "const b = await chromium.launch(); const p = await b.newPage(); await p.goto('http://localhost:3000'); console.log(await p.title()); await b.close();"
$SKILL_DIR is where you loaded this file from.
Default: headless (invisible, less intrusive).Use { headless: false } when user wants to see the browser. You know when that is.
BASE_URL - from PLAYWRIGHT_BASE_URL env varCI_ARGS - browser args for CI (['--no-sandbox', '--disable-setuid-sandbox'])EXTRA_HEADERS - from PW_HEADER_NAME/VALUE or PW_EXTRA_HEADERSchromium, firefox, webkit, devices - from playwrightExample:
node $SKILL_DIR/run.js "
const browser = await chromium.launch({ args: CI_ARGS });
const page = await browser.newPage();
await page.goto(BASE_URL || 'http://localhost:3000');
console.log(await page.title());
await browser.close();
"
run.js auto-installs Playwright on first use. No manual setup needed.
For network mocking, auth persistence, multi-tab, downloads, video, traces:
[API_REFERENCE.md](API_REFERENCE.md)