cloakbrowser-mcp
AGENTS.md172 starsChanged 5 months agoMITView on GitHub
Repository-specific instructions for AI coding agents working on cloakbrowser-mcp. Global agent instructions remain authoritative for general communication, research, tool use, editing, and completion behavior. cloakbrowser-mcp is a stdio MCP bridge for upstream @playwright/mcp. It starts Playwright MCP as a child process, injects the CloakBrowser Chromium executable through a generated config, forwards upstream tools unchanged, and adds two local introspection tools. - Runtime: Node.js ^22.13.0 || >=24.0.0, ES modules, strict TypeScript with NodeNext. - Public surface: CLI package only, bin: cloakbrowser-mcp.…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 33,398 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository5 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- docs/llms.txtllms.txt
- project-docs-maintainerSkill
- project-pull-requestSkill
- project-releaseSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
40 rules. About 3 are common, 21 are distinctive, and 16 are very specific to this project.
≈3
Common · estimate
Many files like this have a rule of this kind.
≈21
Distinctive · estimate
This author's own choices. Worth a look.
16
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Do not copy, rewrite, or mutate upstream Playwright MCP browser tool contracts.
- Very specific: line 26
Do not add CLOAKBROWSER_MCP_* aliases.
- Distinctive: line 40
Run the smallest relevant checks while developing.
- Very specific: line 52
Keep TypeScript strict mode and ESM.
- Very specific: line 53
Use #src/... for runtime source, @/...
- Distinctive: line 55
Prefer explicit types and small pure functions.
- Very specific: line 60
Do not use console.* in runtime code.
- Very specific: line 62
Do not add any, // @ts-ignore, or non-null assertions to silence the checker.
- Distinctive: line 66
Keep generated browser configuration in the bridge boundary and upstream process transport in the server boundary.
- Common: line 68
Treat generated configs, profiles, extensions, proxy credentials, and browser child processes as lifecycle-owned resources.
- Common: line 70
Keep errors actionable without exposing secrets or protocol-breaking output.
- Distinctive: line 71
Use the fake upstream server for proxy behavior.
- Distinctive: line 73
Prefer property-based tests for parsers, options, environment handling, and similar boundary-heavy pure logic.
- Distinctive: line 75
Use distribution or Docker end-to-end tests for packaged CLI, container entrypoint, or real-browser behavior.
- Distinctive: line 80
Keep large HTML documents and complete page markup in separate template files.
- Very specific: line 83
Do not use style attributes or inline JavaScript event-handler attributes.
- Distinctive: line 88
Use CloakBrowser Free without a license for development and ordinary checks, including end-to-end tests that do not require Pro-specific …
- Distinctive: line 90
Use a licensed CloakBrowser client only for end-to-end tests or verification explicitly requiring Pro-specific behavior.
- Common: line 97
Do not use or inspect saved license credentials for ordinary checks.
- Distinctive: line 103
Use the active skill catalog and matching skill by name.
- Distinctive: line 105
Keep generic workflow instructions, interview guides, and task-packet contracts in the global skills.
- Very specific: line 107
Use Codex's standard Request User Input tool (request_user_input) for unresolved user decisions, following the tool's current host …
- Very specific: line 127
Use documentation-and-adrs for a focused technical document or ADR.
- Very specific: line 134
Use top-level contents: read in GitHub workflows.
- Very specific: line 140
Keep scripts/lib/playwright-mcp-upstream.mjs able to read a tag from a pinned upstream Playwright MCP image reference.
- Distinctive: line 142
Do not broadly disable zizmor or OpenSSF Scorecard findings.
- Very specific: line 143
Keep SECURITY.md actionable with a private vulnerability-reporting path.
- Distinctive: line 147
After workflow, Docker, token-permission, or registry-publishing changes, run:
- Distinctive: line 156
Update relevant public documentation when CLI, Docker, environment, or tool behavior changes.
- Very specific: line 159
Update each affected *.ru.md, *.be.md, *.uk.md, *.es.md, *.pt-BR.md, *.zh.md, *.ja.md, *.de.md, *.fr.md, and *.hi.md, or document why …
- Very specific: line 164
Do not bulk-regenerate translations unless explicitly requested.
- Distinctive: line 177
Keep one logical change per commit and obtain explicit confirmation before committing.
- Very specific: line 178
Follow Conventional Commits 1.0.0.
- Distinctive: line 180
Keep subjects concise, imperative, and present tense after the conventional prefix.
- Distinctive: line 182
Call out security-sensitive changes in pull request descriptions.
- Very specific: line 183
Follow project-pull-request and project-release for external delivery.
- Distinctive: line 188
Do not restore the old native adapter, custom capability model, origin policy, artifact manager, verify helpers, or custom browser tools.
- Distinctive: line 190
Do not add unused dependencies or introduce a bundler or runtime without approval.
- Very specific: line 191
Do not commit dist/, coverage/, artifacts/, site/, .venv-docs/, or node_modules/.
- Distinctive: line 193
Do not weaken TypeScript, ESLint, Prettier, test, security, or compatibility checks.
≈ “Common” is an estimate: at least 1 in 5 of the 43,423 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Repository-specific instructions for AI coding agents working on cloakbrowser-mcp.
Global agent instructions remain authoritative for general communication, research,
tool use, editing, and completion behavior.
Project
cloakbrowser-mcp is a stdio MCP bridge for upstream @playwright/mcp. It starts
Playwright MCP as a child process, injects the CloakBrowser Chromium executable through
a generated config, forwards upstream tools unchanged, and adds two local introspection
tools.
- Runtime: Node.js
^22.13.0 || >=24.0.0, ES modules, strict TypeScript withNodeNext. - Public surface: CLI package only,
bin: cloakbrowser-mcp. - Docker base: pinned official Playwright MCP image from
Dockerfile. - Repository artifacts are written in English unless a localization file requires another language.
Invariants
- Do not copy, rewrite, or mutate upstream Playwright MCP browser tool contracts.
- Local tools are limited to
cloakbrowser_binary_infoandcloakbrowser_bridge_info. PLAYWRIGHT_MCP_*is the primary configuration namespace.CLOAK_PLAYWRIGHT_MCP_*is only for bridge-specific Cloak toggles.- Do not add
CLOAKBROWSER_MCP_*aliases. - Runtime logs never go to
stdout; preserve stdio protocol safety. - Preserve Streamable HTTP session isolation and child-process cleanup.
Layout
src/cli.ts: CLI entry point;src/server.ts: outer MCP proxy.src/bridge/: config, environment, paths, and local tools.src/cli/: options and lifecycle;src/http/: HTTP sessions and transport.src/logging/,src/protocol/,src/runtime/,src/project/: shared runtime support.tests/unit/,tests/integration/,tests/fixtures/: Vitest suites and fake upstream.
Development
Run the smallest relevant checks while developing. Before completion, run:
npm run checkTask-specific commands include npm run test:unit, npm run test:integration,
npm run build, npm run package:verify, npm run docker:build,
npm run docker:smoke, and npm run bridge:compare.
TypeScript And Runtime
- Keep TypeScript
strictmode and ESM; internal imports end with.js. - Use
#src/...for runtime source,@/...in tests,@tests/...for test helpers, and#scripts/...for scripts instead of relative internal imports. - Prefer explicit types and small pure functions.
- Pass only constants, variable references, or single-use inline callbacks as call arguments. Compute other expressions first and store their results, including objects created with constructors, in named variables or constants. Preserve evaluation order and conditional execution when moving expressions.
- Do not use
console.*in runtime code. CLI help/version may useprocess.stdout; errors may useprocess.stderr. - Do not add
any,// @ts-ignore, or non-null assertions to silence the checker.
Bridge And Tests
- Keep generated browser configuration in the bridge boundary and upstream process transport in the server boundary.
- Treat generated configs, profiles, extensions, proxy credentials, and browser child processes as lifecycle-owned resources.
- Keep errors actionable without exposing secrets or protocol-breaking output.
- Use the fake upstream server for proxy behavior.
- Tests write only to
tmpdir()paths they create and clean up. - Prefer property-based tests for parsers, options, environment handling, and similar boundary-heavy pure logic.
- Use distribution or Docker end-to-end tests for packaged CLI, container entrypoint, or real-browser behavior.
HTML Templates
- Keep large HTML documents and complete page markup in separate template files. Small HTML fragments may remain inline in code.
- In HTML files, write CSS in
<style>tags and JavaScript in<script>tags. Do not usestyleattributes or inline JavaScript event-handler attributes; register event listeners from the script instead.
CloakBrowser License Use
- Use CloakBrowser Free without a license for development and ordinary checks, including end-to-end tests that do not require Pro-specific behavior.
- Use a licensed CloakBrowser client only for end-to-end tests or verification explicitly requiring Pro-specific behavior. Do not use it for routine agent browsing, development, unit tests, or fake-upstream integration tests.
- For license-free checks, select a known Free binary, clear
CLOAKBROWSER_LICENSE_KEY, and use an isolated temporary cache without alicense.keyfile. An empty environment key alone does not disable the dependency's saved-key fallback. Clean up the temporary cache afterward. - Do not use or inspect saved license credentials for ordinary checks. Do not stop unrelated browser sessions to obtain a Pro license slot.
Workflow Routing
Generic engineering workflows are installed globally through Engineer Agent Workflows.
Use the active skill catalog and matching skill by name. Do not vendor global workflow
copies into this repository or hardcode plugin-cache paths.
Keep generic workflow instructions, interview guides, and task-packet contracts in
the global skills; do not maintain local copies or references duplicating them.
Use Codex's standard Request User Input tool (request_user_input) for unresolved
user decisions, following the tool's current host constraints.
/specroutes tospec-driven-development./planroutes toplanning-and-task-breakdown.- One authorized task packet routes to
incremental-implementation. - Manifest-scoped UI design after planning routes to
design-planning. - Review, simplification, context engineering, technical documentation or ADRs, decision challenges, idea refinement, interviews, performance, and security route to their matching global skills.
- Global workflow skills are explicit-only. One stage does not authorize another, commits, publication, or external mutations.
Project-owned skills remain under .agents/skills/:
project-docs-maintainer: documentation-set maintenance, localization, and generated documentation consistency.project-pull-request: GitHub pull request preparation and mutation.project-release: release preparation, publication, verification, and recovery.
Use documentation-and-adrs for a focused technical document or ADR. Use
project-docs-maintainer when generated or localized documentation must remain
consistent. Durable workflow artifacts belong under docs/specs/<slug>/; the selected
skill owns its questions, manifests, reviews, checklists, and handoffs.
Supply Chain
- Use top-level
contents: readin GitHub workflows; add write permissions only to the job that needs them. - Pin external Actions by full commit SHA with the intended version in a trailing
comment, for example
# v6. - Pin Docker images as
tag@sha256:<digest>while retaining the readable tag. Use image reference variables such asNODE_IMAGE_REF, not tag-only build inputs. - Keep
scripts/lib/playwright-mcp-upstream.mjsable to read a tag from a pinned upstream Playwright MCP image reference. - Do not broadly disable zizmor or OpenSSF Scorecard findings.
- Keep
SECURITY.mdactionable with a private vulnerability-reporting path. - Branch protection, rulesets, required reviewers, and required checks are maintainer-controlled and require explicit confirmation of the exact policy.
After workflow, Docker, token-permission, or registry-publishing changes, run:
docker run --rm -v "$PWD:/repo" --workdir /repo docker.io/rhysd/actionlint:1.7.12@sha256:b1934ee5f1c509618f2508e6eb47ee0d3520686341fec936f3b79331f9315667 -color
python3 -m pipx run zizmor --min-severity high .Documentation
Update relevant public documentation when CLI, Docker, environment, or tool behavior changes. English documentation is the source for localized MkDocs pages.
- Update each affected
*.ru.md,*.be.md,*.uk.md,*.es.md,*.pt-BR.md,*.zh.md,*.ja.md,*.de.md,*.fr.md, and*.hi.md, or document why deferred. - Translate only changed prose, using DeepL when available and manual translation when unavailable. Preserve Markdown structure, code, identifiers, URLs, flags, variables, package names, image paths, and Material icon tokens.
- Do not bulk-regenerate translations unless explicitly requested. Refresh only actual
affected entries in
docs/data/translation-manifest.json. - Run
npm run docs:build,npm run docs:seo:validate,npm run docs:translations:check, andnpm run check. - Compatibility data is owned by
docs/data/version-compatibility.json. Generate and verify tables withnpm run docs:compatibilityandnpm run docs:compatibility:check. CHANGELOG.mdfollows Keep a Changelog 1.1.0. Before release-note edits, openhttps://keepachangelog.com/en/1.1.0/and preserve[Unreleased], ISO dates, comparison links, and standard sections.
Commit And Release Hygiene
- Keep one logical change per commit and obtain explicit confirmation before committing.
- Follow Conventional Commits 1.0.0. Before committing, open
https://www.conventionalcommits.org/en/v1.0.0/. - Keep subjects concise, imperative, and present tense after the conventional prefix.
- Bump
versiononly when explicitly requested. - Call out security-sensitive changes in pull request descriptions.
- Follow
project-pull-requestandproject-releasefor external delivery. Local validation or artifact preparation does not authorize later actions.
Prohibited Changes
- Do not restore the old native adapter, custom capability model, origin policy, artifact manager, verify helpers, or custom browser tools.
- Do not add unused dependencies or introduce a bundler or runtime without approval.
- Do not commit
dist/,coverage/,artifacts/,site/,.venv-docs/, ornode_modules/. - Do not weaken TypeScript, ESLint, Prettier, test, security, or compatibility checks.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

