dhh-rails-style

Apply DHH/37signals Rails conventions to Ruby and Rails code.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/mengblom/dex-ghx --skill dhh-rails-style-mengblom
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dhh-rails-style
Source: https://github.com/mengblom/dex-ghx/tree/main/.claude/plugins/compound-engineering/skills/dhh-rails-style
Command: npx skills add https://github.com/mengblom/dex-ghx --skill dhh-rails-style-mengblom

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

The dhh-rails-style skill helps you produce Ruby and Rails code that matches DHH/37signals conventions, improving clarity, maintainability, and consistency during development and code review.

Core Features & Use Cases

  • DHH-style design choices: Prefer vanilla Rails, fat models, thin controllers, RESTful CRUD resources, and database-backed solutions instead of “clever” abstractions.
  • Rails conventions and patterns: Enforce naming (verbs/predicates), REST mapping (including singular resources), and state-as-records over boolean columns.
  • Context-specific guidance: Provide targeted direction for controllers, models, views/frontend with Turbo/Stimulus, architecture/routing/auth/jobs/caching, and Minitest/fixtures-based testing.

Quick Start

Use the dhh-rails-style skill to refactor my Rails controller and model code toward thin controllers and fat models, using state records for status (not booleans).

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 Rails controllers and models to follow DHH conventions?

To refactor Rails code toward DHH conventions, enforce thin controllers and fat models by moving business logic into models, mapping to RESTful CRUD resources, and replacing boolean columns with state-as-records. This approach prioritizes vanilla Rails clarity over clever abstractions.

What are 37signals conventions for Rails routing and state management?

37signals conventions for Rails routing and state management require strict RESTful CRUD mapping, including singular resources, and tracking state-as-records rather than using boolean columns. This ensures database-backed solutions maintain clarity and maintainability over clever architectural abstractions.

Does DHH style Rails prefer Hotwire and Turbo over JavaScript frameworks?

DHH style Rails prefers a Hotwire-first pattern using Turbo and Stimulus for view and frontend interactions over heavy JavaScript frameworks. This approach keeps the implementation aligned with vanilla Rails architecture and maintains clarity over clever abstractions.

How do I write Rails tests following 37signals conventions?

Writing Rails tests following 37signals conventions requires using Minitest with fixtures rather than RSpec and factories. This testing norm aligns with the vanilla Rails philosophy, ensuring tests remain clear and maintainable without relying on clever abstractions or extensive additional dependencies.

What's the best way to handle Rails authentication and background jobs in DHH style?

Handling Rails authentication and background jobs in DHH style involves using Current attributes and standard Rails architecture patterns. It prefers database-backed solutions and vanilla Rails conventions over external gems, ensuring clarity and maintainability throughout the application design.

When should I avoid boolean columns in Rails models?

You should avoid boolean columns in Rails models when following DHH conventions, replacing them with state-as-records to track status. This approach treats state as a first-class database record, improving clarity and maintainability while preventing scattered conditional logic across your application.