Ruby on Rails Builder
CautionScaffold full-stack Ruby on Rails applications with models, controllers, views, ActiveRecord associations, and RSpec tests following Rails conventions.
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
GitHub Copilot
Freemium
AI pair programmer that suggests code in real time across your IDE
- Real-time code completions across 30+ languages
- Copilot Chat for natural language code Q&A
- Pull request description and summary generation
Cursor
Freemium
AI-native code editor with deep multi-model integration and agentic coding
- AI-native Cmd+K inline editing and generation
- Composer Agent for autonomous multi-file changes
- Full codebase indexing and context awareness
Replit
Freemium
Browser-based IDE with AI agent for building and deploying apps from prompts
- Replit Agent for autonomous app building from prompts
- Complete browser-based IDE with terminal and database
- Instant deployment to live URLs
Related Skills
Database Migration Manager
CautionPlan and execute database schema migrations with rollback support, data preservation, and zero-downtime strategies.
TDD Workflow
CautionTest-driven development skill that enforces the red-green-refactor cycle. Write failing tests first, then implement minimal code to pass.
API Builder
CautionScaffold REST and GraphQL APIs with route generation, validation, authentication middleware, and OpenAPI documentation.
Stay Updated on Agent Skills
Get weekly curated skills + safety alerts
每周精选 Skills + 安全预警