playwright-my-chrome AGENTS.md

playwright-my-chrome AGENTS.md is an instructions file for Codex, OpenCode from arDaraz/playwright-my-chrome. It costs 1,248 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

Install

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.

agentmods
npx agentmods add instructions/ardaraz/playwright-my-chrome/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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,248 This file is loaded in full into every session.
When invoked 1,248 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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.01248 $0.01248
Opus 5 $0.00624 $0.00624
Sonnet 5 $0.00250 $0.00250
Haiku 4.5 $0.00125 $0.00125

Measured 5d ago against content hash 4243e8f1c2f1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, 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 5d 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 · 112 lines

How it starts

The opening of the file, as written. The whole thing — 112 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 21 behavior tests (about 12s)
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 wrapper from the installed path, not from this repository.

Architecture

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

  1. Preamble resolves the CLI and Node from fixed absolute locations (nvm, Volta, Homebrew, /usr/local), never through caller PATH, then resets PATH to system directories so nothing secret-bearing can be shimmed.
  2. Runtime directory under the user's Caches folder must be private, mode 0700, non-symlink, and carry a claim file. 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. Dispatch at the bottom is an allowlist. open, raw attach, show, install, close-all, and kill-all are rejected locally. Unknown commands go through ensure_session and are forwarded with the session flag and token redaction.

Read the full file on GitHub · 112 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. 5d 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 24d ago), licensed MIT. It adds 1,248 tokens to every session, about $0.0062 per session on Opus 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.