dhh-rails-style

Apply DHH and 37signals Rails conventions to Ruby code generation, refactoring, and review.

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

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, pragmatic, and efficient style championed by DHH and 37signals, leading to cleaner, more maintainable, and performant applications.

Core Features & Use Cases

  • Code Style Enforcement: Guides users on DHH's preferred patterns for models, controllers, views, and architecture.
  • Best Practice Adoption: Encourages the use of vanilla Rails, fat models, thin controllers, and Turbo/Stimulus for frontend interactivity.
  • Use Case: A developer is building a new feature in a Rails application and wants to ensure their code follows the 37signals philosophy of simplicity, clarity, and leveraging the framework's built-in capabilities. They can consult this Skill for guidance on everything from routing to testing.

Quick Start

Use the dhh-rails-style skill to refactor a controller action to follow DHH's REST mapping conventions.

Frequently Asked Questions about dhh-rails-style

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

FAQPage Schema
How do I refactor a Rails controller to follow DHH and 37signals conventions?

DHH's Rails style enforces thin controllers by moving business logic into fat models and adhering to strict REST resource mapping. This approach prioritizes REST purity and leverages vanilla Rails capabilities for cleaner code architecture.

What are DHH's best practices for structuring Ruby on Rails models?

DHH's Rails best practices advocate for fat models to encapsulate business logic and maintain REST purity. The philosophy emphasizes clarity over cleverness, ensuring models handle core domain rules while controllers remain thin routing layers.

How does Hotwire fit into the 37signals Rails code style philosophy?

Hotwire fits the 37signals Rails style by using Turbo and Stimulus patterns to build interactive frontends without complex JavaScript frameworks. This approach maintains the clarity over cleverness philosophy while leveraging vanilla Rails capabilities for UI updates.

When should I use Current attributes in a Ruby on Rails application?

Current attributes in Rails should be used to manage global request-specific context like the authenticated user. This pattern aligns with DHH's pragmatic style by cleanly passing request-level data throughout the application without cluttering method signatures.

Does this approach work for existing Rails code reviews or only new code generation?

This approach works for both existing Rails code reviews and new code generation. The conventions trigger during refactoring requests and code reviews to ensure existing logic adheres to 37signals patterns like REST purity and clarity over cleverness.

What is the core philosophy behind Basecamp and HEY's Ruby on Rails architecture?

The core philosophy behind Basecamp and HEY's Rails architecture is clarity over cleverness. It champions vanilla Rails, fat models, thin controllers, and Hotwire patterns to achieve pragmatic, efficient, and maintainable application structures.