docker-playwright

Installation
SKILL.md

Run Playwright tests for the current project inside a shared Docker container.

Constants (edit these if your setup differs)

  • CONTAINER=pw — container name
  • IMAGE=mcr.microsoft.com/playwright:v1.59.1-noble — must match the project's @playwright/test version (browser binaries are baked into the image)
  • HOST_ROOT=$HOME/gits mounted at MOUNT=/work — the host→container path mapping

Arguments

Everything passed after the skill name is forwarded verbatim to playwright test (e.g. tests/smoke.spec.ts --grep @smoke --project chromium). A bare invocation runs the full suite.

Gotchas

  • Never use docker exec -it — the -it flags fail with "cannot attach stdin to a TTY-enabled container" when not run from a real terminal (scripts, CI, this agent). Use plain docker exec.
  • Headed runs (--headed/--ui/--debug) need a display the container lacks. If the user wants headed, tell them to prefix with xvfb-run: xvfb-run npx playwright test --headed. Note --ui/--debug also need VNC/X-forwarding to actually view — impractical without extra setup. Default runs are headless.

Steps

Installs
1
Repository
thaitype/skills
GitHub Stars
13
First Seen
13 days ago
docker-playwright — thaitype/skills