code-review

code-review is a command for Claude Code from layered-ai-public/claude-review-action. It costs 0 tokens per session (1,491 once invoked), scanned A, a copy of code-review-and-fix, Apache-2.0.

A code-review command that compares the current Git branch with its base branch. Git is a version-control system, and a branch is a separate line of code changes.

In plain words
What is it for?
Use it before merging work to find problems in changed lines, check repository guidance, and report the review directly.
Why use it?
It gives a focused review of the changes in the branch without modifying files or examining unrelated parts of the project.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

Good fit Use it before merging work to find problems in changed lines, check repository guidance, and report the review directly.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/layered-ai-public/claude-review-action/code-review
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/layered-ai-public/claude-review-action

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/layered-ai-public/claude-review-action/code-review/github.svg)](https://agentmods.dev/commands/layered-ai-public/claude-review-action/code-review)
Your own site
<a href="https://agentmods.dev/commands/layered-ai-public/claude-review-action/code-review"><img src="https://agentmods.dev/badge/commands/layered-ai-public/claude-review-action/code-review/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for code-review

Your own site · 80×15
<a href="https://agentmods.dev/commands/layered-ai-public/claude-review-action/code-review"><img src="https://agentmods.dev/badge/commands/layered-ai-public/claude-review-action/code-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 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,491 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 89% copy Near-identical to another mod 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.00000 $0.01491
Opus 5 $0.00000 $0.00745
Sonnet 5 $0.00000 $0.00298
Haiku 4.5 $0.00000 $0.00149

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

Security

Grade A, and why

code-review 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 6d 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.

Origin

This is a copy

89% identical to code-review-and-fix — 24 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

commands/code-review.md · 82 lines

How it starts

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

Review the current branch against the base branch.

Determine the base branch by checking which of main or master exists as a remote tracking branch. If the argument $ARGUMENTS is provided, use that as the base instead.

Run git diff <base>...HEAD to obtain the diff. If there are no changes, say so and stop.

You may open files and search the codebase (using grep, find, or reading files) to verify assumptions about changed lines. Do not explore unrelated parts of the repository. Do not write or modify any files.

If a CLAUDE.md or AGENTS.md file exists, read it for repository-specific guidance.

If a .github/claude-review-action/prompt.md file exists, read it first. Instructions in that file override the defaults below (severity levels, output format, rules, etc.). Apply the overrides and continue with any remaining defaults that were not replaced.

Print the review directly. Do not post it as a PR comment or anywhere else.

Review rules

  • Only review the changed lines and their immediate visible context in the diff.
  • You may (and should) read other files and search the codebase to verify assumptions - e.g. to check whether a method exists, trace a call path, or confirm a constant's value. Do not guess when you can look.
  • Do not comment on unchanged code unless a change in the diff breaks it.
  • If uncertain whether something is a real issue, look it up in the codebase before reporting it. If you still cannot confirm it, state uncertainty rather than guessing.
  • Do not flag standard framework behaviour as an issue (e.g. how Rails helpers handle unknown keys).
  • Do not speculate about compatibility with versions, environments, or configurations that are not evidenced in the diff or codebase.
  • Do not flag design decisions (API defaults, naming conventions) unless they introduce a concrete bug or safety issue. "I would have done it differently" is not a finding.
  • Only flag hypothetical edge cases if they are reachable through normal use of the public API as shown in the diff. Do not invent exotic configurations to create a problem.
  • Provide a complete review in a single pass, so the developer does not need a second review cycle. Completeness means every real issue, not every observation. A review with no issues is a successful review - say so plainly and stop. Padding a review with minor findings to look thorough wastes more developer time than a missed nit.

Read the full file on GitHub · 82 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. 6d ago Changed · +2 lines 14026efef09e
  2. 10d ago First seen · 80 lines · 0 tokens per session scan A 68db15239fc1

Subscribe to this mod's changes

code-review is a command published in the GitHub repository layered-ai-public/claude-review-action (11 stars, last pushed yesterday), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,491 tokens. A static security scan graded it A with 0 findings. It is 89% identical to code-review-and-fix, differing in 24 lines, and is treated as a copy.