playwright-my-chrome: Instructions file for Codex

AGENTS.md

playwright-my-chrome AGENTS.md is an instructions file for Codex, OpenCode from arDaraz/playwright-my-chrome. It costs 1,829 tokens per session, scanned A, original, MIT.

Repository instructions for a macOS project that lets an agent control the Chrome browser already open and signed in on the user's computer.

In plain words
What is it for?
Use them when changing, testing, releasing, or manually verifying the `playwright-my-chrome` skill.
Why use it?
They give coding agents the project's rules, supported environment, required checks, and branch and pull-request procedure.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions CLAUDE.md; mentions AGENTS.md; mentions Codex.

This is arDaraz/playwright-my-chrome's own configuration. It tells Codex and OpenCode how to work on playwright-my-chrome itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything playwright-my-chrome configures →

Reuse

Borrowing it

Nothing to install: this file belongs to arDaraz/playwright-my-chrome. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/arDaraz/playwright-my-chrome/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/arDaraz/playwright-my-chrome

Made for: Codex, OpenCode.

Wrote 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.

agentmods badge for playwright-my-chrome AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/ardaraz/playwright-my-chrome/agents-md/github.svg)](https://agentmods.dev/instructions/ardaraz/playwright-my-chrome/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/ardaraz/playwright-my-chrome/agents-md"><img src="https://agentmods.dev/badge/instructions/ardaraz/playwright-my-chrome/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.

agentmods 80×15 button for playwright-my-chrome AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/ardaraz/playwright-my-chrome/agents-md"><img src="https://agentmods.dev/badge/instructions/ardaraz/playwright-my-chrome/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,829 This file is loaded in full into every session.
When invoked 1,829 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.01829 $0.01829
Opus 5.5 $0.00732 $0.00732
Sonnet 5.5 $0.00366 $0.00366
Haiku 4.5 $0.00183 $0.00183

Measured 1mo ago against content hash fdf1b9524011, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

playwright-my-chrome AGENTS.md scanned grade A with 0 findings 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 1mo 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 146 lines

How it starts

The opening of the file, as written. The whole thing — 146 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md

This file provides guidance to coding agents working with code in this repository. It is the single source of truth; CLAUDE.md is a symlink to it.

What this repository is

One published Agent Skill, skills/playwright-my-chrome/, that lets an agent drive the Chrome the user already has open and signed in. Everything shipped to users lives in that directory; the repository root only holds docs, tests, and CI. macOS and Google Chrome only.

Commit and push

Never commit or push to the main branch. Work on a branch and open a pull request.

Commands

npm run lint      # shellcheck + bash -n on every .sh, then tests/validate_skill.py
npm test          # tests/run.sh, the behavior tests (about a minute)
npm run verify    # both
npx [email protected] install . --list   # third release check, Skills CLI discovery

npm run lint needs shellcheck on PATH (brew install shellcheck).

tests/run.sh has no filter flag. It is fast enough to run whole; to isolate one case, comment out the other calls in the invocation list at the bottom of the file.

Before any manual check against real Chrome, reinstall first. npx skills install copies the skill directory instead of linking it, so an installed copy goes stale as soon as scripts/ changes and would silently test old code:

npx skills install . --skill playwright-my-chrome --global \
  --agent codex --agent claude-code

Then run the installed wrapper's setup and use the wrapper from the installed path, not from this repository.

Architecture

scripts/playwright-my-chrome.sh (about 1900 lines of bash) is the product. It is a fail-closed wrapper around a private copy of @playwright/cli, not a library. Reading it top to bottom gives the whole design:

  1. Preamble resolves Node from fixed absolute locations (nvm, Volta, Homebrew, /usr/local), never through caller PATH, and takes the first one that meets engines.node in cli/package.json. It reads the supported CLI version from cli/package-lock.json, then resets PATH to system directories so nothing secret-bearing can be shimmed. Every CLI call runs node <runtime>/cli/node_modules/@playwright/cli/playwright-cli.js. The wrapper never looks for a global playwright-cli.
  2. Runtime directory under the user's Caches folder must be private, mode 0700, non-symlink, and carry a claim file. <runtime>/cli gets the same directory checks, and a failure exits 6. The wrapper cds there for every CLI call, which is how one shared session named mychrome stays the same from any repository: Playwright CLI picks its daemon session from the nearest .playwright folder.
  3. Attachment (attach_session) is the security core. It requires exactly one normal Chrome main process already running, reads the Keychain token only at that point, writes it to the child as an environment variable, and compares the full Chrome PID set immediately before and after. A changed PID set, or a Chrome command line still carrying the token, detaches and demands token rotation.
  4. Cleanup paths (scrub_known_output, finalize_sanitation, remove_known_output) delete only what private, mode-0600, non-symlink metadata files name, and refuse traversal-shaped paths.
  5. Setup (setup_private_cli) installs that private copy. Under the wrapper lock it removes abandoned .cli-setup.* directories and refuses while mychrome reports attached: true, whatever its compatible value. A copy that fails the intact check never runs. Setup then refuses if a process runs code from <runtime>/cli, or if ps fails. It runs npm ci --ignore-scripts on the shipped lock in a private staging directory, with the npm next to the resolved Node, as a tracked child with a 10 minute bound. It checks the staged copy, then moves it into <runtime>/cli. A failed, timed-out, or interrupted setup kills npm and removes the staging directory. If the old copy was already moved aside, the cleanup moves it back. If that move fails, the cleanup keeps the staging directory and prints its path. A copy is supported (supported_cli_fault) when its lock is byte-identical to the shipped lock, every locked package is installed at its locked version, and --version matches. ensure_session checks this again after it takes the lock, so a concurrent setup cannot swap the CLI before an attach. disconnect needs only an intact copy (intact_cli_fault), so an old release's copy can still detach.
  6. Dispatch at the bottom is an allowlist. open, raw attach, show, install, close-all, and kill-all are rejected locally. setup is a wrapper command, not the forwarded install. Help prints the wrapper's own usage first, and forwards to the CLI only when the copy is supported. Unknown commands go through ensure_session and are forwarded with the session flag and token redaction.

Read the full file on GitHub · 146 lines

Changes

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.

  1. 1mo ago Changed · +34 lines · +581 tokens per session fdf1b9524011
  2. 2mo ago First seen · 112 lines · 1,248 tokens per session scan A 4243e8f1c2f1

Subscribe to this mod's changes

playwright-my-chrome AGENTS.md is an instructions file published in the GitHub repository arDaraz/playwright-my-chrome (2 stars, last pushed 1mo ago), licensed MIT. It adds 1,829 tokens to every session, about $0.0073 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

playwright-my-chrome AGENTS.md compared with instructions from other repositories

playwright-my-chrome AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
playwright-my-chrome AGENTS.mdarDaraz/playwright-my-chromeInstructions file21mo agoMITA1,829Codex, OpenCode
qmax-mcp copilot-instructions.mdQuality-Max/qmax-mcpInstructions file44d agoMITA451GitHub Copilot
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot