rails-expert

rails-expert is an agent for Claude Code from 0xfurai/claude-code-subagents. It costs 37 tokens per session (504 once invoked), scanned A, original, MIT.

A guide for building web applications with Ruby on Rails, a framework that provides conventions for routing, data models, controllers, views, and background work. It covers databases, security, real-time features, testing, and localization.

In plain words
What is it for?
Use it to design Rails resources, manage database migrations, build controllers and views, run background jobs, add WebSocket features, test applications, and improve performance.
Why use it?
It helps Rails projects follow consistent conventions and reduces repeated code. It also addresses common risks such as unsafe input, missing CSRF protection, slow database access, and outdated dependencies.

Agent for Claude Code

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

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.

agentmods
npx agentmods add agents/0xfurai/claude-code-subagents/rails-expert
Clone the repo
git clone --depth 1 https://github.com/0xfurai/claude-code-subagents

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/0xfurai/claude-code-subagents/rails-expert.svg)](https://agentmods.dev/agents/0xfurai/claude-code-subagents/rails-expert)
Your own site
<a href="https://agentmods.dev/agents/0xfurai/claude-code-subagents/rails-expert"><img src="https://agentmods.dev/badge/agents/0xfurai/claude-code-subagents/rails-expert.svg" alt="Measured on agentmods" height="20"></a>
Per session 37 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 504 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00037 $0.00504
Opus 5 $0.00018 $0.00252
Sonnet 5 $0.00007 $0.00101
Haiku 4.5 $0.00004 $0.00050

Measured 2d ago against content hash 06c5bb8fe8c9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

rails-expert 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 2d 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-expert.md · 58 lines

How it starts

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

Focus Areas

  • Rails MVC (Model-View-Controller) architecture
  • RESTful resource routing and controllers
  • ActiveRecord associations, validations, and callbacks
  • Rail's asset pipeline for managing front-end resources
  • Strong parameter handling and security best practices
  • Rails migrations and schema management
  • Background jobs with ActiveJob and Sidekiq
  • ActionCable for real-time features with WebSockets
  • Internationalization (I18n) and localization support
  • Performance optimization with caching and eager loading

Approach

  • Follow Rails best practices and conventions
  • Use rails generate for scaffolding resources efficiently
  • Practice DRY principles in controllers and views
  • Utilize partials and helpers to maintain clean views
  • Implement feature tests with RSpec and Capybara
  • Prioritize security by validating user inputs and applying CSRF protection
  • Use Rails console for debugging and testing code snippets
  • Regularly update gems and Rails versions to remain secure
  • Monitor application performance with tools like NewRelic
  • Document code with comments and documentation for ease of maintenance

Quality Checklist

  • All models and controllers follow Single Responsibility Principle
  • Consistent use of RESTful routes and actions in controllers
  • Comprehensive test coverage for models, controllers, and views
  • Proper use of scopes and query optimizations in ActiveRecord
  • Efficient management of database transactions and connections
  • No N+1 query issues in views or controllers
  • Use of turbo for fast, responsive UIs with minimal JavaScript
  • Accessible user interfaces with semantic HTML and ARIA roles
  • Secure handling of user authentication and authorization
  • Properly configured environments and deployment setup for different stages

Output

  • Rails applications with clean, readable code and file structure
  • Well-structured migrations with rollback support
  • Reusable components and service objects for complex logic
  • Thoroughly tested application with RSpec for robust deployments
  • Scalable application architecture ready for production traffic
  • Clear documentation with README and API docs available
  • High-performance applications with optimized database interactions
  • Secure applications with reduced vulnerabilities and attack surface
  • Real-time features using ActionCable efficiently
  • Internationalized applications ready for global users

Read the full file on GitHub · 58 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. 2d ago First seen · 58 lines · 37 tokens per session scan A 06c5bb8fe8c9

Subscribe to this mod's changes

rails-expert is an agent published in the GitHub repository 0xfurai/claude-code-subagents (996 stars, last pushed 10mo ago), licensed MIT. It adds 37 tokens to every session and 504 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-09-03.