dhh-ruby-style

Apply DHH Ruby and Rails style to code for consistent implementations.

24.1k|2.0k|Updated Oct 9, 2025
One-click install
npx skills add https://github.com/EveryInc/compound-engineering-plugin --skill dhh-ruby-style
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dhh-ruby-style
Source: https://github.com/EveryInc/compound-engineering-plugin/tree/main/plugins/compound-engineering/skills/dhh-ruby-style
Command: npx skills add https://github.com/EveryInc/compound-engineering-plugin --skill dhh-ruby-style

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Applies DHH's clarity-over-cleverness philosophy to Ruby and Rails code, advocating RESTful, fat-model patterns and minimal dependencies.

Core Features & Use Cases

  • RESTful controller conventions (7 actions)
  • Fat models owning business logic
  • Rails integration without heavy coupling
  • Clear guidance on avoiding over-architecting

Quick Start

Sketch a RESTful controller and a fat-model example.

Frequently Asked Questions about dhh-ruby-style

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

FAQPage Schema
How do I apply DHH Ruby style conventions to fix code styling inconsistencies?

DHH Ruby style enforces clarity-over-cleverness patterns: RESTful controllers with seven standard actions, fat models owning business logic, thin controllers, Current attributes usage, and explicit modern Ruby syntax. Apply these conventions to refactor code for consistency and readability across your Rails project.

What are the core RESTful controller patterns DHH recommends for Rails?

DHH's RESTful approach uses seven standard actions (index, show, new, create, edit, update, destroy) with fat models handling business logic rather than controllers. This pattern keeps controllers thin, routes clean, and code organization predictable across your Rails application.

When should I use fat models versus thin controllers in Rails?

Fat models own business logic, validations, and domain rules; thin controllers only handle HTTP concerns like params, authentication, and responses. This separation follows DHH's philosophy and makes code testable, maintainable, and aligned with Rails conventions.

Does DHH style support Hotwire patterns for modern Rails applications?

Yes. DHH's conventions explicitly include Hotwire patterns alongside RESTful design, Current attributes for request context, and modern Ruby syntax preferences, making it suitable for contemporary Rails projects using turbo and stimulus.

How do I structure Rails code to avoid over-engineering and heavy dependencies?

DHH's approach minimizes dependencies by using Rails' built-in conventions—explicit naming, REST purity, and fat models—rather than additional abstraction layers. This philosophy reduces coupling and keeps codebases simpler and easier to reason about.