dhh-rails-style

Enforce DHH's Ruby and Rails coding style in generated, refactored, or reviewed code.

Updated Feb 26, 2026
One-click install
npx skills add https://github.com/merlyn-huntress/compound-engineering-plugin-no-mcp --skill dhh-rails-style-merlyn-huntress
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dhh-rails-style
Source: https://github.com/merlyn-huntress/compound-engineering-plugin-no-mcp/tree/main/plugins/compound-engineering/skills/dhh-rails-style
Command: npx skills add https://github.com/merlyn-huntress/compound-engineering-plugin-no-mcp --skill dhh-rails-style-merlyn-huntress

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 David Heinemeier Hansson (DHH) and 37signals.

Core Features & Use Cases

  • Code Generation & Refactoring: Apply DHH's principles to new or existing Ruby/Rails code, ensuring models are fat, controllers are thin, and complexity is minimized.
  • Code Review: Evaluate code against 37signals' established patterns, focusing on clarity, maintainability, and developer productivity.
  • Use Case: You're building a new feature in a Rails app and want to ensure it follows the "clarity over cleverness" philosophy, uses database-backed solutions, and avoids unnecessary abstractions. This skill will guide your implementation.

Quick Start

Use the dhh-rails-style skill to refactor the provided Ruby code according to DHH conventions.

Frequently Asked Questions about dhh-rails-style

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

FAQPage Schema
What are DHH's Ruby on Rails coding conventions?

DHH's Ruby on Rails coding conventions prioritize REST purity, fat models, thin controllers, and pragmatic development. They emphasize clarity over cleverness, database-centric solutions, and specific technology choices like Minitest and Turbo.

How do I refactor Ruby code to follow 37signals patterns?

Refactor Ruby code to follow 37signals patterns by enforcing fat models, thin controllers, and minimizing complexity. Apply the clarity over cleverness philosophy, use database-backed solutions, and avoid unnecessary abstractions during the refactoring process.

Does the DHH Rails style guide require specific testing frameworks?

Yes, the DHH Rails style guide requires adherence to specific technology choices including Minitest for testing. It also mandates using Solid Queue and Turbo to maintain pragmatic development standards within the Ruby on Rails stack.

What is the best way to structure Rails controllers according to DHH?

The best way to structure Rails controllers according to DHH is keeping them thin. Emphasize REST purity and delegate business logic to fat models, ensuring database-centric solutions while avoiding unnecessary architectural abstractions.

When should I avoid unnecessary abstractions in Rails code?

You should avoid unnecessary abstractions in Rails code when adhering to DHH's style. Prioritize clarity over cleverness by favoring database-backed solutions and minimizing complexity instead of introducing premature architectural patterns.

Can I use this DHH style guide for code review in Rails?

Yes, you can use this guide for code review in Rails. It evaluates code against 37signals established patterns, focusing on maintainability, developer productivity, and adherence to REST purity and fat model conventions.