Playwriter is a Chrome extension and command-line tool that lets coding agents control an already-running browser through Playwright, preserving its tabs, logins, cookies, and extensions. It is for browser automation from a CLI or MCP server, and the catalogue entries provide instructions and skills for agents using it.
Borrowing it
Nothing to install: this file belongs to remorses/playwriter. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/remorses/playwriter/main/AGENTS.mdgit clone --depth 1 https://github.com/remorses/playwriterWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/remorses/playwriter/agents-md)<a href="https://agentmods.dev/instructions/remorses/playwriter/agents-md"><img src="https://agentmods.dev/badge/instructions/remorses/playwriter/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/remorses/playwriter/agents-md"><img src="https://agentmods.dev/badge/instructions/remorses/playwriter/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.05786 | $0.05786 |
| Opus 5.5 | $0.02314 | $0.02314 |
| Sonnet 5.5 | $0.01157 | $0.01157 |
| Haiku 4.5 | $0.00579 | $0.00579 |
Grade A, and why
playwriter AGENTS.md scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 17d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl -sL https://raw.githubusercontent.com/ChromeDevTools/devtools-protocol/master/pdl/domains/Target.pdl # manage “targets”: pages, iframes, workers, etc., and attach/detach sessions How it starts
The opening of the file, as written. The whole thing — 516 lines — stays where its author put it; the contents beside it link to each section on GitHub.
this is the playwriter codebase
the extension uses chrome.debugger to manage the user browser
read ./README.md for an overview of how this extension and mcp work read playwriter/src/skill.md to understand the MCP docs (source of truth)
keep playwriter/src/skill.md token-efficient. Keep tab-group instructions brief, use the shortest clear single-word names with no spaces, and do not document playwriter session update there.
backward compatibility
breaking changes to the WS protocol MUST never be made. publishing the extension code will never be instant, which means the extension must keep working with newer versions of the MCP and WS relay server.
Chrome Web Store review can delay an extension release by days or weeks. Users can run a new CLI, MCP or relay with an old extension during this time. CLI, MCP and relay code MUST stay compatible with older extension versions:
- never require a new extension message, command or field without a fallback
- detect missing extension features at runtime, then fall back or show a clear "update the extension" error
- ship the extension side of a feature first. Make the CLI depend on it only after the store has published that version
architecture
- user installs the extension in chrome. we assume there is only one chrome window for now, the first opened.
- extension connects to a websocket server on port 19988. if this server is not yet open, it retries connecting in a loop
- the MCP spawns the ws server if not already listening on 19988, in background. the mcp then connects to this same server with a playwright client
- the server exposes /cdp/client-id which is used by playwright clients to communicate with the extension
- the extension instead connects to /extension which is used to receive cdp commands and send responses and cdp events.
- some events are treated specially for example because
- we need to send attachedToTarget to let playwright know which pages are available
- we need to send detachedFromTarget when we disable the extension in a tab
- a few more events need custom handling
- tabs are identified by sessionId or targetId (CDP concepts) or tabId (chrome debugger concept only)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 17d ago Changed · -452 lines · -5,791 tokens per session 2f9ab7a06dee
- 1mo ago Changed · +16 lines · +263 tokens per session c3b2ab5974a7
- 1mo ago Changed · +6 lines · +77 tokens per session d86f41d2068f
- 2mo ago First seen · 946 lines · 11,237 tokens per session scan A 42183193e192
playwriter AGENTS.md is an instructions file published in the GitHub repository remorses/playwriter (4,061 stars, last pushed 3d ago), licensed MIT. It adds 5,786 tokens to every session, about $0.0231 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
playwriter AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| playwriter AGENTS.mdremorses/playwriter | Instructions file | 4.1k | 3d ago | MIT | A | 5,786 | Codex, OpenCode |
| qmax-mcp copilot-instructions.mdQuality-Max/qmax-mcp | Instructions file | 4 | 4d ago | MIT | A | 451 | GitHub Copilot |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |