dhh-rails-style

Enforce DHH's 37signals Rails conventions for Ruby on Rails applications.

Updated Feb 10, 2026
One-click install
npx skills add https://github.com/sammyjoyce/pi-compound-engineering --skill dhh-rails-style-sammyjoyce
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dhh-rails-style
Source: https://github.com/sammyjoyce/pi-compound-engineering/tree/main/skills/dhh-rails-style
Command: npx skills add https://github.com/sammyjoyce/pi-compound-engineering --skill dhh-rails-style-sammyjoyce

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps developers write Ruby and Rails code that adheres to the distinctive, pragmatic, and efficient style championed by DHH and 37signals, leading to cleaner, more maintainable, and performant applications.

Core Features & Use Cases

  • Code Style Guidance: Provides specific patterns and philosophies for models, controllers, views, and architecture.
  • Convention Enforcement: Helps avoid common "anti-patterns" like excessive service objects or complex gems, favoring simpler, Rails-native solutions.
  • Use Case: A developer is unsure how to structure a new feature in Rails, specifically how to handle state changes in a model and how to design the corresponding controller actions. They can consult this Skill for best practices aligned with the 37signals approach.

Quick Start

Use the dhh-rails-style skill to review a Ruby on Rails controller for adherence to DHH conventions.

Frequently Asked Questions about dhh-rails-style

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are DHH's Rails coding conventions for structuring models and controllers?

DHH's Rails coding conventions emphasize fat models, thin controllers, and REST purity to ensure clean, maintainable, and performant Ruby applications. This approach favors Rails-native features over unnecessary complexity like excessive service objects.

How do I avoid anti-patterns when writing Ruby on Rails controllers?

To avoid anti-patterns in Ruby on Rails controllers, follow 37signals conventions by keeping controllers thin and pushing state changes into fat models. This pragmatic approach reduces reliance on complex gems and excessive service objects.

When should I use service objects in Rails applications?

Service objects in Rails should be avoided when simpler Rails-native solutions suffice. DHH's pragmatic style favors leveraging core framework features and fat models over creating unnecessary complexity with excessive service objects.

Does the 37signals Rails coding style require specific gems?

The 37signals Rails coding style avoids unnecessary complexity from complex gems. It satisfies requirements for clean codebases by leveraging Rails-native features and pragmatic development philosophies instead of adding heavy dependencies.

How do I enforce REST purity in Ruby on Rails architectural decisions?

REST purity in Ruby on Rails is enforced by adhering to 37signals conventions for architectural decisions. This involves using Rails-native features for models, controllers, and views while avoiding unnecessary complexity.

Why does DHH prefer fat models and thin controllers?

DHH prefers fat models and thin controllers to maintain pragmatic development and REST purity in Rails. This coding style ensures clean, maintainable, and performant codebases by avoiding unnecessary complexity.