Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/remorses/playwriter/agents-mdgit clone --depth 1 https://github.com/remorses/playwriterWhat 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 | $0.11237 | $0.11237 |
| Opus 5 | $0.05618 | $0.05618 |
| Sonnet 5 | $0.02247 | $0.02247 |
| Haiku 4.5 | $0.01124 | $0.01124 |
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 2d 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 — 946 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)
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.
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)
mcp.ts MUST never use console.log. only console.error
write code that will run on all platforms: mac, linux, windows. especially around paths handling and command execution
development
running MCP locally
to test the MCP server with local changes, add it to your MCP client config with tsx:
{
"mcpServers": {
"playwriter": {
"command": "tsx",
"args": ["/path/to/playwriter/playwriter/src/mcp.ts"]
}
}
}
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.
- 2d 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 (3,846 stars, last pushed 6d ago), licensed MIT. It adds 11,237 tokens to every session, about $0.0562 per session on Opus 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.
Other instructions, from other repositories
playwright CLAUDE.md
Claude Code instructions for microsoft/playwright, covering monorepo packages, browser packages, tooling packages, key directories and build.
playwright copilot-instructions.md
Copilot instructions for microsoft/playwright, a project described as: Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
playwright-cli CLAUDE.md
Claude Code instructions for microsoft/playwright-cli, covering commit convention, ... make changes .. and summary.
dev-browser AGENTS.md
Instructions for SawyerHood/dev-browser, covering claude.md, tooling and validation.
apitap CLAUDE.md
Instructions for n1byn1kt/apitap, covering claude.md, using apitap as an mcp tool, commands, architecture and module map.
apitap copilot-instructions.md
Instructions for n1byn1kt/apitap, covering copilot instructions for apitap, build and test commands, high-level architecture and key repository conventions.