Skip to content
Skill

Init playwright

Sets up Playwright test tooling and MCP browser drivers in a pnpm monorepo

Init playwright is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
5
Last commit
License
MIT
Listing updated

Similar skills

About Init playwright

This skill walks an agent through adding the Playwright toolchain to a pnpm monorepo: installing the test runner, the CLI and an MCP server, then wiring a root Playwright config, dev server ports, e2e and visual regression test layout, and generated AI skill files. It also records two environment pitfalls hit along the way, one involving a Prettier flag under Node 22 and one where a pnpm filter swallowed server arguments for the Vite dev server.

A large part of the content is a warning and troubleshooting guide about headless Chromium consuming high CPU when browser sessions stay alive during AI use. It explains the difference between persistent MCP browser sessions and one-off test runs, suggests preferring a headed browser for 3D dashboard pages, and lists emergency steps and a regression checklist for stray Chromium processes.

The workflow is written for Vue 3, Vite and TypeScript projects on Node 22 with Windows commands, and includes a memory-file template for CLAUDE.md, AGENTS.md or GEMINI.md.

When your agent uses it

在 pnpm monorepo 初始化 Playwright 三件套(@playwright/test + @playwright/cli + playwright-mcp),含 e2e/视觉测试骨架、MCP 配置、AI skills 生成、AI 记忆更新。 内置无头浏览器 CPU 过载事故复盘与故障排查指南:可排查 headless 模式下的 高 CPU 占用(100%)、浏览器卡死、Chromium 进程残留无法退出、 大屏 3D WebGL 渲染性能问题;提供紧急止损步骤和长期回归检查清单。 当用户提及 playwright 初始化、大屏视觉测试、e2e 测试搭建、 playwright monorepo 配置、pw_core/pw_visual MCP 等时触发。 也适用于无头浏览器性能故障排查、headless CPU 100% 诊断、 Chromium 进程残留清理、浏览器进程无法退出处理、 大屏 3D 渲染性能调优等排查场景。

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (19 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the low-frequency-skill plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add ruan-cat/monorepo
/plugin install low-frequency-skill@ruan-cat-tools

Or copy only this skill to ~/.claude/skills/init-playwright:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ruan-cat/monorepo.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/init-playwright &&
cp -R "$tmp/ai-plugins/low-frequency-skill/skills/init-playwright" ~/.claude/skills/init-playwright &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/init-playwright inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/init-playwright to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ruan-cat/monorepo.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/init-playwright &&
cp -R "$tmp/ai-plugins/low-frequency-skill/skills/init-playwright" ~/.agents/skills/init-playwright &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/init-playwright inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/init-playwright to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ruan-cat/monorepo.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/init-playwright &&
cp -R "$tmp/ai-plugins/low-frequency-skill/skills/init-playwright" ~/.cursor/skills/init-playwright &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/init-playwright inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/ruan-cat/monorepo.git --path ai-plugins/low-frequency-skill/skills/init-playwright

Or copy the folder to ~/.gemini/skills/init-playwright yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/init-playwright:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ruan-cat/monorepo.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/init-playwright &&
cp -R "$tmp/ai-plugins/low-frequency-skill/skills/init-playwright" ~/.copilot/skills/init-playwright &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/init-playwright inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/ruan-cat/monorepo.git

Then copy monorepo/ai-plugins/low-frequency-skill/skills/init-playwright into your agent's skills folder as init-playwright. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Playwright toolchain install
Adds the test runner, CLI and MCP server packages to a pnpm workspace and installs Chromium.
Root Playwright configuration
Provides a shared config with test directories, screenshot baselines, reporters and a Vite web server.
Visual regression setup
Organizes e2e and visual spec files, separates them from Vitest tests and commits screenshot baselines.
Headless CPU safety guidance
Explains how persistent headless browser sessions can drive CPU load and how to manage them.
Browser process troubleshooting
Lists symptoms, emergency steps and a checklist for finding and closing leftover Chromium processes.
Agent memory rule template
Offers a short block of browser usage rules to paste into agent instruction files.

Good for

  • Set up Playwright e2e and visual tests in a pnpm monorepo
  • Add Playwright MCP browser tools for an AI coding agent
  • Configure a Vite dev server for Playwright's web server
  • Diagnose a headless Chromium process that will not exit
  • Write browser usage rules into CLAUDE.md or AGENTS.md

Init playwright FAQ

What does the skill install?

It installs @playwright/test, @playwright/cli and playwright-mcp as dev dependencies at the workspace root, then installs Chromium.

Does Init playwright change how tests are named?

Yes. It separates Vitest unit tests using *.test.ts from Playwright tests using *.spec.ts, placing e2e and visual specs in their own folders.

Which Node and operating system does Init playwright assume?

The workflow describes Node 22 on Windows and uses Windows commands such as tasklist and taskkill, with Linux and macOS alternatives listed as comments.

Does Init playwright include any scripts?

No scripts are bundled with the skill. It provides instructions and code snippets for the agent to apply.

How do I install Init playwright in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/init-playwright to use it in all your projects, or to .claude/skills/init-playwright in one project. Or install the low-frequency-skill plugin, which includes it: /plugin marketplace add ruan-cat/monorepo, then /plugin install low-frequency-skill@ruan-cat-tools.

Does Init playwright run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Init playwright?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Init playwright?

The closest alternatives to Init playwright are Playwright, Webapp testing, Playwright skill, Playwright generate test and Playwright interactive.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from ruan-cat/monorepo

  1. Works through an OpenSpec change's task list, implementing and checking off each task

    • Open source
    • 5 GitHub stars
    • Developer tools
  2. Finalizes a completed OpenSpec change, syncing its specs and moving it to the archive

    • Open source
    • 5 GitHub stars
    • Developer tools
  3. Generates all OpenSpec planning artifacts for a change in one pass

    • Open source
    • 5 GitHub stars
    • Developer tools
  4. Starts a new OpenSpec change and shows its first artifact template for review

    • Open source
    • 5 GitHub stars
    • Developer tools
  5. Checks and normalizes package.json, tsup and tsconfig setup for monorepo Node packages

    • Open source
    • 5 GitHub stars
    • Developer tools
  6. Turns incident reports and repeated failures into durable, verifiable agent skill rules

    • Open source
    • 5 GitHub stars
    • Developer tools