review-code

review-code is a command for Claude Code from chohra-med/expo_boilerplate. It costs 50 tokens per session (1,471 once invoked), scanned A, original, MIT.

A command that reads the project’s coding rules, checks changed files, and applies fixes when those files do not follow the rules.

In plain words
What is it for?
It is for reviewing uncommitted changes or a branch diff, loading the relevant project guidance, and correcting the affected code.
Why use it?
It catches coding-standard and best-practice violations before they reach a commit, without requiring the developer to review every rule manually.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; positional $N argument.

Good fit It is for reviewing uncommitted changes or a branch diff, loading the relevant project guidance, and correcting the affected code.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/chohra-med/expo_boilerplate/review-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.

Clone the repo
git clone --depth 1 https://github.com/chohra-med/expo_boilerplate

Made for: Claude Code.

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 review-code

README.md
[![agentmods](https://agentmods.dev/badge/commands/chohra-med/expo_boilerplate/review-code.svg)](https://agentmods.dev/commands/chohra-med/expo_boilerplate/review-code)
Your own site
<a href="https://agentmods.dev/commands/chohra-med/expo_boilerplate/review-code"><img src="https://agentmods.dev/badge/commands/chohra-med/expo_boilerplate/review-code.svg" alt="Measured on agentmods" height="20"></a>
Per session 50 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,471 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00050 $0.01471
Opus 5 $0.00025 $0.00736
Sonnet 5 $0.00010 $0.00294
Haiku 4.5 $0.00005 $0.00147

Measured 8d ago against content hash c9e3b6a19eae, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

review-code 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 8d 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/review-code.md · 67 lines

How it starts

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

/review-code — read the rules, fix the changed files

This command reads every relevant code rule and best practice, finds what changed, and edits those files until they comply. Unlike /scan and /review-changes (read-only reports), /review-code applies the fixes.

Scope: $ARGUMENTS (default: uncommitted changes + branch diff vs base).

Procedure

1. Load the rules (read, don't skim)

Read the full enforceable rule set before touching code:

  • ai_rules/rules/frequent_rules.md ← the most-violated rules + pre-commit checklist (READ FIRST)
  • ai_rules/globalRules.md (routing) and ai_rules/rules/best-practices.md
  • Then, per changed-file category, load only the matching packs (same mapping as .claude/skills/best-practices-scan/SKILL.md §2):
    • screens/components → design-system.md (+ Callstack RN: lists, re-renders, animations)
    • hooks → best-practices.md (+ Callstack RN: atomic-state, profile-react)
    • store → state-rtk.md · services → best-practices.md (+ Callstack RN: memory-leaks)
    • theme/tokens → design-system.md §10 · tests → testing.md
  • Best-practices source: Callstack react-native-best-practices skill at ~/.claude/plugins/marketplaces/callstack-agent-skills/skills/react-native-best-practices/references/

2. Gather scope

Same scoping as the scan skill:

BASE=$(git remote show origin 2>/dev/null | awk '/HEAD branch/{print $NF}')   # often development or main
git diff --name-only "${BASE:-main}...HEAD"
git status --porcelain | awk '{print $2}'

Combine + dedupe. Exclude node_modules/, ios/, android/, dist/, coverage/, .expo/, lock files, generated files. Overrides: stagedgit diff --cached; session → files touched this session; file:<path> → one file; branch → branch diff only; all → full tree (slow, ask first). If scope is empty → say "no changes to review" and stop.

3. Detect, then FIX (surgical only)

For each changed file, find violations (static greps from the scan skill §3 + AI-judgment §4) and edit the file to fix them. Touch only what the rule requires — do not reformat or refactor unrelated lines. Apply at minimum:

Read the full file on GitHub · 67 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. 8d ago First seen · 67 lines · 50 tokens per session scan A c9e3b6a19eae

Subscribe to this mod's changes

review-code is a command published in the GitHub repository chohra-med/expo_boilerplate (32 stars, last pushed 6d ago), licensed MIT. It adds 50 tokens to every session and 1,471 once invoked, about $0.0003 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.