본문으로 건너뛰기
cccskills
무료GitHub에 공개

playwright-cli

Run Playwright CLI commands via Bash for test execution, code generation, browser management, reporting, and debugging. Covers the full `npx playwright` surface: test, codegen, install, show-report, show-trace, screenshot, pdf, open, clear-cache, merge-reports, and more. Use when the user asks to run playwright tests, generate test code, install browsers, view a test report or trace, take a page screenshot or PDF, open a URL in a specific browser, clear the playwright cache, merge shard reports, debug tests, or use playwright UI mode. Also covers the guided workflow for turning a codegen recording into a structured test suite with assertions, resilient selectors, and page objects. Trigger phrases include "playwright test", "run playwright", "npx playwright", "codegen", "install browsers", "show report", "show trace", "playwright screenshot", "playwright pdf", "open in chromium", "open in firefox", "open in webkit", "clear playwright cache", "merge reports", "shard tests", "playwright debug", "playwright ui mode", "record test", "run e2e tests with playwright cli", "playwright headed", "playwright retries", "update snapshots", "playwright grep", "list playwright tests", "codegen to test", "generate playwright test", "create test from recording", "turn recording into test", "bootstrap test suite", "record browser test", "generate spec from codegen".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구Playwright

실행 점수 미검증

설치 방법 보기

포함된 파일(7)

  • SKILL.md8.9 KB
  • references/cli-reference.md10.2 KB
  • references/codegen-workflow.md7.8 KB
  • references/config-template.md1.4 KB
  • references/page-object-pattern.md2.6 KB
  • references/selector-strategy.md2.9 KB
  • references/test-patterns.md4.9 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Playwright CLI Skill

Run any npx playwright command via the Bash tool. This skill covers test execution, code generation, browser installation, reporting, tracing, screenshots, PDFs, and debugging.

Constraints

  • Always use npx playwright — never assume a global install.
  • Playwright must already be installed in the project (npm i -D @playwright/test or equivalent). If it is not, guide the user to install it first.
  • On Windows, some commands behave differently (e.g., show-report may not auto-open a browser in WSL). Note platform quirks when relevant.
  • Commands that launch a GUI (codegen, UI mode, show-report, show-trace, open) require a display. In headless CI environments, skip or adapt these.

Preflight Check

Before running any Playwright command, verify the installation:

npx playwright --version

If this fails:

  • "npx: command not found" — Node.js / npm is not installed.
  • "Cannot find module '@playwright/test'" — Playwright is not installed in this project. Suggest: npm install -D @playwright/test
  • "Executable doesn't exist" on test run — Browsers not installed. Suggest: npx playwright install or npx playwright install chromium

Note on Related Skills

This skill (playwright-cli) handles CLI commands — running tests, codegen, install, screenshots, traces, etc. via npx playwright ... in Bash. It also covers the guided codegen-to-test-suite workflow: recording, reviewing, adding assertions, and organizing page objects. See references/codegen-workflow.md when the user wants to turn a recording into a structured, assertion-bearing test suite — not just run codegen standalone (the "Code generation" pattern above).

The separate e2e-test skill uses Playwright MCP browser tools for interactive, step-by-step browser automation with screenshot evidence. Use that skill when the user wants to manually drive a browser session, not run CLI test suites.

Quick Reference

ActionCommand
Run all testsnpx playwright test
Run specific filenpx playwright test tests/login.spec.ts
Run by grepnpx playwright test --grep "login"
Run headednpx playwright test --headed
Run single browsernpx playwright test --project=chromium
Debug testsnpx playwright test --debug
UI modenpx playwright test --ui
List tests (dry run)npx playwright test --list
Code generationnpx playwright codegen https://example.com
Install browsersnpx playwright install
Install one browsernpx playwright install chromium
Install system depsnpx playwright install-deps
Show HTML reportnpx playwright show-report
Show trace viewernpx playwright show-trace trace.zip
Take screenshotnpx playwright screenshot https://example.com shot.png
Generate PDFnpx playwright pdf https://example.com page.pdf
Open URL in Chromiumnpx playwright open https://example.com
Open URL in Firefoxnpx playwright ff https://example.com
Open URL in WebKitnpx playwright wk https://example.com
Clear browser cachenpx playwright clear-cache
Merge shard reportsnpx playwright merge-reports ./blob-reports
Update snapshotsnpx playwright test --update-snapshots

Common Patterns

Run tests matching a pattern

npx playwright test --grep "checkout" --project=chromium

Exclude pattern:

npx playwright test --grep-invert "slow"

Headed mode with slowdown for observation

npx playwright test --headed --timeout=60000

Retries and workers

npx playwright test --retries=2 --workers=4

For CI with limited resources:

npx playwright test --retries=2 --workers=1

Sharding across CI jobs

Job 1 of 4:

npx playwright test --shard=1/4

Merge after all shards complete:

npx playwright merge-reports ./blob-reports --reporter=html

Code generation with device emulation

npx playwright codegen --device="iPhone 13" https://example.com

With viewport:

npx playwright codegen --viewport-size="1280,720" https://example.com

Record into a file:

npx playwright codegen --target=javascript -o tests/generated.spec.js https://example.com

Save and reuse authentication state

Save storage state after login:

npx playwright codegen --save-storage=auth.json https://example.com

Reuse it:

npx playwright codegen --load-storage=auth.json https://example.com

Or in open:

npx playwright open --load-storage=auth.json https://example.com

Trace viewing

If tests were run with tracing enabled (use: { trace: 'on' } in config):

npx playwright show-trace test-results/example-test/trace.zip

Debug a specific test

npx playwright test tests/login.spec.ts:42 --debug

The :42 targets the test starting at line 42.

Update visual snapshots

npx playwright test --update-snapshots

Custom config file

npx playwright test --config=playwright.ci.config.ts

Reporter selection

npx playwright test --reporter=dot
npx playwright test --reporter=json > results.json
npx playwright test --reporter=junit > results.xml
npx playwright test --reporter=html

Multiple reporters:

npx playwright test --reporter='list,html'

Run only failed tests from last run

npx playwright test --last-failed

Screenshot and PDF

npx playwright screenshot --full-page https://example.com full.png
npx playwright pdf https://example.com output.pdf

Error Handling

SymptomCauseFix
Cannot find module '@playwright/test'Not installednpm install -D @playwright/test
Executable doesn't exist at ...Browsers not installednpx playwright install
browserType.launch: ...Missing system depsnpx playwright install-deps (Linux)
Tests pass locally, fail in CIMissing browsers or deps in CIAdd npx playwright install --with-deps to CI setup
Error: Timed out ...Slow environmentIncrease --timeout or use --retries
ENOMEM / OOMToo many workersReduce --workers=1
Trace file not foundTracing not enabledSet use: { trace: 'on' } in config
Report empty after shardsBlob reports not mergedRun npx playwright merge-reports ./blob-reports

Configuration

Playwright searches for a config file in this order:

  1. --config=<path> flag
  2. playwright.config.ts in project root
  3. playwright.config.js in project root

Key config settings that affect CLI behavior:

  • projects — defines browser targets (mapped to --project flag)
  • retries — default retry count (overridden by --retries)
  • workers — parallelism (overridden by --workers)
  • reporter — default reporter (overridden by --reporter)
  • use.trace — when to record traces ('on', 'off', 'on-first-retry', 'retain-on-failure')
  • use.baseURL — base URL for relative navigations
  • testDir — directory containing test files

References

For the full flag-by-flag reference of every subcommand, read references/cli-reference.md.

For the guided workflow that turns a codegen recording into a production-quality test suite (planning, review, assertions, selectors, page objects, config scaffolding), read references/codegen-workflow.md. It in turn points to references/test-patterns.md, references/selector-strategy.md, references/page-object-pattern.md, and references/config-template.md.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Run a multi-model adversarial mutual review with facilitator synthesis: 2+ panelists (different model families where possible — use codex-server / codex-cli for the external-family seat) independently answer, adversarially critique each other across rounds, and the main session acts as facilitator, synthesizing agreements, live disagreements, and calibrated confidence into one answer. Use ONLY on high-stakes, hard-to-reverse claims, designs or decisions, and only when the user EXPLICITLY asks to debate or adversarially review with multiple models — "discuss with Opus and Codex", "red-team this", "devil's advocate", 敵対的レビュー, 相互レビュー, 多モデル討論, 議論させて. A full run costs ~6 subagent/CLI dispatches: state the panel size and round count and get a go-ahead before launching. Where the Workflow tool is available, run the panel as a Workflow (judge-panel / adversarial-verify) instead of ad-hoc fan-out. Do NOT self-trigger on a bare "are you sure?" — that is a cue to OFFER the panel, not to run it.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

hideki5123/agent-skill-set22026년 10월 21일 업데이트

Orchestrate multiple coding-agent sessions (Claude Code, Codex, Gemini) over the mcp_agent_mail MCP server, observe their progress on a recurring auto-loop, and prevent inconsistencies (file/edit conflicts and contradictory decisions) between concurrent tasks. Auto-manages the agent-mail server, derives the shared room key from the git repo, and runs either as the orchestrator/observer or as a participating worker. Handles the operational details (server startup, room key, reservation conventions) so the user does not have to remember them. Use when coordinating several agent sessions on different tasks at once, watching a swarm of sessions for conflicts, or wiring already-running sessions into a shared coordination room. Trigger phrases: "agent-swarm", "/agent-swarm", "orchestrate agents", "orchestrate multiple claude sessions", "coordinate sessions", "watch for conflicts between agents", "observe the swarm", "prevent inconsistency between sessions", "multi-agent observe", "複数セッションを協調", "エージェント協調", "セッション間の不整合監視", "スウォーム監視", "複数のClaudeを束ねて".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

hideki5123/agent-skill-set22026년 10월 21일 업데이트

Generate AGENTS.md (cross-tool agent context — Codex CLI, Aider, Cursor, etc.) and wire CLAUDE.md as a symlink so Claude Code reads the same file. Delegates content generation to Claude's built-in /init when needed, then renames + symlinks. Idempotent. Triggers — /agents-init, "generate agents.md", "create agents.md", "share claude and codex context", "set up agents file", "init agents", "agents-init", "cross-tool agent context", "wire claude and agents".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

hideki5123/agent-skill-set22026년 10월 21일 업데이트

Drive an already-running, LOGGED-IN Chromium browser on macOS via AppleScript — navigate, click, fill forms, scroll, and extract page content from the user's REAL session, with the browser left open and NO profile copy and NO restart. Use when the task needs the existing logged-in session (cookies, auth, current tabs) reused as-is. Trigger phrases: "chrome-use", "ブラウザから取得", "ログイン済みの Chromeで", "ブラウザを操作して", "このページ読んで", "Xのスレッド読んで", "ログインしたまま取得", "自分のセッションでスクレイプ", "read this page in my browser", "scrape with my session", "drive my chrome", "execute JS in my (logged-in) browser", "automate my logged-in browser". Chromium family (Chrome default; Brave/Edge/Arc/Vivaldi via --app). NOT for isolated/throwaway automation where login reuse is unneeded — use playwright-cli for that. macOS only.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

hideki5123/agent-skill-set22026년 10월 21일 업데이트

codex-cli

무료

Run OpenAI Codex CLI from the terminal for batch / one-shot `codex exec` invocations with output captured to an `-o` file. Use for fire-and-forget runs, scripted CI, code review batches (`codex review`), and resuming a specific session by id (`codex exec resume`). Always use this skill instead of `mcp__codex__codex` and `mcp__codex__codex-reply` MCP tools — CLI is faster and more capable. For streaming UX, multi-turn dialogues that need live state, structured (JSON schema) output, attaching images, or programmatic event handling → **use codex-server instead**. codex-server uses the user's ChatGPT subscription via Codex App Server and decoupled async invocation that bypasses the Bash 2-minute timeout entirely. Trigger patterns (batch-only — chat/streaming triggers belong to codex-server): codex-cli / codex CLI / codex exec / codex review / codex resume / codex fork / batch + {codex, gpt} / one-shot + {codex, gpt} / non-interactive + codex / codex {to a file, -o, output file, captured output} / CI + {codex, gpt} / scripted + {codex, gpt} / fork codex session / resume codex session by id

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

hideki5123/agent-skill-set22026년 10월 21일 업데이트

Run OpenAI Codex via the Codex App Server (JSON-RPC-over-stdio) for streaming multi-turn chat sessions with persistent threads, structured output, image input, and rich event streams. Default entry point for ChatGPT/GPT/Codex-like conversations from the terminal. Uses the user's ChatGPT subscription (Plus / Pro / Team) exclusively via `codex login` — never consumes OPENAI_API_KEY billing, by design. Implementation: TypeScript on deno with npm:@openai/codex-sdk; spawns the existing system codex binary. Decoupled async invocation: every turn returns turn-id in <1 s; the actual SDK work runs in a detached worker that streams to per-turn files under ~/.codex-server/turns/<turn-id>/ — Bash's 2-min timeout never applies. Prefer this over codex-cli for streaming UX, multi-turn dialogues that need live state, structured (JSON schema) output, attaching images, or programmatic event handling. Use codex-cli only for one-shot batch invocations that pre-capture to an -o file. For OpenAI Platform API calls specifically (embeddings, image generation, audio, moderation, batches, files) — not open-ended chat — use openai-cli instead; that path bills OPENAI_API_KEY, this one uses the ChatGPT subscription. Trigger patterns (match any variation): codex / codex-server / codex app server / codex app-server / openai / open ai / OpenAI / chatgpt / chat gpt / ChatGPT / GPT / ask gpt / chat with gpt / gpt session / codex session / streaming chat / multi-turn chat / multi turn chat / second opinion / cross-check / cross check / ai pair programming / another AI / external AI / ask another model / get GPT's take / what does openai think / show me what gpt thinks / structured output from gpt / json schema gpt / resume codex thread / continue codex conversation / continue codex session / /codex-server

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

hideki5123/agent-skill-set22026년 10월 21일 업데이트

hideki5123의 스킬 모두 보기

이 스킬의 문제 신고