用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/CleanExpo/NodeJS-Starter-V1 --skill playwright-browser命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| id | playwright-browser |
| name | playwright-browser |
| type | skill |
| version | 1.0.0 |
| created | 20/03/2026 |
| modified | 20/03/2026 |
| status | active |
| metadata | {"author":"NodeJS-Starter-V1","version":"1.0.0","locale":"en-AU"} |
| description | >- |
| context | fork |
Headless browser automation using Playwright CLI and MCP tools for E2E testing, UI verification, screenshots, and web scraping.
test:e2e, playwright test)claude-browser skill)--headed only when debuggingThese tools are available via the mcp__playwright__* namespace:
| Tool | Purpose |
|---|---|
browser_navigate | Navigate to URL |
browser_click | Click element by selector or text |
browser_fill_form | Fill form fields |
browser_take_screenshot | Capture page screenshot |
browser_snapshot | Get accessibility tree snapshot |
browser_evaluate | Execute JavaScript in page context |
browser_press_key | Simulate keyboard input |
browser_type | Type text into focused element |
browser_select_option| Select dropdown option |
browser_wait_for | Wait for element/condition |
browser_network_requests | Inspect network activity |
browser_console_messages | Read console output |
browser_hover | Hover over element |
browser_drag | Drag and drop |
browser_handle_dialog | Accept/dismiss dialogs |
browser_file_upload | Upload files |
browser_tabs | Manage browser tabs |
browser_navigate_back | Go back |
browser_resize | Resize viewport |
browser_close | Close browser |
browser_install | Install browser binaries |
browser_run_code | Run Playwright code snippet |
1. Load tools: ToolSearch "playwright"
2. Navigate: browser_navigate to target URL
3. Interact: browser_click, browser_fill_form, browser_type
4. Capture: browser_take_screenshot at each significant step
5. Verify: browser_snapshot for accessibility tree, browser_evaluate for assertions
6. Clean up: browser_close when done
# Install browsers
npx playwright install chromium
# Run all E2E tests
npx playwright test
# Run specific test file
npx playwright test tests/e2e/login.spec.ts
# Run with headed browser (debugging)
npx playwright test --headed
# Generate test from user interaction
npx playwright codegen http://localhost:3000
# Show HTML report
npx playwright show-report
# Run with specific project/browser
npx playwright test --project=chromium
{step-number}-{description}.png
Examples: 01-login-page.png, 02-form-filled.png, 03-dashboard-loaded.png
ai-review/screenshots/ # Automated review screenshots
test-results/ # Playwright test artifacts
playwright-report/ # HTML report with traces
fullPage: true for long pages// Save auth state after login
await page.context().storageState({ path: 'auth-state.json' });
// Reuse in subsequent tests
const context = await browser.newContext({
storageState: 'auth-state.json'
});
For multi-step workflows that span multiple tool calls, maintain browser context between operations. Close explicitly when done.
Playwright supports parallel test execution natively:
# Run tests in parallel (default)
npx playwright test --workers=4
# Run serially (debugging)
npx playwright test --workers=1
For MCP tool usage, open multiple browser tabs for parallel story validation.
| File | Purpose |
|---|---|
apps/web/playwright.config.ts | Playwright configuration |
apps/web/tests/e2e/ | E2E test directory |
apps/web/package.json | test:e2e script |
data-testid or accessible rolespage.waitForTimeout() — prefer page.waitForSelector() or browser_wait_forRoute complex requests to the right specialist agent or chain of agents. This skill acts as the central brain of an agent swarm — it analyses what the user needs, determines which specialist domain(s) are required, and coordinates parallel or sequential agent execution. Use this skill when a request spans multiple domains (e.g., "research competitors and create a pitch deck"), when you need to decide which specialist should handle an ambiguous request, or when a task requires a multi-step pipeline across different skills. Triggers on: multi-step requests, cross-domain tasks, "coordinate", "plan this out", "I need help with multiple things", or any complex request that touches more than one specialist area. Also triggers when the user seems unsure which tool or approach to use.
>-
Hybrid DAG execution primitive combining deterministic and agentic nodes with hard iteration caps