code-review-oc

A code-review command for the OpenChrome project that sends the selected changes to three specialist reviewers at once.

In plain words
What is it for?
Review staged or unstaged changes, one file, a directory of TypeScript files, or the whole source folder.
Why use it?
It helps spot security, reliability, compatibility, and code-quality problems before changes are merged. Findings are grouped by urgency so the most serious issues stand out.

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

Made for: Claude Code.

Per session 25 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,102 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.00025 $0.01102
Opus 5 $0.00013 $0.00551
Sonnet 5 $0.00005 $0.00220
Haiku 4.5 $0.00003 $0.00110

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

Security

Grade A, and why

code-review-oc 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/commands/code-review-oc.md · 134 lines

How it starts

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

OpenChrome Deep Code Review

Target: $ARGUMENTS

  • No argument → review staged + unstaged changes (git diff HEAD)
  • File path → review that file
  • Directory → review all .ts files in it
  • "all" → review entire src/ directory

Priority Definitions

Tell ALL agents to use this classification:

Priority Definition Examples
P0 Blocker — must fix before merge Security hole, Chrome crash, MCP stdout corruption, silent auth bypass, data loss
P1 Must fix — should fix in this PR Ghost tabs, session corruption, cross-platform breakage, unhandled promise crash, resource leak
P2 Improve — can be follow-up Code style, docs, minor perf, unlikely edge cases

STEP 1: Collect File List

# No argument:
git diff --name-only HEAD
git diff --name-only --cached

# Or use the specified path/directory

Store the file list. You will pass it to all 3 agents.

STEP 2: Launch 3 Agents in Parallel

Launch ALL THREE at once using the Task tool. Each receives the SAME file list.

Agent 1 — Code Reviewer:

  • subagent_type: "oc-code-reviewer"
  • model: "sonnet"
  • Prompt: List every absolute file path. Tell it to:
    1. Read each file in full
    2. Check against 6 OpenChrome areas (Chrome/CDP, Cross-Platform, Security, Pool/Session, Architecture, Reliability)
    3. Classify each finding as P0, P1, or P2
    4. Only report findings with confidence ≥ 60/100

Agent 2 — Silent Failure Hunter:

  • subagent_type: "oc-silent-failure-hunter"
  • model: "sonnet"
  • Prompt: List every absolute file path. Tell it to:
    1. Hunt empty catches, swallowed CDP errors, unhandled promises, missing error propagation, state corruption, resource leaks
    2. Classify each finding as P0, P1, or P2
    3. Only report findings with confidence ≥ 60/100

Agent 3 — Platform Reviewer:

  • subagent_type: "oc-platform-reviewer"
  • model: "sonnet"
  • Prompt: List every absolute file path. Tell it to:
    1. Check for process.env.HOME, /dev/tty, hardcoded paths, SIGKILL/SIGTERM without platform guards, spawn shell issues
    2. Classify each finding as P0, P1, or P2
    3. Only report findings with confidence ≥ 60/100

Read the full file on GitHub · 134 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 · 134 lines · 25 tokens per session scan A 2ddfe3ad32e4

Subscribe to this mod's changes

code-review-oc is a command published in the GitHub repository shaun0927/openchrome (235 stars, last pushed 1mo ago), licensed MIT. It adds 25 tokens to every session and 1,102 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.