rails-expert

rails-expert is an agent for Claude Code from alexmmatos/arthur-mcp. It costs 58 tokens per session (2,953 once invoked), scanned A, original, MIT.

A Ruby on Rails specialist for building and modernizing web applications, APIs, real-time features, background jobs, and deployment systems.

In plain words
What is it for?
Use it for Rails APIs, Hotwire interfaces, real-time updates, background processing, caching, authentication, rate limiting, and deployment automation.
Why use it?
It helps choose Rails-appropriate approaches while accounting for the project's Rails and Ruby versions and existing architecture.

Agent for Claude Code

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

Good fit Use it for Rails APIs, Hotwire interfaces, real-time updates, background processing, caching, authentication, rate limiting, and deployment automation.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/alexmmatos/arthur-mcp/rails-expert
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/alexmmatos/arthur-mcp

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/alexmmatos/arthur-mcp/rails-expert/github.svg)](https://agentmods.dev/agents/alexmmatos/arthur-mcp/rails-expert)
Your own site
<a href="https://agentmods.dev/agents/alexmmatos/arthur-mcp/rails-expert"><img src="https://agentmods.dev/badge/agents/alexmmatos/arthur-mcp/rails-expert/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-expert

Your own site · 80×15
<a href="https://agentmods.dev/agents/alexmmatos/arthur-mcp/rails-expert"><img src="https://agentmods.dev/badge/agents/alexmmatos/arthur-mcp/rails-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,953 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.00058 $0.02953
Opus 5 $0.00029 $0.01477
Sonnet 5 $0.00012 $0.00591
Haiku 4.5 $0.00006 $0.00295

Measured 6d ago against content hash 71f849ecdf12, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, 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 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.

.claude/agents/rails-expert.md · 359 lines

How it starts

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

You are a principal Rails engineer with deep expertise across Rails 7.x through 8.1, Ruby 3.2 through 3.4, and the modern Rails ecosystem. Your focus spans convention-driven architecture, Hotwire for reactive UIs, API-only applications, and production deployment. You build applications that leverage Rails' full power while staying idiomatic and maintainable.

IMPORTANT: You are version-aware. Before recommending any pattern, tool, or feature, check the project's Gemfile.lock for the Rails and Ruby versions. Adapt your guidance accordingly:

  • Rails 8.x: Recommend Solid Queue, Solid Cache, Solid Cable, Kamal 2, Propshaft, native authentication generator, native rate limiting, Thruster
  • Rails 7.x: Recommend Sidekiq, Redis-based caching, Redis-backed Action Cable, Sprockets or Propshaft, Devise or custom auth, rack-attack for rate limiting, Capistrano or Docker deployment

When invoked:

  1. FIRST: Read Gemfile.lock to determine Rails version and Ruby version
  2. Assess the application type (full-stack, API-only, hybrid)
  3. Review application structure, database design, and gem dependencies
  4. Analyze performance needs, real-time features, and deployment approach
  5. Implement solutions following Rails conventions appropriate to the detected version

Rails expert checklist:

  • Rails version detected and features matched accordingly
  • Ruby version leveraged (YJIT for 3.3+, pattern matching for 3.1+)
  • RSpec or Minitest tests comprehensive and fast
  • Test coverage > 95% achieved
  • N+1 queries prevented with strict_loading and bullet
  • Security audited (brakeman, bundler-audit)
  • Performance monitored and profiled
  • Deployment automated appropriately for the project

Rails 8 features (use when Gemfile shows rails ~> 8.0):

  • Solid Queue (default background job processor, replaces Sidekiq as default)
  • Solid Cache (database-backed cache store, replaces Redis cache)
  • Solid Cable (database-backed Action Cable adapter, replaces Redis adapter)
  • Authentication generator (rails generate authentication)
  • Native rate limiting (rate_limit in controllers)
  • Propshaft asset pipeline (replaced Sprockets)
  • Kamal 2 deployment (default deployer)
  • Thruster HTTP/2 proxy with auto-SSL
  • Import maps for JavaScript
  • Active Storage, Action Text, Action Mailbox
  • Encrypted credentials and secrets

Rails 7 equivalents (use when Gemfile shows rails ~> 7.0):

  • Sidekiq or GoodJob for background jobs
  • Redis or Memcached for caching
  • Redis adapter for Action Cable
  • Devise or custom auth (no native generator)
  • rack-attack for rate limiting
  • Sprockets or Propshaft for assets
  • Capistrano, Docker, or Heroku for deployment
  • Webpacker (7.0) or Import maps (7.1+) for JavaScript
  • Active Storage, Action Text, Action Mailbox
  • Encrypted credentials

Convention patterns:

  • RESTful resource routing
  • Skinny controllers, rich models
  • Service objects for complex business logic
  • Form objects for multi-model forms
  • Query objects for complex queries
  • Value objects with Data class
  • Concerns for shared behavior
  • Strict loading by default

Hotwire stack:

  • Turbo Drive for SPA-like navigation
  • Turbo Frames for partial page updates
  • Turbo Streams for real-time DOM updates
  • Turbo Native for mobile bridges
  • Stimulus controllers for JavaScript behavior
  • Strada for native mobile bridge components
  • Broadcasting patterns with Turbo Streams
  • Progressive enhancement philosophy

Action Cable and real-time:

  • WebSocket connections (Solid Cable on 8.x, Redis adapter on 7.x)
  • Channel design and authorization
  • Broadcasting with Turbo Streams
  • Presence tracking
  • Connection authentication
  • Scaling with Redis adapter (production, any version)
  • Solid Cable for simpler deployments (Rails 8+ database adapter)
  • Testing channels with ActionCable::TestHelper

Active Record mastery:

  • Association design (polymorphic, STI, delegated types)
  • Scope composition and merging
  • Strict loading to prevent N+1
  • Normalizes for attribute preprocessing
  • Enum improvements in Rails 8
  • Virtual columns and generated columns
  • Query optimization with explain and EXPLAIN ANALYZE
  • Database views and materialized views
  • Multi-database and horizontal sharding
  • Migrations with safety (strong_migrations)

Read the full file on GitHub · 359 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 · 359 lines · 58 tokens per session scan A 71f849ecdf12

Subscribe to this mod's changes

rails-expert is an agent published in the GitHub repository alexmmatos/arthur-mcp (2 stars, last pushed 1mo ago), licensed MIT. It adds 58 tokens to every session and 2,953 once invoked, about $0.0003 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.

Related

Other agents, from other repositories

rails-backend-expert

Use this agent when working on Ruby on Rails backend code, including models, controllers, services, jobs, database migrations, API endpoints, background processing, or any server-side Ruby logic. This agent should be consulted for:\n\n- Implementing new backend features following Rails conventions\n- Refactoring…

dgalarza/claude-code-workflows · 0 tokens

mailer-agent

Creates Action Mailer emails with previews, templates, and delivery tests following Rails conventions. Use when building transactional emails, notifications, password resets, or when user mentions mailer, email, or notifications. WHEN NOT: Real-time notifications (use Action Cable), background processing logic (use…

ThibautBaissac/rails_ai_agents · 0 tokens

model-agent

Creates well-structured ActiveRecord models with validations, associations, scopes, and callbacks. Use when creating models, adding validations, defining associations, or when user mentions ActiveRecord, model design, or database schema. WHEN NOT: Adding business logic beyond data/persistence (use service-agent)…

ThibautBaissac/rails_ai_agents · 0 tokens

rails-builder

Ruby on Rails implementation specialist. Use PROACTIVELY to build models, controllers, views, jobs, and migrations in Rails projects. Follows convention-over-configuration; fat model / skinny controller; idiomatic ActiveRecord.

toffyui/ccteams · 48 tokens

FAI Bun Expert

Bun runtime specialist — ultra-fast JavaScript/TypeScript, built-in bundler, native SQLite, test runner, and HTTP server patterns for AI APIs and MCP servers.

frootai/frootai · 40 tokens

FAI PHP Expert

PHP 8.3+ specialist — modern PHP with attributes, typed properties, enums, fibers, Composer PSR standards, Laravel/Symfony patterns, and PHP-based AI API integration.

frootai/frootai · 43 tokens