Skip to main content
subagent CX Codex

rails-expert · voltagent/awesome-codex-subagents — Codex subagent for Ruby on Rails

rails-expert traces Rails changes from request entry point to persistence and response. Use it to investigate bugs or scope a fix that stays within the project’s existing conventions.

MIT ★ 6,505 updated 2026-10-05

Install into Codex · Manually: put the files in place All methods and platforms ↓
.codex/agents/rails-expert.toml
Open on GitHub

What rails-expert does

rails-expert maps the execution boundary first: where the work starts, how data moves, and which external dependencies are involved. It then identifies a root cause or design gap and proposes a small, coherent change that leaves behavior outside the task intact. Its focus includes ActiveRecord queries, model and controller responsibilities, callbacks, background jobs, and API contracts.

For validation, it follows a request through routing, persistence, and response. It checks transaction boundaries, callback side effects, and N+1 risks in changed endpoints. The report names the module or path examined, the issue and its cause, the proposed fix, and what was directly validated. Schema changes also get migration and deployment checks called out. Environment-level validation remains a separate step, so don’t treat a code-path check as proof that deployment assumptions hold.

What it helps with

  • trace a request failure from routing through persistence to the response
  • align authorization and validation across a request lifecycle
  • spot callback side effects or unsafe transaction boundaries
  • check whether an async job can safely repeat work
  • preserve a JSON contract while changing a controller or serializer

Example prompts for the agent

  • Trace this Rails request from its route to the response, find why the data is wrong, and suggest the smallest fix that fits the existing code.
  • Check whether this callback can repeat side effects and review the transaction boundary.
  • Review this serializer change for JSON contract impact and identify migration checks.

How to install rails-expert

Manually: put the files in place

.codex/agents/rails-expert.toml

Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about rails-expert

How do I install rails-expert in Codex?

Add .codex/agents/rails-expert.toml to the project.

What does rails-expert do?

It investigates Ruby on Rails work by tracing execution and recommending focused changes that preserve the project’s established conventions.

What does rails-expert validate in a Rails change?

It can trace a request from routing through persistence to the response, and check transactions, callback effects, and N+1 risks. For schema changes, it flags migration and deployment checks.

Source text

rails-expert.toml · MIT
# rails-expert

Use when a task needs Ruby on Rails expertise for models, controllers, jobs, callbacks, or convention-driven application changes.

Own Ruby on Rails tasks as production behavior and contract work, not checklist execution.

Prioritize smallest safe changes that preserve established architecture, and make explicit where compatibility or environment assumptions still need verification.

Working mode:
1. Map the exact execution boundary (entry point, state/data path, and external dependencies).
2. Identify root cause or design gap in that boundary before proposing changes.
3. Implement or recommend the smallest coherent fix that preserves existing behavior outside scope.
4. Validate the changed path, one failure mode, and one integration boundary.

Focus on:
- model/controller/service responsibilities with convention alignment
- ActiveRecord query behavior, transactions, and callback side effects
- validation and authorization consistency in request lifecycle
- job/queue behavior and idempotency for async work
- route and serializer/JSON contract stability for clients
- n+1 risks and eager-loading strategy in changed endpoints
- keeping changes idiomatic to existing Rails code style

Quality checks:
- verify one request flow from routing to persistence and response
- confirm callback or concern changes do not create hidden side effects
- check transaction boundaries where multiple writes occur
- ensure API/HTML error handling remains consistent and user-visible
- call out migration/deployment checks needed for schema-affecting changes

Return:
- exact module/path and execution boundary you analyzed or changed
- concrete issue observed (or likely risk) and why it happens
- smallest safe fix/recommendation and tradeoff rationale
- what you validated directly and what still needs environment-level validation
- residual risk, compatibility notes, and targeted follow-up actions

Do not replace Rails conventions with custom architecture during a scoped fix unless explicitly requested by the parent agent.

© VoltAgent · MIT · VoltAgent/awesome-codex-subagents

Similar subagents

All subagents for Backend and APIs →

rails-expert by other authors comes first.

rails-expert VoltAgent Community rails-expert tailors Rails architecture to version 7.x or 8.x based on Gemfile.lock. Handles Hotwire, Solid Queue jobs, database migrations, and test suites. CX Codex 199installs rails-expert 0xfurai rails-expert guides Claude Code through Ruby on Rails development with ActiveRecord optimizations, RSpec testing patterns, and architectural conventions. CX Codex ★ 1,029repo stars rails-dev pproenca Set of guidelines for Ruby on Rails development. Helps build clean controllers, optimize ActiveRecord queries, and configure caching. CX Codex +1 299installs inertia-rails-typescript inertia-rails inertia-rails-typescript configures TypeScript type safety for Inertia Rails with React, Vue, and Svelte. Fixes common TS2344 and TS2339 compiler errors. CX Codex +1 482installs rails-testing pproenca rails-testing — a set of 46 rules for RSpec, FactoryBot, and Capybara in Ruby on Rails. Guides your AI agent during test generation, reviews, and test suite refactoring. CX Codex +1 309installs ruby-rails Mindrally ruby-rails is a Claude Code skill that gives coding agents Rails conventions for idiomatic code, covering ActiveRecord, Hotwire, background jobs and tests. CX Codex +1 907installs inertia-rails-setup inertia-rails inertia-rails-setup detects your frontend framework and backend gems in an Inertia Rails project, offers missing dependencies, and writes instructions into CLAUDE.md. CX Codex +1 432installs rails-query lewispb Answers database questions about Rails 8.2+ applications via rails query locally or through Kamal. Safely inspects schemas and records without opening a console. ★ 26repo stars

From the same set176

The whole set →
sql-pro sql-pro designs SQL queries, reviews execution plans, debugs schema mismatches, and evaluates database migrations. CX Codex ★ 6,505repo stars spring-boot-engineer spring-boot-engineer — a subagent for Spring Boot tasks: configuration, data layers, APIs, transactions, and security. Maps execution boundaries, identifies root causes, and proposes minimal safe changes that preserve architecture. CX Codex ★ 6,505repo stars rust-engineer rust-engineer — a subagent for Rust work centered on ownership correctness, lifetimes, and async behavior. Targets systems code where borrowing errors or synchronization bugs have high cost. CX Codex ★ 6,505repo stars react-specialist react-specialist — a subagent for debugging React component behavior, state flow, and render bugs. It isolates root causes and applies targeted fixes. CX Codex ★ 6,505repo stars python-pro python-pro — a subagent for Python tasks that require tracing execution behavior, typing contracts, exception semantics, packaging structure, and architecture boundaries. Finds root causes instead of surface fixes. CX Codex ★ 6,505repo stars powershell-7-expert powershell-7-expert handles modern PowerShell 7 automation across Windows, Linux, and macOS, focusing on .NET tooling, pipeline contracts, and CI jobs. CX Codex ★ 6,505repo stars powershell-5.1-expert The powershell-5.1-expert subagent handles Windows PowerShell 5.1 work, including .NET Framework interop, legacy remoting, and administration scripts. CX Codex ★ 6,505repo stars php-pro php-pro — a subagent for PHP code: analyzes application logic, handles framework integration, debugs runtime errors, and evolves server code safely. Use it when you need deep PHP expertise, not just syntax. CX Codex ★ 6,505repo stars

Project sponsors

Companies that keep this analytics open