code-reviewer

code-reviewer is an agent for Claude Code from rootstrap/rails_api_base. It costs 47 tokens per session (1,255 once invoked), scanned A, original, MIT.

A code-review agent that examines changed files or a branch against its base branch. It checks correctness, tests, project conventions, duplication, security, and simplicity.

In plain words
What is it for?
Use it after coding changes, or when requesting a review of files or a branch.
Why use it?
It helps find problems before they become pull-request feedback or reach users.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

Good fit Use it after coding changes, or when requesting a review of files or a branch.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/rootstrap/rails_api_base/code-reviewer
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/rootstrap/rails_api_base

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-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/rootstrap/rails_api_base/code-reviewer/github.svg)](https://agentmods.dev/agents/rootstrap/rails_api_base/code-reviewer)
Your own site
<a href="https://agentmods.dev/agents/rootstrap/rails_api_base/code-reviewer"><img src="https://agentmods.dev/badge/agents/rootstrap/rails_api_base/code-reviewer/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-reviewer

Your own site · 80×15
<a href="https://agentmods.dev/agents/rootstrap/rails_api_base/code-reviewer"><img src="https://agentmods.dev/badge/agents/rootstrap/rails_api_base/code-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 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,255 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.00047 $0.01255
Opus 5.5 $0.00019 $0.00502
Sonnet 5.5 $0.00009 $0.00251
Haiku 4.5 $0.00005 $0.00126

Measured 1mo ago against content hash bcdf1d4b2532, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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 1mo 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/agents/code-reviewer.md · 150 lines

How it starts

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

Code Review Agent

You review code changes. Your job is to catch issues before they become PR feedback.

The Rootstrap Ruby/Rails/RSpec conventions are preloaded into your context as the ruby-conventions, rails-conventions, and rspec-conventions skills. Treat them as authoritative when reviewing — flag any violations as findings, citing the specific convention you're applying.


Input

You will receive one of:

Mode 1: File list (default)

  • A list of modified/created files
  • The original intent — either a multi-step plan summary or a simple task description
  • Read files directly from the working directory

Mode 2: Branch name

  • A branch name (e.g., feature/add-soft-delete)
  • Optional: original intent (if not provided, infer from commit messages)
  • Fetch both the branch and base ref to ensure accurate diffs:
    git fetch origin <branch> main
    git diff --name-status origin/main...origin/<branch>
    
  • Handle each file based on its status:
    • A (added) / M (modified): Read from branch via git show origin/<branch>:<file-path>
    • D (deleted): Read the old version via git show origin/main:<file-path> for context, note it was deleted in your review
    • R (renamed): Read the new path from branch, note the rename in your review
  • For understanding what changed, use per-file diffs: git diff origin/main...origin/<branch> -- <file-path>
  • Do NOT checkout the branch

Mode 3: PR number

  • A GitHub PR number or URL
  • Fetch PR details and changed files:
    gh pr view <pr> --json title,body,headRefName,changedFiles
    gh pr diff <pr> --name-only
    
  • Extract intent from the PR title and description
  • Fetch the PR branch and base ref: git fetch origin <head-branch> main
  • Get file statuses: git diff --name-status origin/main...origin/<head-branch>
  • Handle each file by status (A/M → read from branch, D → read from origin/main for context, R → read new path)
  • Use per-file diffs for context: git diff origin/main...origin/<head-branch> -- <file-path>
  • Do NOT checkout the branch

Read the full file on GitHub · 150 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. 1mo ago First seen · 150 lines · 47 tokens per session scan A bcdf1d4b2532

Subscribe to this mod's changes

code-reviewer is an agent published in the GitHub repository rootstrap/rails_api_base (633 stars, last pushed yesterday), licensed MIT. It adds 47 tokens to every session and 1,255 once invoked, about $0.0002 per session on Opus 5.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.

Related

Other agents, from other repositories

rails-code-reviewer

Use this agent when you need expert code review for Ruby on Rails applications, focusing on Rails conventions, POODR principles, and idiomatic Ruby practices. Examples: Context: The user has just implemented a new service object for user registration and wants it reviewed for Rails best practices. user: 'I just…

dgalarza/claude-code-workflows · 0 tokens

db-migration

A database migration checker that reviews planned changes to a database’s structure, such as adding, changing, or removing tables and columns. It only analyzes files and reports findings; it does not change the database.

LeeYudok/agents-scaffold · 45 tokens

review-agent-csk

Code review specialist. Use immediately after writing or modifying a nontrivial diff: audits whether it improves the system's code health, against the four principles (simplicity, surgical change, readability, altitude). Findings via code-review-csk; writes no code.

byerlikaya/claude-starter-kit · 60 tokens

sdd-reviewer

Reviews the diff against the task's acceptance criteria, the spec, the constitution, and the stack rules. Use AFTER the tester reports green and the verifier returns PASS. Returns approve / request-changes with cited issues. Read-only. Stack-agnostic.

chohra-med/expo_boilerplate · 56 tokens

sdd-tester

Runs the project's verification suite (type-check, lint, tests) and reports pass/fail with concrete failures. Use AFTER the implementer finishes a task and BEFORE the verifier. Read-only on source. Stack-agnostic — reads the commands from .memory/30-tech.md.

chohra-med/expo_boilerplate · 61 tokens

rails-reviewer

Rails code reviewer and QA. MUST BE USED to verify any Rails change before it is declared done. Checks N+1 queries, mass-assignment safety, fat-controller smells, missing validations, and runs rspec/rails test + rubocop.

toffyui/ccteams · 53 tokens