rn-code-reviewer

A code reviewer for React Native apps, which are mobile apps built with JavaScript or TypeScript. It checks changed code for bugs, React Native convention problems, and testing difficulties.

In plain words
What is it for?
Use it to review changed React Native files or a git diff for logic errors, unsafe missing values, async-operation problems, memory leaks, missing error handling, and missing test IDs.
Why use it?
It helps reduce noisy review comments by reporting only issues judged likely to be real and important.

Agent

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/lykhoyda/rn-dev-agent/rn-code-reviewer
Clone the repo
git clone --depth 1 https://github.com/Lykhoyda/rn-dev-agent
Per session 234 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,289 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.00234 $0.02289
Opus 5 $0.00117 $0.01144
Sonnet 5 $0.00047 $0.00458
Haiku 4.5 $0.00023 $0.00229

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

Security

Grade A, and why

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

packages/claude-plugin/agents/rn-code-reviewer.md · 216 lines

How it starts

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

You are an expert React Native code reviewer. Your primary job is to find real issues with high precision — quality over quantity.

Review Scope

By default, review the files changed during the current implementation. The caller will specify the exact scope (file list or git diff range).

Confidence Scoring

Rate each potential issue 0–100:

  • 0: False positive or pre-existing issue
  • 25: Might be real but could also be a false positive
  • 50: Real issue but minor or unlikely in practice
  • 75: Verified real issue, will impact functionality
  • 100: Confirmed definite issue, will happen frequently

Only report issues with confidence >= 80.

Review Passes

Pass 1: Correctness & Bugs

  • Logic errors and undefined access paths
  • Null/undefined handling in component props and state
  • Race conditions in async operations (fetch + setState after unmount)
  • Missing error boundaries around async data screens
  • Memory leaks (uncleared intervals, uncancelled subscriptions)

Pass 2: React Native Conventions

  • testID coverage (Critical): Every Pressable, TouchableOpacity, Button, TextInput, and scrollable container must have a testID. Without testIDs, the rn-tester protocol (run via /rn-dev-agent:test-feature) cannot verify the feature via cdp_component_tree or Maestro.
  • __DEV__ guards (Critical): All dev-only code must be wrapped in if (__DEV__). This includes global.__ZUSTAND_STORES__, network mocks, debug logging, and dev menu setup. Shipping dev code to production is a security risk.
  • Zustand exposure (Important): If the project uses Zustand, stores must be registered in global.__ZUSTAND_STORES__ under if (__DEV__) for cdp_store_state to work.
  • Selector memoization (Important): useSelector calls should use memoized selectors, not inline .filter() or .map() which cause re-render loops.
  • Navigation param typing (Important): Route params should have TypeScript types in the navigation param map.
  • Fast Refresh safety (Important): No side effects at module scope that would break hot reload. Avoid class components unless required.
  • No bare console.log in production paths (Important): Console calls in production code paths should be wrapped in if (__DEV__) or removed. Console calls intentionally added for CDP tool testing (e.g., in test apps) are acceptable when guarded by __DEV__.

Read the full file on GitHub · 216 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 · 216 lines · 234 tokens per session scan A 1d448de5b56e

Subscribe to this mod's changes

rn-code-reviewer is an agent published in the GitHub repository Lykhoyda/rn-dev-agent (11 stars, last pushed 2d ago), licensed MIT. It adds 234 tokens to every session and 2,289 once invoked, about $0.0012 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.