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

mk:playwright-cli

Session-persistent browser automation via Playwright CLI — form filling, screenshots, data extraction, multi-step flows. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information across multiple requests. NOT for AI-driven long-autonomous flows (see mk:agent-browser); NOT for generating .spec.ts E2E code (see mk:qa-manual).

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

연동 도구Playwright
설치 방법 보기

포함된 파일(9)

  • SKILL.md5.6 KB
  • references/command-reference.md3.7 KB
  • references/request-mocking.md2.1 KB
  • references/running-code.md5.6 KB
  • references/session-management.md4.7 KB
  • references/storage-state.md6.6 KB
  • references/test-generation.md2.4 KB
  • references/tracing.md4.1 KB
  • references/video-recording.md1.0 KB

SKILL.md(원문)

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

Browser Automation with playwright-cli

Use playwright-cli when: DOM interaction, navigation, data extraction, or generating reusable .spec.ts E2E test code. Use mk:agent-browser instead when: session persistence (auth flows, MFA, cookie import) is required.

Quick Start

playwright-cli open https://playwright.dev
playwright-cli snapshot                  # Get element refs (e1, e2, ...)
playwright-cli click e15
playwright-cli type "page.click"
playwright-cli press Enter
playwright-cli screenshot
playwright-cli close

Core Workflow

  1. open <url> — navigate to page
  2. snapshot — get accessibility tree with element refs (e1, e2, ...)
  3. Interact using refs: click, fill, type, select, check
  4. Re-snapshot after navigation or DOM changes
  5. close when done
playwright-cli open https://example.com/form
playwright-cli snapshot
playwright-cli fill e1 "user@example.com"
playwright-cli fill e2 "password123"
playwright-cli click e3
playwright-cli snapshot
playwright-cli close

Most-Used Commands

# Navigation
playwright-cli goto <url>
playwright-cli go-back / go-forward / reload

# Interaction
playwright-cli click e3
playwright-cli fill e5 "text"         # Clear and type
playwright-cli type "text"            # Type at current focus
playwright-cli press Enter
playwright-cli select e9 "option-value"
playwright-cli check e12 / uncheck e12

# Snapshot & capture
playwright-cli snapshot
playwright-cli snapshot --filename=after-click.yaml
playwright-cli screenshot
playwright-cli screenshot --filename=page.png
playwright-cli pdf --filename=page.pdf

# Auth state
playwright-cli state-save auth.json
playwright-cli state-load auth.json

Full command listing: references/command-reference.md

Snapshots

After each command, playwright-cli writes a snapshot YAML of the current browser state. Use --filename= when the artifact is a workflow result; omit for auto-timestamped files.

.playwright-cli/page-2026-02-14T19-22-42-679Z.yml

Sessions

playwright-cli -s=mysession open example.com --persistent
playwright-cli -s=mysession click e6
playwright-cli -s=mysession close
playwright-cli list          # List all active sessions
playwright-cli close-all     # Close all browsers
playwright-cli kill-all      # Force kill stale processes

Named sessions run isolated contexts (separate cookies, storage, history). Full session patterns: references/session-management.md

Storage & Network

# Cookies / localStorage / sessionStorage
playwright-cli cookie-list / cookie-set / cookie-delete / cookie-clear
playwright-cli localstorage-get theme / localstorage-set theme dark

# Request mocking
playwright-cli route "**/*.jpg" --status=404
playwright-cli route "https://api.example.com/**" --body='{"mock": true}'
playwright-cli unroute

DevTools & Debugging

playwright-cli console             # View console output
playwright-cli network             # View network requests
playwright-cli tracing-start / tracing-stop
playwright-cli video-start / playwright-cli video-stop video.webm
playwright-cli run-code "async page => await page.context().grantPermissions(['geolocation'])"

Setup

Requires Playwright MCP server. Configure in .mcp.json:

{ "playwright": { "command": "npx", "args": ["@playwright/mcp@latest"] } }

Copy from .claude/mcp.json.example if not configured. If global binary unavailable: npx playwright-cli <command>

Gotchas

  • Flaky selectors on SPAs: data-testid changes between renders → prefer role-based selectors (getByRole) over CSS selectors
  • Auth state not persisting between tests: each test starts with fresh context → use state-save / state-load to persist auth cookies across runs

References

ReferenceWhen to Use
references/command-reference.mdFull command listing (core, tabs, storage, network, DevTools, open params)
references/session-management.mdNamed sessions, concurrent scraping, persistent profiles, cleanup
references/request-mocking.mdRequest mocking patterns
references/storage-state.mdStorage state (cookies, localStorage)
references/test-generation.mdTest generation
references/tracing.mdTracing
references/video-recording.mdVideo recording
references/running-code.mdRunning Playwright code

리뷰

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

댓글

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

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

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

0 / 1,000자

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

같은 저장소의 스킬

Use this skill to generate well-branded interfaces and assets for MeowKit (AI Agent Toolkit for Claude Code), either for production or throwaway prototypes/mocks/etc. Contains essential design guidelines, colors, type, fonts, assets, and UI kit components for prototyping.

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

ngocsangyem/MeowKit152026년 7월 28일 업데이트

mk-advise

무료

Turn a raw idea into ONE honest recommendation: interview one question at a time until confirmed, then give a verdict with trade-offs and a checklist. Not for options or debate.

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

ngocsangyem/MeowKit152026년 7월 28일 업데이트

Browser automation CLI for agents: navigate, click/fill, screenshot, extract data, test apps, Electron/Slack, cloud browsers. NOT for the user's real Chrome profile/cookies (mk:chrome-profile).

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

ngocsangyem/MeowKit152026년 7월 28일 업데이트

Detects the right agent and complexity tier at Phase 0 orient; runs first in every workflow. NOT for runtime agent routing inside a single skill.

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

ngocsangyem/MeowKit152026년 7월 28일 업데이트

Angular v20+ patterns: components, signals, services, forms, routing, HTTP, testing, SSR. Auto-activates on .ts files in Angular projects (angular.json detected).

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

ngocsangyem/MeowKit152026년 7월 28일 업데이트

Design and review durable REST, GraphQL, RPC, or event API contracts: shape, compatibility, pagination, error semantics. Discovers existing consumers first. Not implementation, schema, or release.

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

ngocsangyem/MeowKit152026년 7월 28일 업데이트

ngocsangyem의 스킬 모두 보기

이 스킬의 문제 신고