dhh-ruby-style

Write Ruby and Rails code following DHH's 37signals style.

322|45|Updated Dec 1, 2025
One-click install
npx skills add https://github.com/Microck/ordinary-claude-skills --skill dhh-ruby-style-microck
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dhh-ruby-style
Source: https://github.com/Microck/ordinary-claude-skills/tree/main/skills_all/dhh-ruby-style
Command: npx skills add https://github.com/Microck/ordinary-claude-skills --skill dhh-ruby-style-microck

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides Ruby/Rails code generation following DHH's clarity-first philosophy.

Core Features & Use Cases

  • Controller/action conventions, fat models, and clean separation of concerns
  • Ruby syntax preferences and architecture guidance

Quick Start

Generate a Rails controller with minimal actions following the DHH style guide.

Frequently Asked Questions about dhh-ruby-style

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

FAQPage Schema
How do I write Rails controllers following DHH's style guide?

DHH's approach emphasizes thin controllers with minimal actions and fat models handling business logic. Use RESTful conventions, delegate complexity to models, and rely on Current attributes for context rather than passing parameters through layers.

What are the key principles of DHH's Ruby and Rails philosophy?

Clarity over cleverness is the foundation. Fat models, thin controllers, REST purity, and separation of concerns drive the architecture. Hotwire patterns replace heavy JavaScript, and conventions eliminate unnecessary abstraction.

How do I refactor Rails code to follow DHH's conventions?

Move business logic from controllers into models, eliminate fat parameter passing by using Current attributes, simplify views with Hotwire patterns, and enforce RESTful action structure. Prioritize readable code over clever shortcuts.

Can I apply DHH's style to existing Rails projects?

Yes. Gradually refactor controllers to be thinner, push logic into models, adopt Current for request context, and implement Hotwire for interactivity. The principles work incrementally without requiring a complete rewrite.

What's the difference between DHH's approach and other Rails conventions?

DHH prioritizes simplicity and readability over abstraction layers and microservices. Fat models with business logic, minimal controllers, and monolithic architecture favor pragmatism over architectural purity common in enterprise patterns.

Does DHH's style guide work with REST API generation?

Yes. DHH's approach enforces REST purity through standard HTTP verbs and resource-oriented routing. Controllers align cleanly with RESTful principles, making API generation and code reviews consistent with the philosophy.