Rails Agents
A collection of specialized Claude Code agents for Rails development. These agents provide expert assistance for different aspects of Rails applications, from controllers and models to testing and deployment.
Installation
Install the gem:
gem install rails-agents
Usage
Interactive Installation (Recommended)
Simply run the install command to interactively select which agents to install:
rails-agents install
This will display a visual multi-select menu where you can:
- Navigate agents using arrow keys (↑/↓)
- Toggle selection with spacebar
- Confirm with enter
- Use shortcuts: 'a' for all, 'n' for none
Agents are organized by category (Core, Frontend, API, Testing, Infrastructure) with descriptions for each.
File Conflict Handling: If agent files already exist, you'll be prompted to view a color-coded diff before deciding whether to overwrite or keep the existing file.
Direct Installation
Install specific agents directly:
rails-agents install -a api,models,tests
Install to Specific Directory
By default, agents are installed to the current directory. To install to a different directory:
rails-agents install -d /path/to/your/rails/project
List Available Agents
See all available agents and their descriptions:
rails-agents list
Available Agents
- api - Rails API specialist for RESTful design, serialization, and API versioning
- controllers - Rails controller and routing specialist for RESTful design and request handling
- devops - Rails DevOps specialist for deployment, Kamal, Docker, CI/CD, and production infrastructure
- graphql - Rails GraphQL specialist for schema design, resolvers, mutations, and performance optimization
- jobs - Rails background jobs specialist for ActiveJob, Solid Queue, async processing, and queue management
- models - ActiveRecord and database specialist for Rails models, migrations, and database design
- services - Rails service objects and business logic specialist for extracting complex operations
- stimulus - Stimulus.js and Turbo specialist for modern Rails frontend development with progressive enhancement
- tests - Rails testing specialist for RSpec, TDD, and comprehensive test coverage
- views - Rails views specialist with Tailwind CSS 4.x expertise, custom form builders, and modern UI components
How It Works
The CLI installs agent files to .claude/agents/ in your target directory. These agents are then available for use in Claude Code when you're working in that directory.
Each agent is a specialized assistant that understands the specific domain and can help you with:
- Writing idiomatic Rails code
- Following best practices
- Implementing modern Rails patterns
- Debugging and optimization
- Architecture decisions
Requirements
- Ruby 3.0 or higher
- Claude Code (for using the installed agents)
Development
After checking out the repo, run bundle install to install dependencies.
To install this gem onto your local machine, run bundle exec rake install.
To build and install the gem locally:
gem build rails-agents.gemspec
gem install rails-agents-0.1.0.gem
Contributing
Bug reports and pull requests are welcome on GitHub.
License
The gem is available as open source under the MIT License.