code-review-and-fix

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

A command that reviews the current Git branch against a base branch, such as main or master, and fixes problems found in the changed code.

In plain words
What is it for?
Use it to inspect a branch's changes, verify their surrounding code and repository rules, and apply fixes for review findings.
Why use it?
It gives the review a defined comparison and checks repository guidance before assessing the diff. If there are no branch changes, it stops without making a review.

Command for Claude Code

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

Good fit Use it to inspect a branch's changes, verify their surrounding code and repository rules, and apply fixes for review findings.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/layered-ai-public/claude-review-action/code-review-and-fix/github.svg)](https://agentmods.dev/commands/layered-ai-public/claude-review-action/code-review-and-fix)
Your own site
<a href="https://agentmods.dev/commands/layered-ai-public/claude-review-action/code-review-and-fix"><img src="https://agentmods.dev/badge/commands/layered-ai-public/claude-review-action/code-review-and-fix/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-and-fix

Your own site · 80×15
<a href="https://agentmods.dev/commands/layered-ai-public/claude-review-action/code-review-and-fix"><img src="https://agentmods.dev/badge/commands/layered-ai-public/claude-review-action/code-review-and-fix.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,699 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.00000 $0.01699
Opus 5 $0.00000 $0.00849
Sonnet 5 $0.00000 $0.00340
Haiku 4.5 $0.00000 $0.00170

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

Security

Grade A, and why

code-review-and-fix 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

commands/code-review-and-fix.md · 96 lines

How it starts

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

Review and fix 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.

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.

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 · 96 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 Changed · +2 lines 44032e2e5aab
  2. 12d ago First seen · 94 lines · 0 tokens per session scan A 54ca6ba50347

Subscribe to this mod's changes

code-review-and-fix is a command published in the GitHub repository layered-ai-public/claude-review-action (11 stars, last pushed 3d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,699 tokens. 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.