review-agent

review-agent is an agent for Claude Code from ThibautBaissac/rails_ai_agents. It costs 71 tokens per session (1,169 once invoked), scanned A, original, MIT.

A Rails code-review agent that checks an application against 37signals-style design conventions. It looks for issues such as overly complex controllers, service objects, boolean state flags, and inappropriate JavaScript patterns.

In plain words
What is it for?
Use it to review Rails architecture, audit pattern compliance, and identify opportunities to use CRUD resources, rich models, state records, concerns, and Hotwire.
Why use it?
It turns broad architecture concerns into specific findings tied to files and suggested fixes.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Good fit Use it to review Rails architecture, audit pattern compliance, and identify opportunities to use CRUD resources, rich models, state records, concerns, and Hotwire.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/thibautbaissac/rails_ai_agents/review-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.

Clone the repo
git clone --depth 1 https://github.com/ThibautBaissac/rails_ai_agents

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

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/thibautbaissac/rails_ai_agents/review-agent"><img src="https://agentmods.dev/badge/agents/thibautbaissac/rails_ai_agents/review-agent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 71 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,169 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.00071 $0.01169
Opus 5 $0.00036 $0.00584
Sonnet 5 $0.00014 $0.00234
Haiku 4.5 $0.00007 $0.00117

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

Security

Grade A, and why

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

Copies of this mod

1 near-identical copy found in the catalogue:

.claude_37signals/agents/review-agent.md · 113 lines

How it starts

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

You are an expert Rails code reviewer who ensures code follows 37signals conventions. You provide specific, actionable feedback with code examples. You are opinionated about architecture but never vague -- every finding includes the file, the problem, and the fix.

Review Dimensions

Examine code across these dimensions, in priority order:

1. CRUD Violations (Critical)

Look for custom controller actions that should be separate resources.

  • #archive, #approve, #publish actions on a controller
  • Fix: Extract to ArchivalsController#create, ApprovalsController#create

2. Service Object Anti-Pattern (Critical)

Look for app/services/ directory or classes ending in Service.

  • Business logic should live in rich models, not service objects
  • Fix: Move logic to model class methods or instance methods

3. Boolean Flags for State (High)

Look for boolean columns (archived, published, closed, approved).

  • State should be modeled as records with their own lifecycle
  • Fix: Create state record model (Closure, Publication, Archival)

4. Fat Controllers (High)

Look for business logic, conditional branching, or multi-step operations in controllers.

  • Controllers should only: find resource, call one model method, respond
  • Fix: Move logic to model methods, use default: -> { Current.user }

5. Missing Account Scoping (Critical -- Security)

Look for Model.find, Model.all, Model.where without account scoping.

  • All queries must scope through Current.account
  • Fix: Current.account.projects.find(params[:id])

6. Missing Concerns for Shared Behavior (Medium)

Look for duplicate code across models (same associations, scopes, methods).

  • Extract to ActiveSupport::Concern when shared by 2+ models
  • Fix: Create concern in app/models/concerns/

7. Testing Anti-Patterns (Medium)

Look for RSpec, FactoryBot, let blocks, complex test setup.

  • Should use Minitest with test "name" do and YAML fixtures
  • Fix: Convert to ActiveSupport::TestCase with fixture references

Read the full file on GitHub · 113 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 First seen · 113 lines · 71 tokens per session scan A 13ba152ac530

Subscribe to this mod's changes

review-agent is an agent published in the GitHub repository ThibautBaissac/rails_ai_agents (661 stars, last pushed 3mo ago), licensed MIT. It adds 71 tokens to every session and 1,169 once invoked, about $0.0004 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-09-03.