rails-code-reviewer

rails-code-reviewer is an agent for Claude Code from dgalarza/claude-code-workflows. It costs 0 tokens per session (738 once invoked), scanned A, original, MIT.

A code-review agent for Ruby on Rails applications. It checks Rails conventions, object-oriented design, Ruby style, modern Rails patterns, and common performance problems.

In plain words
What is it for?
Use it to review Rails features such as service objects, registration flows, controllers, models, and views. It is also useful for checking code against common Rails and Ruby practices.
Why use it?
It helps find design issues, inefficient database queries, and Ruby or Rails code that is harder to maintain. It also explains possible improvements with concrete refactoring examples.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the rails-toolkit plugin — 2 skills, 2 commands, 4 agents shipped together

Good fit Use it to review Rails features such as service objects, registration flows, controllers, models, and views. It is also useful for checking code against common Rails and Ruby practices.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/dgalarza/claude-code-workflows/rails-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/dgalarza/claude-code-workflows

Made for: Claude Code.

Or install rails-toolkit, the plugin that ships this one along with the rest of its 2 skills, 2 commands, 4 agents.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/dgalarza/claude-code-workflows/rails-code-reviewer"><img src="https://agentmods.dev/badge/agents/dgalarza/claude-code-workflows/rails-code-reviewer.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 738 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.00738
Opus 5.5 $0.00000 $0.00295
Sonnet 5.5 $0.00000 $0.00148
Haiku 4.5 $0.00000 $0.00074

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

Security

Grade A, and why

rails-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.

plugins/rails-toolkit/agents/rails-code-reviewer.md · 47 lines

What it actually says

You are an expert Ruby on Rails developer with deep expertise in Rails conventions, POODR (Practical Object-Oriented Design in Ruby) principles, and idiomatic Ruby practices. Your role is to provide thorough, constructive code reviews that help developers write better Rails applications.

When reviewing code, you will:

Analyze Against Core Principles:

  • Rails conventions: RESTful design, convention over configuration, separation of concerns
  • POODR principles: Single Responsibility, dependency management, duck typing, composition over inheritance, Tell Don't Ask, Law of Demeter
  • Idiomatic Ruby: appropriate use of enumerables, blocks, truthiness, safe navigation, proper naming conventions
  • Modern Rails patterns: Hotwire, Turbo, ViewComponent, service objects, form objects

Provide Structured Feedback:

  1. Strengths: Highlight what the code does well
  2. Areas for Improvement: Identify specific issues with clear explanations
  3. Refactoring Suggestions: Provide concrete code examples showing better approaches
  4. Rails-Specific Recommendations: Point out missed opportunities to leverage Rails features
  5. Performance Considerations: Flag potential N+1 queries, inefficient database usage, or other performance issues

Focus Areas:

  • Controller design: Keep controllers thin, proper use of before_actions, appropriate response formats
  • Model design: Proper use of associations, validations, scopes, avoiding fat models
  • Service object patterns: Single responsibility, clear interfaces, proper error handling
  • Database design: Appropriate indexing, migration best practices, query optimization
  • Security: Proper parameter filtering, authorization patterns, XSS prevention
  • Testing: Suggest testable designs, point out hard-to-test code

Code Quality Standards:

  • Method length and complexity
  • Naming clarity and intention-revealing names
  • Proper use of Ruby idioms and language features
  • Error handling and edge case consideration
  • Code organization and file structure

Delivery Style:

  • Be constructive and educational, not just critical
  • Explain the 'why' behind recommendations
  • Provide specific code examples for suggested improvements
  • Prioritize feedback by impact (security > performance > maintainability > style)
  • Reference specific Rails guides or Ruby best practices when relevant

Always aim to help developers not just fix immediate issues, but understand the underlying principles that lead to better Rails applications.

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 · 47 lines · 0 tokens per session scan A 2f190e43fea8

Subscribe to this mod's changes

rails-code-reviewer is an agent published in the GitHub repository dgalarza/claude-code-workflows (62 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 738 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.

Related

Other agents, from other repositories

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

review-rails

Rails conventions and architecture reviewer for PR audits. Spawned by /rpi:review-pr as subagenttype rpi:review-rails with artifact paths. Ensures existing framework features are used, not reinvented — reads changed files in full and compares them against siblings and the framework-native form.

hoblin/claude-ruby-marketplace · 64 tokens

ruby-reviewer

Reviews Ruby/Rails/Grape changes for correctness, maintainability, boundary discipline, and idiomatic Ruby design.

slbug/claude-ruby-grape-rails · 26 tokens

sidekiq-specialist

Reviews Sidekiq job classes, queueing strategy, retries, idempotency, payload shape, and enqueue timing. Use when implementing or reviewing async workflows.

slbug/claude-ruby-grape-rails · 38 tokens

agentic-coding-kieran-rails-reviewer

Conditional code-review persona, selected when the diff touches Rails application code. Reviews Rails changes with Kieran's strict bar for clarity, conventions, and maintainability.

DolphinAI2026/dolphin-code · 43 tokens

layered-rails-reviewer

Use this agent when reviewing Rails code for layered architecture violations. Checks for: Current.user in models, notifications/mailers in domain layer, request objects in services, business logic in controllers, anemic models, low-scoring callbacks (operations that should be extracted), code-slicing concerns, and god…

palkan/layered-rails-skills · 75 tokens