Comprehensive Ruby on Rails v8.1 development guide with detailed documentation for Active Record, controllers, views, routing, testing, jobs, mailers, and more. Use when working on Rails applications, building Rails features, debugging Rails code, writing migrations, setting up associations, configuring Rails apps, or answering questions about Rails best practices and patterns.
Provides comprehensive Ruby on Rails 8.1 guidance for Active Record, controllers, routing, testing, and more. Use when building Rails features, debugging code, writing migrations, setting up associations, or answering Rails questions.
/plugin marketplace add el-feo/ai-context/plugin install ruby-rails@jebs-dev-toolsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
references/active_record.mdreferences/api_development.mdreferences/assets_frontend.mdreferences/configuration_internals.mdreferences/controllers_views.mdreferences/i18n_support.mdreferences/jobs_mailers_cable.mdreferences/routing.mdreferences/security_performance.mdreferences/storage_caching.mdreferences/testing_debugging.md<quick_start> <common_commands>
# Database
rails db:create # Create database
rails db:migrate # Run pending migrations
rails db:rollback # Rollback last migration
# Console and server
rails console # Start Rails console
rails server # Start development server
rails test # Run all tests
# Generators
rails generate model NAME # Generate model
rails generate controller NAME # Generate controller
rails generate scaffold NAME # Generate full CRUD
</common_commands>
<typical_workflow>
rails generate model Article title:string body:textrails db:migraterails generate controller Articlesconfig/routes.rb<reference_guides> This skill includes detailed reference documentation organized by topic. Always consult the relevant reference file when working on specific Rails components:
Active Record (references/active_record.md)
Read this when working with:
Common patterns:
Controllers & Views (references/controllers_views.md)
Read this when working with:
Common patterns:
Routing (references/routing.md)
Read this when working with:
Common patterns:
resources for RESTful routesTesting & Debugging (references/testing_debugging.md)
Read this when working with:
Common patterns:
Jobs, Mailers & Cable (references/jobs_mailers_cable.md)
Read this when working with:
Common patterns:
Assets & Frontend (references/assets_frontend.md)
Read this when working with:
Common patterns:
Storage & Caching (references/storage_caching.md)
Read this when working with:
Common patterns:
Configuration & Internals (references/configuration_internals.md)
Read this when working with:
Common patterns:
Security & Performance (references/security_performance.md)
Read this when working with:
Common patterns:
I18n & Support (references/i18n_support.md)
Read this when working with:
Common patterns:
API Development (references/api_development.md)
Read this when working with:
Common patterns:
Generate migrations and models
rails generate model Article title:string body:text published_at:datetime
rails generate migration AddUserRefToArticles user:references
Set up associations and validations
Create controllers and routes
rails generate controller Articles index show new create edit update destroy
rails generate scaffold for full CRUDBuild views
Write tests
Iterate and refactor
<best_practices> <code_organization>
<common_patterns> <model_example>
class Article < ApplicationRecord
belongs_to :user
has_many :comments, dependent: :destroy
has_many_attached :images
validates :title, presence: true, length: { minimum: 5 }
validates :body, presence: true
scope :published, -> { where.not(published_at: nil) }
scope :recent, -> { order(created_at: :desc).limit(10) }
def published?
published_at.present? && published_at <= Time.current
end
end
</model_example>
<controller_example>
class ArticlesController < ApplicationController
before_action :set_article, only: [:show, :edit, :update, :destroy]
before_action :authenticate_user!, except: [:index, :show]
def index
@articles = Article.published.includes(:user)
end
def show
end
def create
@article = current_user.articles.build(article_params)
if @article.save
redirect_to @article, notice: 'Article was successfully created.'
else
render :new, status: :unprocessable_entity
end
end
private
def set_article
@article = Article.find(params[:id])
end
def article_params
params.require(:article).permit(:title, :body, :published_at, images: [])
end
end
</controller_example>
<routes_example>
# config/routes.rb
Rails.application.routes.draw do
root 'articles#index'
resources :articles do
resources :comments, only: [:create, :destroy]
end
namespace :admin do
resources :articles
end
end
</routes_example> </common_patterns>
<version_notes> This skill is based on Rails 8.1.1. Key recent features:
When working with older Rails versions, check the upgrade guides in the references for migration paths and deprecated features. </version_notes>
<troubleshooting> When stuck on a Rails problem:rails console to experiment with codeRemember: Rails is designed to make common tasks easy and follow sensible conventions. If something feels too difficult, there's likely a Rails way to do it more simply. </troubleshooting>
<success_criteria> You're using this skill effectively when:
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.