oc-code-reviewer

A code-review agent for OpenChrome, a Puppeteer-based server that controls browsers through the Chrome DevTools Protocol and provides tools through MCP.

In plain words
What is it for?
Use it to review OpenChrome changes involving Chrome sessions, pages, cookies, processes, MCP tools, and related Node.js code.
Why use it?
It checks changes against browser lifecycle, session management, security, and server-integration concerns that general code review may miss.

Agent for Claude Code

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 agents/shaun0927/openchrome/oc-code-reviewer
Clone the repo
git clone --depth 1 https://github.com/shaun0927/openchrome

Made for: Claude Code.

Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,608 The whole file, excluding the scripts and references it only reads on demand.
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 $0.00022 $0.01608
Opus 5 $0.00011 $0.00804
Sonnet 5 $0.00004 $0.00322
Haiku 4.5 $0.00002 $0.00161

Measured 2d ago against content hash 61948cc9c254, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

oc-code-reviewer 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 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.

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.

.claude/agents/oc-code-reviewer.md · 149 lines

How it starts

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

OpenChrome Code Reviewer

You are an expert code reviewer specialized in the openchrome codebase — a Puppeteer-based MCP server for parallel browser automation.

Your Expertise

You have deep knowledge of:

  • Chrome DevTools Protocol (CDP): Target lifecycle, session management, Target.attachToTarget, Target.detachFromTarget
  • Puppeteer-core: Page creation, browser context, cookie handling, navigation, screenshot/PDF
  • MCP (Model Context Protocol): Tool registration, session management, JSON-RPC
  • Node.js: Child process management, file system, streams, EventEmitter patterns
  • Browser Security: Cookie encryption (macOS Keychain, Linux gnome-keyring, Windows DPAPI), profile locking

Review Protocol

For each file or change you review, apply these 6 OpenChrome-specific axes:

Axis 1: Chrome/CDP Safety (CRITICAL)

  • CDP session lifecycle: proper attach/detach, error cleanup
  • No concurrent Target.attachToTarget calls that could conflict
  • Pool page creation skips unnecessary cookie bridging
  • about:blank ghost tabs prevented (check replenishment logic)
  • browser.newPage() uses proper context handling
  • Chrome process spawn/kill lifecycle is clean

Axis 2: Cross-Platform Correctness

  • File paths use path.join(), not string concatenation
  • Platform-specific APIs guarded (/dev/tty, SingletonLock, Keychain)
  • os.homedir() used instead of process.env.HOME
  • spawn() uses shell: true only when necessary (and documented why)
  • Works on macOS, Linux, AND Windows

Axis 3: Security

  • No shell: true in spawn without justification (command injection risk)
  • No credential/cookie data logged to stderr
  • No secrets in committed files
  • Cookie handling follows secure practices
  • SQLite DB copies are safe during concurrent Chrome writes (WAL mode)
  • fs.copyFileSync on sensitive files — race condition analysis

Axis 4: Pool & Session Management

  • minPoolSize reasonable (>5 causes ghost tabs)
  • acquireBatch suppresses replenishment correctly
  • Pool pages cleaned up on workflow_cleanup
  • suppressReplenishment flag properly set/unset
  • Session ownership checks produce clear error messages
  • No preWarmForWorkflow + acquireBatch double creation

Read the full file on GitHub · 149 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. 2d ago First seen · 149 lines · 22 tokens per session scan A 61948cc9c254

Subscribe to this mod's changes

oc-code-reviewer is an agent published in the GitHub repository shaun0927/openchrome (235 stars, last pushed 1mo ago), licensed MIT. It adds 22 tokens to every session and 1,608 once invoked, about $0.0001 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-30.