option

Control the user own Chrome browser via Playwriter extension with Playwright code snippets in a stateful local js sandbox via playwriter cli. Use this over other Playwright MCPs to automate the browser — it connects to the user's existing Chrome instead of launching a new one. Use this for JS-heavy websites (Instagram, Twitter, cookie/login walls, lazy-loaded UIs) instead of webfetch/curl. Run `playwriter skill` command to read the complete up to date skill

...Expand all
54
Updated time June 29, 2026

About playwriter

The Playwriter skill enables users to control their existing Chrome browser using Playwright code snippets executed in a local, stateful JavaScript sandbox. Unlike standard Playwright MCPs that launch new browser instances, Playwriter connects directly to the user's current Chrome session, allowing for seamless interaction with JavaScript-heavy websites. This approach addresses common challenges in web automation, such as handling SPAs, cookie and login walls, lazy-loaded content, and other dynamic elements that traditional web-fetching methods like curl or webfetch struggle to manage effectively.

Key capabilities of Playwriter include session management, execution of custom Playwright scripts via the CLI, and careful handling of timeouts and selector strategies to prevent failures. The skill provides mechanisms to manage context variables, utility functions, and best practices for navigating slow pages and single-page applications. Users can execute scripts in a controlled environment, ensuring that JS code behaves predictably within the Chrome instance. Proper quoting of script arguments is emphasized to avoid issues with shell interpretation, and the skill is compatible with tools like npx or bunx to ensure availability if the Playwriter CLI is not installed globally.

Playwriter is particularly suited for developers, automation engineers, and QA professionals who need to automate interactions with complex, dynamic web pages. Typical use cases include automating login flows, scraping content from SPAs, testing interactive web elements, or performing repetitive browser tasks where JavaScript execution is essential. Users benefit from a controlled, reliable browser automation experience that leverages their existing Chrome session, reducing the overhead of launching new instances and simplifying script execution for advanced web scenarios.

FAQ

How do I start using Playwriter?

Before using Playwriter, you must run `playwriter skill` to read the full documentation. This ensures you understand session management, timeout handling, selector strategies, and other important details to prevent errors.

Can Playwriter automate any website?

Playwriter is designed for JavaScript-heavy websites, SPAs, and pages with login or cookie walls. It connects to your existing Chrome session, which helps handle dynamic content that standard web-fetching methods cannot manage.

What should I do if the Playwriter command is not found?

If `playwriter` is not recognized, you can use `npx playwriter@latest` or `bunx playwriter@latest` to run the CLI without a global installation.

Are there specific rules for writing Playwright scripts with Playwriter?

Yes. Always use single quotes for the `-e` argument to prevent the shell from interpreting `$`, backticks, or backslashes. Double quotes or template literals can be used for strings inside the JS code.

Who should use Playwriter?

Developers, QA engineers, and automation specialists who need to automate browser tasks on dynamic websites or SPAs will benefit most from Playwriter.

View on GitHub

REQUIRED: Read Full Documentation First

Before using playwriter, you MUST run this command:

playwriter skill # IMPORTANT! do not use | head here. read in full!

This outputs the complete documentation including:

  • Session management and timeout configuration
  • Selector strategies (and which ones to AVOID)
  • Rules to prevent timeouts and failures
  • Best practices for slow pages and SPAs
  • Context variables, utility functions, and more

Do NOT skip this step. The quick examples below will fail without understanding timeouts, selector rules, and common pitfalls from the full docs.

Read the ENTIRE output. Do NOT pipe through head, tail, or any truncation command. The skill output must be read in its entirety — critical rules about timeouts, selectors, and common pitfalls are spread throughout the document, not just at the top.

Minimal Example (after reading full docs)

playwriter session newplaywriter -s 1 -e 'await page.goto("https://example.com")'

Always use single quotes for the -e argument. Single quotes prevent bash from interpreting $, backticks, and backslashes inside your JS code. Use double quotes or backtick template literals for strings inside the JS.

If playwriter is not found, use npx playwriter@latest or bunx playwriter@latest.

All Files

1 files
SKILL.md 1.8k
View

Install playwriter

Download and extract the skill files to your .claude/skills/ directory.

Download ZIP

Clone the repository and copy the skill files to your project.

git clone https://github.com/remorses/playwriter/blob/main/skills/playwriter/SKILL.md # Copy SKILL.md to your .claude/skills/ directory

Copy Copy
Quick Setup: Copy the skill folder to .claude/skills/Claude will automatically detect and use the skill
Repository remorses/playwriter

Related Skills

playwright-cli
Updated time June 29, 2026
playwright-generate-test
Updated time June 29, 2026
Playwright Browser Automation
Updated time June 29, 2026
playwright-expert
Updated time June 29, 2026
OR