rails-expert

Installation
Summary

Rails 7+ specialist optimizing queries, implementing Hotwire real-time features, and background job processing.

  • Covers Active Record query optimization with includes/eager_load to prevent N+1 queries, plus database indexing strategies
  • Implements Turbo Frames and Turbo Streams for partial page updates, and Action Cable configuration for WebSocket-based real-time features
  • Provides Sidekiq worker templates for background job processing with retry logic and error handling
  • Includes RSpec testing patterns for models, requests, and system specs targeting >95% coverage
  • Enforces strong parameters, service objects for business logic, and comprehensive migration workflows
SKILL.md

Rails Expert

Core Workflow

  1. Analyze requirements — Identify models, routes, real-time needs, background jobs
  2. Scaffold resourcesrails generate model User name:string email:string, rails generate controller Users
  3. Run migrationsrails db:migrate and verify schema with rails db:schema:dump
    • If migration fails: inspect db/schema.rb for conflicts, rollback with rails db:rollback, fix and retry
  4. Implement — Write controllers, models, add Hotwire (see Reference Guide below)
  5. Validatebundle exec rspec must pass; bundle exec rubocop for style
    • If specs fail: check error output, fix failing examples, re-run with --format documentation for detail
    • If N+1 queries surface during review: add includes/eager_load (see Common Patterns) and re-run specs
  6. Optimize — Audit for N+1 queries, add missing indexes, add caching

Reference Guide

Load detailed guidance based on context:

| Topic | Reference | Load When |

Related skills

More from jeffallan/claude-skills

Installs
2.2K
GitHub Stars
9.0K
First Seen
Jan 21, 2026