# Playwriter

> Playwriter is an open-source agent skill for browser automation. Lets your agent drive your own Chrome browser through Playwright snippets. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/AgiFlow/aicode-toolkit/tree/main/.claude/skills/playwriter
- **Repository:** https://github.com/agiflow/aicode-toolkit
- **GitHub stars:** 162
- **License:** AGPL-3.0
- **Skill name:** playwriter
- **Collection:** https://github.com/AgiFlow/aicode-toolkit
- **Categories:** [browser automation](https://ai-powered.com/categories/browser-automation)
- **Listing updated:** 2026-12-02

## About

This skill teaches the agent to operate the user's existing Chrome browser through the Playwriter extension and its command line tool, rather than launching a separate headless browser. Playwright code is sent as snippets into a stateful local JavaScript sandbox, so page state persists between steps.

The skill makes the agent run the playwriter skill command first to load the full, up-to-date documentation, which covers session handling, timeouts, selector guidance and tips for slow pages and single-page apps. The quick example shows creating a session and navigating a page with single-quoted inline code.

It expects the Playwriter extension installed in Chrome and the playwriter CLI available, either globally or through npx or bunx. The skill is a single SKILL.md file with no bundled scripts.

## When your agent uses it

> 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

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/AgiFlow/aicode-toolkit/tree/HEAD/.claude/skills/playwriter)
- [License: AGPL-3.0](https://github.com/AgiFlow/aicode-toolkit/tree/HEAD/.claude/skills/playwriter)

## Features

- **Connects to your Chrome:** Works inside the browser you already use, including its existing logins and cookies.
- **Stateful JavaScript sandbox:** Runs Playwright snippets in a persistent local session across multiple commands.
- **Session management:** Creates and selects browser sessions through the playwriter CLI.
- **Full documentation loader:** Requires the agent to read the complete playwriter skill output before acting.
- **JS-heavy site handling:** Targets sites with cookie walls, login walls and lazy-loaded interfaces.

## Good for

- Scrape a page that needs login and sits behind a cookie wall
- Fill and submit a web form in my open Chrome session
- Read content from a lazy-loaded social media feed
- Take a screenshot of a page as it appears in my browser
- Automate a repetitive task on a site I'm already signed into

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/playwriter` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/AgiFlow/aicode-toolkit.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/playwriter &&
cp -R "$tmp/.claude/skills/playwriter" ~/.claude/skills/playwriter &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/playwriter` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/playwriter` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/AgiFlow/aicode-toolkit.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/playwriter &&
cp -R "$tmp/.claude/skills/playwriter" ~/.agents/skills/playwriter &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/playwriter` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/playwriter` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/AgiFlow/aicode-toolkit.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/playwriter &&
cp -R "$tmp/.claude/skills/playwriter" ~/.cursor/skills/playwriter &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/playwriter` inside it instead.

### Gemini CLI

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

```sh
gemini skills install https://github.com/AgiFlow/aicode-toolkit.git --path .claude/skills/playwriter
```

Or copy the folder to `~/.gemini/skills/playwriter` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/playwriter`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/AgiFlow/aicode-toolkit.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/playwriter &&
cp -R "$tmp/.claude/skills/playwriter" ~/.copilot/skills/playwriter &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/playwriter` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/AgiFlow/aicode-toolkit.git
```

Then copy `aicode-toolkit/.claude/skills/playwriter` into your agent's skills folder as `playwriter`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When should the agent use Playwriter instead of a plain fetch?

The skill recommends it for JavaScript-heavy sites such as Instagram or Twitter, cookie and login walls, and lazy-loaded interfaces, where webfetch or curl would not work well.

### Does Playwriter launch a new browser?

No. It connects to the user's existing Chrome instead of launching a new instance, which is the stated reason to prefer it over other Playwright MCP servers.

### What do I need before using Playwriter?

The Playwriter extension and the playwriter CLI. If the CLI is not found, the skill says to use npx playwriter@latest or bunx playwriter@latest.

### Does the skill include scripts?

No. The folder contains only the SKILL.md file; the detailed instructions are loaded from the playwriter skill command.

### How do I install Playwriter in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/playwriter to use it in all your projects, or to .claude/skills/playwriter in one project.

### Does Playwriter 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 Playwriter?

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 Playwriter?

The closest alternatives to Playwriter are Webapp testing, Playwright skill, Playwright, Webapp testing and Playwright generate test.

## Where this comes from

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

## Alternatives

- [Webapp testing](https://ai-powered.com/skills/webapp-testing-github): Webapp testing is an open-source agent skill for browser automation.
- [Playwright skill](https://ai-powered.com/skills/playwright-skill): Playwright skill is an open-source agent skill for browser automation.
- [Playwright](https://ai-powered.com/skills/playwright): Playwright is a free agent skill for browser automation.
- [Webapp testing](https://ai-powered.com/skills/webapp-testing): Webapp testing is an open-source agent skill for browser automation.
- [Playwright generate test](https://ai-powered.com/skills/playwright-generate-test): Playwright generate test is an open-source agent skill for browser automation.
- [Playwright interactive](https://ai-powered.com/skills/playwright-interactive): Playwright interactive is a free agent skill for browser automation.
- [Agent browser](https://ai-powered.com/skills/agent-browser-scaledockhq): Agent browser is an open-source agent skill for browser automation.
- [Puppeteer skill](https://ai-powered.com/skills/puppeteer-skill): Puppeteer skill is an open-source agent skill for browser automation.

---
Source: https://ai-powered.com/skills/playwriter
