Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

playwriter — Claude Code skill: browser control and install

This skill controls the user's open Chrome through the Playwriter extension and runs Playwright snippets. Use it on JavaScript-heavy pages or sites that require login.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add remorses/playwriter --skill playwriter -a claude-code
Open on GitHub

What playwriter does

playwriter connects to the user's existing Chrome instead of launching a separate browser. The agent runs Playwright snippets in a local JavaScript sandbox that keeps state between commands. This can help inspect pages with dynamically loaded content or login walls.

Read the full documentation once per session before running a command: playwriter skill. Then create a session with playwriter session new and pass JavaScript with playwriter -s 1 -e '...'. The docs recommend single quotes around the -e argument. Check that the Playwriter extension is connected to the Chrome profile you intend to use.

The skill is listed for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode. To install it in Claude Code, run npx skills add remorses/playwriter --skill playwriter -a claude-code; its file is placed at ~/.claude/skills/playwriter/SKILL.md. If the playwriter command is unavailable, the docs give npx playwriter@latest and bunx playwriter@latest as alternatives.

What it helps with

  • inspect a page in the user's existing Chrome
  • read content loaded dynamically after navigation
  • work with a page that requires signing in
  • interact with a website using Playwright

Example prompts for the agent

  • Use the playwriter skill to open this page in my Chrome.
  • Use playwriter to find elements that appear after scrolling.
  • With playwriter, inspect the page after I sign in.

How to install playwriter

1Skills CLI (Vercel)

npx skills add remorses/playwriter --skill playwriter -a claude-code

2Manually: put the files in place

~/.claude/skills/playwriter/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/playwriter/

Similar

agentation-self-driving benjitaylor Runs autonomous design critiques in a visible browser window and leaves feedback notes directly through the Agentation toolbar. Claude Code CX Codex Cursor +1 7,000installs context-mode mksglu This skill routes large files and command output through context-mode tools instead of Bash. Use it to inspect logs, test results, data files, or page snapshots. Claude Code CX Codex Cursor +1 2,900installs apify-ultimate-scraper apify Connects your coding agent to Apify actors to extract web data from social networks, maps, and search engines into structured JSON or CSV files. Claude Code CX Codex Cursor +1 16,300installs playwright-skill lackeyjb Write and run Playwright scripts directly in your IDE. Auto-detects dev servers, takes screenshots, checks responsive layouts, tests login flows, and validates web functionality. Claude Code CX Codex Cursor +1 6,900installs screenshots-marketing nexu-io Generates marketing screenshots with Playwright for landing-page hero shots, App Store pages, and changelog visuals. Use it when an interface image needs to be prepared for release. Claude Code CX Codex Cursor +1 2,800installs competitive-ads-extractor nexu-io Extracts competitor ads from ad libraries and breaks down their messaging and creative approaches. Useful when reviewing advertising patterns. Claude Code CX Codex Cursor +1 2,700installs agent-browser vercel-labs A CLI skill for browser control: it opens pages, fills forms, clicks buttons, and tests web apps. Use it when an agent needs to act inside a website. Claude Code CX Codex Cursor +1 1,200,000installs webapp-testing official anthropics This skill tests local web apps with Playwright, helping agents debug UI behavior, capture screenshots, and inspect browser logs. Claude Code Claude.ai 186,758installs

Questions about playwriter

How do I install playwriter in Claude Code?

Run npx skills add remorses/playwriter --skill playwriter -a claude-code. The skill file is placed at ~/.claude/skills/playwriter/SKILL.md.

What does playwriter do?

It connects an agent to the user's open Chrome through the Playwriter extension and runs Playwright code in a stateful local JavaScript sandbox.

What should I do before the first playwriter command?

Read the full documentation with playwriter skill. Do this once per session before running playwriter commands.

Source text

SKILL.md · MIT
---
name: playwriter
description: Control the user own Chrome browser via Playwriter extension with Playwright code snippets in a stateful local js sandbox. 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 cli for navigating JS-heavy websites (Instagram, Twitter, cookie/login walls, lazy-loaded UIs) instead of webfetch/curl. ALWAYS load this skill before using any playwriter commands
---

## Read Full Documentation (once per session)

**Before the first playwriter command in a session, run:**

```bash
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 examples below will fail without understanding timeouts, selector rules, and pitfalls from the full docs. You only need to do this once per session; subsequent playwriter commands in the same session do not require re-reading.

**Read the ENTIRE output.** Do NOT pipe through `head`, `tail`, or any truncation command. Critical rules are spread throughout the document, not just at the top.

## Minimal Example (after reading full docs)

```bash
playwriter session new
playwriter -s 1 -e 'state.page = await context.newPage(); await state.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`.

© remorses · MIT · remorses/playwriter

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor