Skip to content

Ruby on Rails Builder

Caution

Scaffold full-stack Ruby on Rails applications with models, controllers, views, ActiveRecord associations, and RSpec tests following Rails conventions.

By community 3,100 v1.1.2 Updated 2026-03-08

Install

Claude Code

Copy the SKILL.md file to .claude/skills/ruby-rails.md

About This Skill

Ruby on Rails Builder generates convention-over-configuration Rails code that follows the Rails Way. It handles the full MVC stack and modern Rails idioms including Hotwire, Action Cable, and Active Storage.

Generated Components

  • Models — ActiveRecord with validations, scopes, callbacks, and association declarations (belongs_to, has_many, has_one, has_many :through)
  • Controllers — RESTful seven actions with strong parameters, before_actions, and respond_to blocks
  • Views — ERB templates or ViewComponents with Turbo Frames for SPA-like interactions without JavaScript frameworks
  • Routes — Resourceful routing with nested resources and custom member/collection actions

Database & Migrations

Generates schema-safe migrations with proper column types, indexes, and foreign key constraints. Understands Rails migration best practices like adding columns in separate migrations and avoiding model references in migrations.

Testing

Produces RSpec examples with FactoryBot factories, Shoulda matchers for model validations, and Capybara system specs for end-to-end flows.

Modern Rails Features

Supports Rails 7+ features: importmap for JavaScript, Tailwind CSS integration, solid_queue for background jobs, and Action Mailer with Mailgun/SendGrid.

Use Cases

  • Generating Rails models with validations and ActiveRecord associations
  • Scaffolding RESTful controllers with strong parameters and Pundit authorization
  • Creating Hotwire Turbo/Stimulus views for server-rendered interactivity
  • Writing RSpec request specs and factory definitions

Pros & Cons

Pros

  • + Follows Rails conventions strictly for maximum framework compatibility
  • + Generates both model and controller tests simultaneously
  • + Supports Hotwire Turbo for zero-JS interactivity
  • + Handles complex ActiveRecord associations correctly

Cons

  • - Assumes standard Rails directory layout; monorepo setups need manual adjustments
  • - View generation defaults to ERB; Slim/Haml templates require additional prompting

Related AI Tools

Related Skills

Stay Updated on Agent Skills

Get weekly curated skills + safety alerts

每周精选 Skills + 安全预警