dhh-rails-style

Enforce DHH's 37signals Ruby and Rails coding style in code generation, refactoring, and review.

461|129|Updated Jan 26, 2026
One-click install
npx skills add https://github.com/davekilleen/Dex --skill dhh-rails-style-davekilleen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dhh-rails-style
Source: https://github.com/davekilleen/Dex/tree/main/.claude/plugins/compound-engineering/skills/dhh-rails-style
Command: npx skills add https://github.com/davekilleen/Dex --skill dhh-rails-style-davekilleen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill ensures your Ruby and Rails code adheres to the distinctive, pragmatic, and efficient coding style championed by David Heinemeier Hansson (DHH) and the 37signals team.

Core Features & Use Cases

  • Convention Enforcement: Applies 37signals' core philosophies like "clarity over cleverness," REST purity, and database-backed solutions.
  • Code Guidance: Provides specific patterns for models, controllers, views, and architecture, including preferred gems and anti-patterns.
  • Use Case: When refactoring a Rails controller to be more idiomatic, or when writing new models that should follow the "fat model, thin controller" principle, this Skill will guide your implementation.

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
What is DHH's Rails coding style and how does it structure models and controllers?

DHH's Rails coding style prioritizes clarity over cleverness, enforcing REST purity through fat models and thin controllers. It relies on database-backed solutions and specific conventions for views, testing, and gem selection to ensure pragmatic code generation.

How do I refactor a Rails controller to follow 37signals best practices?

To refactor a Rails controller following 37signals best practices, enforce the thin controller pattern by moving business logic into fat models. Maintain REST purity and apply Hotwire patterns while avoiding anti-patterns during the refactoring process.

Can I use this Rails coding style guidance for reviewing existing Ruby code?

Yes, you can use this Rails coding style guidance for reviewing existing Ruby code. It evaluates code against DHH's 37signals principles, checking for REST purity, appropriate gem selection, and adherence to the fat model, thin controller architecture.

What's the best way to write Ruby code with database-backed solutions instead of complex logic?

The best way to write Ruby code with database-backed solutions is to follow DHH's Rails style, prioritizing database constraints and queries over complex application logic. This approach emphasizes clarity over cleverness and REST purity in your architecture.

When should I avoid the fat model thin controller pattern in Rails?

You should avoid the fat model thin controller pattern in Rails when your application logic strictly deviates from 37signals conventions or REST purity. This specific Rails coding style enforces DHH's anti-patterns, which may not suit non-standard architectures.