dhh-coder

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

47|11|Updated Nov 26, 2025
One-click install
npx skills add https://github.com/majesticlabs-dev/majestic-marketplace --skill dhh-coder
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dhh-coder
Source: https://github.com/majesticlabs-dev/majestic-marketplace/tree/main/plugins/majestic-rails/skills/dhh-coder
Command: npx skills add https://github.com/majesticlabs-dev/majestic-marketplace --skill dhh-coder

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Writes Ruby and Rails code following DHH's philosophy: clarity over cleverness, convention over configuration, and developer happiness.

Core Features & Use Cases

  • Quick reference patterns for controllers, models, and syntax
  • Private method indentation and class organization
  • RESTful design guidance and clean controller patterns
  • Typical Rails patterns (fat models, concerns as facades)

Quick Start

Start writing Ruby/Rails code with a DHH-inspired style in mind:

  • Use 7 RESTful actions
  • Keep private methods under private
  • Favor composition and clear naming

Frequently Asked Questions about dhh-coder

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

FAQPage Schema
How do I write Ruby and Rails code in DHH's style?

DHH's style emphasizes clarity over cleverness and convention over configuration. Use seven RESTful controller actions, keep models fat with business logic, place private methods under a private keyword, favor explicit naming, and apply modern Ruby syntax throughout your codebase.

What are the key principles for structuring Rails controllers?

Rails controllers following DHH's approach implement the seven RESTful actions (index, show, new, create, edit, update, destroy) with minimal logic. Move business logic to models, keep controllers thin as routers, and use clear, predictable naming conventions for actions and routes.

How should I organize private methods in Ruby classes?

Organize private methods by placing them below a private keyword declaration at the end of the class. This signals intent, improves readability, and follows Rails conventions. Group related private methods together and use descriptive names that clarify their purpose.

What's the difference between fat models and concerns in Rails?

Fat models hold business logic and domain knowledge directly in the model class. Concerns act as facades for shared, reusable behavior across multiple models. DHH's style favors fat models for clarity, using concerns selectively for truly shared cross-model functionality rather than premature abstraction.

Does this style work with modern Ruby syntax?

Yes. DHH's style integrates with modern Ruby syntax including keyword arguments, safe navigation operators, and contemporary Rails patterns. The approach values explicit, readable code over syntactic cleverness, adapting naturally as Ruby and Rails evolve.

When should I refactor existing Rails code to follow this style?

Refactor Rails code to this style during active feature development, controller rewrites, or model restructuring. Focus on clarity wins first: simplifying controller logic, reorganizing private methods, and improving naming. Avoid wholesale rewrites of working code; apply principles incrementally as you touch each file.