dhh-rails-style

Enforce DHH's Rails coding conventions in Ruby code review and generation.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill helps developers write Ruby and Rails code that adheres to the distinctive conventions and philosophies championed by David Heinemeier Hansson (DHH) and 37signals, promoting clarity, maintainability, and efficiency.

Core Features & Use Cases

  • Convention Enforcement: Guides users on RESTful routing, model design (fat models, thin controllers), state management via records, and preferred gem choices.
  • Code Review: Assists in reviewing code against DHH's style principles, identifying deviations and suggesting improvements.
  • Use Case: A developer is building a new feature in a Rails application and wants to ensure their models, controllers, and views align with the established 37signals approach to maximize code quality and consistency.

Quick Start

Apply DHH's Rails conventions to the provided Ruby code snippet.

Frequently Asked Questions about dhh-rails-style

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

FAQPage Schema
How do I enforce DHH's Rails coding conventions in my Ruby application?

Enforce DHH's Rails coding conventions by applying rules for REST purity, fat models, thin controllers, Current attributes, and Hotwire patterns to your Ruby code generation and refactoring processes.

What are the best practices for Ruby on Rails model and controller design?

Best practices for Rails model and controller design favor fat models and thin controllers, prioritizing state management via records and a clarity over cleverness philosophy to maximize maintainability.

How do I review Ruby on Rails code against 37signals style guidelines?

Review Rails code against 37signals style guidelines by identifying deviations from DHH's review patterns, checking for RESTful routing, and suggesting improvements aligned with preferred gem choices.

Does this Rails style guide apply to Hotwire patterns and Current attributes?

This Rails style guide directly applies to Hotwire patterns and Current attributes, enforcing specific conventions drawn from 37signals' production codebases to ensure clarity and efficiency.

When should I use fat models and thin controllers in Ruby on Rails?

Use fat models and thin controllers in Rails when following DHH's convention enforcement, which moves business logic and state management into model records to maintain controller clarity.

What is the philosophy behind DHH's Ruby on Rails coding style?

The philosophy behind DHH's Rails coding style is clarity over cleverness, promoting maintainable code through REST purity, specific gem choices, and established patterns from 37signals' production codebases.