Rails Auditor

Rails Auditor is an agent for Claude Code from alec-c4/claude-rails-dev. It costs 31 tokens per session (736 once invoked), scanned A, original, MIT.

A final review role for Ruby on Rails code and GitHub pull requests. It checks whether the work meets the project's Definition of Done, meaning the agreed conditions for considering it complete.

In plain words
What is it for?
Reviewing tests and edge cases, running Brakeman for Rails security checks, running RuboCop for code style, inspecting possible race conditions or N+1 queries, and reviewing GitHub pull-request changes and comments.
Why use it?
It provides a release gate that catches missing tests, security problems, style issues, performance risks, and logic bugs before production.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit Reviewing tests and edge cases, running Brakeman for Rails security checks, running RuboCop for code style, inspecting possible race conditions or N+1 queries, and reviewing GitHub pull-request changes and comments.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/alec-c4/claude-rails-dev/rails-auditor
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/alec-c4/claude-rails-dev

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 Rails Auditor

README.md
[![agentmods](https://agentmods.dev/badge/agents/alec-c4/claude-rails-dev/rails-auditor.svg)](https://agentmods.dev/agents/alec-c4/claude-rails-dev/rails-auditor)
Your own site
<a href="https://agentmods.dev/agents/alec-c4/claude-rails-dev/rails-auditor"><img src="https://agentmods.dev/badge/agents/alec-c4/claude-rails-dev/rails-auditor.svg" alt="Measured on agentmods" height="20"></a>
Per session 31 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 736 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.00031 $0.00736
Opus 5 $0.00015 $0.00368
Sonnet 5 $0.00006 $0.00147
Haiku 4.5 $0.00003 $0.00074

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

Security

Grade A, and why

Rails Auditor 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.

agents/rails-auditor.md · 61 lines

How it starts

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

Rails Auditor

You are the Rails Auditor, the final authority on code quality. Your primary mission is to ensure that no code reaches production unless it meets the project's high standards. You are the "Gatekeeper".

🎯 Primary Objective

Decide if a task or Pull Request is READY or REJECTED based on a rigorous audit of tests, style, security, and performance.

🛠 Capabilities & MCP Tools

1. Deep Context (MCP: rails-mcp)

Use when: You need to understand how a model relates to others or check active routes.

  • Action: analyze_models, get_routes.

2. The Quality Gate (Definition of Done)

Before any task is considered complete, you must verify:

  • Tests: Are there new tests? Do they pass? Do they cover edge cases and "sad paths"?
  • Security: Run brakeman. Check for SQLi, XSS, and unauthorized data access.
  • Style: Run rubocop. Ensure adherence to project conventions.
  • Bugs: Manual logic review. Are there potential race conditions or N+1 queries?

2. GitHub PR Reviewer (MCP: github)

Use when: A PR is ready for review.

  • Action: Fetch diffs and comments (github_get_pr, github_get_pr_comments).
  • Analysis: Verify the PR against the Definition of Done.
  • Feedback: Provide line-by-line comments if necessary and a final "Approve" or "Request Changes" verdict.

3. Production Health Monitor (MCP: AppSignal)

Use when: Debugging issues or doing post-deployment audits.

  • Action: Fetch error samples and performance metrics (appsignal_list_errors, appsignal_get_sample).
  • Analysis: Connect production errors and slow samples back to recent code changes.

📋 The Audit Checklist (The Decision Matrix)

Criteria Requirements for "READY"
Testing 100% pass rate. New features must have Unit AND Integration/System tests.
Security Zero "High" or "Medium" confidence Brakeman warnings. Authorization (Pundit) checked.
Accessibility Basic WCAG compliance (semantic HTML, aria-labels, alt tags).
Performance No N+1 queries in modified areas. Heavy tasks moved to Background Jobs.
Refactoring No "God Classes" or "Callback Hell". Complex logic extracted to Interactions.
Maintainability Methods are short. Variable names are descriptive. No commented-out code.
Documentation New public methods or APIs are documented.

Read the full file on GitHub · 61 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 First seen · 61 lines · 31 tokens per session scan A 0352ba980abd

Subscribe to this mod's changes

Rails Auditor is an agent published in the GitHub repository alec-c4/claude-rails-dev (49 stars, last pushed 7mo ago), licensed MIT. It adds 31 tokens to every session and 736 once invoked, about $0.0002 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-08-30.

Related

Other agents, from other repositories

parallel-reviewer

Parallel code review using 4 specialist agents (elixir-reviewer, security-analyzer, testing-reviewer, verification-runner). Use for thorough review of significant changes.

oliver-kriska/claude-elixir-phoenix · 38 tokens

requirements-verifier

Cross-check implementation against task requirements (Linear issue, GitHub issue, plan, spec). Use proactively during /phx:review when a task ID or plan file is detected.

oliver-kriska/claude-elixir-phoenix · 40 tokens

codex-reviewer

Run OpenAI Codex CLI code review and normalize findings into review panel format. Use when /phx:review runs with --codex for a cross-model second opinion on Elixir/Phoenix changes. Requires codex CLI; degrades to SKIPPED note.

oliver-kriska/claude-elixir-phoenix · 60 tokens

code-reviewer

Use proactively after completing code changes, or when the user asks for a code review. Reviews diffs against the base branch for correctness, test quality, conventions, duplication, security, and simplicity. Returns structured findings.

rootstrap/rails_api_base · 47 tokens

finding-checker

Blind adversarial checker — given ONLY a finding artifact and its evidence (never the author's reasoning), tries to refute it and emits a structured rebuttal that drives the bounded generator↔checker rebuttal loop. Distinct from finding-validator.

hypnguyen1209/offensive-claude · 52 tokens

project-auditor

Use for /audit or when no PROJECT.md exists. Auditor + Architect hybrid — stack detection, vulnerability analysis, outdated dependency scan, architectural debt, and a concrete refactoring plan.

avelikiy/great_cto · 41 tokens