sergiodxa avatar

Ruby On Rails Best Practices

This extracts the architectural patterns Basecamp uses in production Rails apps like Fizzy and Campfire. You get 16 rules covering where to put concerns (scoped under models, not in a shared folder), how to name them (behaviors get -able suffixes), keeping jobs and controllers thin by pushing logic into models, and when to use resource controllers instead of custom actions. The template method pattern for shared concerns is smart, and the guidance on explicit Turbo broadcasts from controllers instead of callbacks will save you debugging time. Most valuable if you're tired of Rails codebases that feel organized differently in every directory and want opinionated conventions that scale.

skills.sh installs
282
GitHub stars
92
last updated
Aug 21, 2026

Install

$ npx -y skills add sergiodxa/agent-skills --skill ruby-on-rails-best-practices --agent claude-code

Installs into .claude/skills of the current project.

Files

Ruby on Rails Best Practices

Architecture patterns and coding conventions extracted from Basecamp's production Rails applications (Fizzy and Campfire). Contains 16 rules across 6 categories focused on code organization, maintainability, and following "The Rails Way" with Basecamp's refinements.

When to Apply

Reference these guidelines when:

  • Organizing models, concerns, and controllers
  • Writing background jobs
  • Implementing real-time features with Turbo Streams
  • Deciding where code should live
  • Writing tests for Rails applications
  • Reviewing Rails code for architectural consistency

Rules Summary

Model Organization (HIGH)

model-scoped-concerns - @rules/model-scoped-concerns.md

Place model-specific concerns in app/models/model_name/ not app/models/concerns/.

# Directory structure
app/models/
├── card.rb
├── card/
│   ├── closeable.rb     # Card::Closeable
│   ├── searchable.rb    # Card::Searchable
│   └── assignable.rb    # Card::Assignable

# app/models/card.rb
class Card < ApplicationRecord
  include Closeable, Searchable, Assignable
  # Ruby resolves from Card:: namespace first
end
concern-naming - @rules/concern-naming.md

Sponsors

Details

Repository
github.com/sergiodxa/agent-skills
Categories
Documentation, Code Review & Quality, AI & Agent Building
First seen
Jun 3, 2026

More from sergiodxa/agent-skills

All 10
1pproenca avatarios-testingpproenca/dot-skillsTesting practices for iOS 26 / Swift 6.2 clinic modular MVVM-C applications. Covers unit/UI/snapshot testing, protocol-based mocks, async actor isolation, and d281skills.sh installs
2secondsky avatarsveltia-cmssecondsky/claude-skillsSveltia CMS Git-backed content management (Decap/Netlify CMS successor). 5x smaller bundle (300 KB), GraphQL performance, solves 260+ issues. Use for static sit277skills.sh installs
3pedronauck avatarcreating-specpedronauck/skillsCreate comprehensive technical specs for SDK gaps, feature modules, or system centralization efforts. Use when writing specs, PRDs, gap analysis documents, or p274skills.sh installs
4traderspost avatarpine-publishertraderspost/pinescript-agentsPrepares Pine Scripts for TradingView publication with documentation and compliance checks. Use when finalizing scripts for release.274skills.sh installs
5pproenca avatarswift-ui-architectpproenca/dot-skillsOpinionated SwiftUI architecture enforcement for iOS 26 / Swift 6.2 clinic modular MVVM-C apps using local SPM package boundaries. Enforces App-target `Dependen273skills.sh installs
6pproenca avatarios-tastepproenca/dot-skillsDesigns iOS 18+ SwiftUI experiences with real taste — starting from user goals, not pixels. Use this skill whenever the user asks you to build SwiftUI views, sc272skills.sh installs