dhh-rails-style

Guide Ruby and Rails code toward DHH and 37signals conventions.

1|Updated Mar 11, 2026
One-click install
npx skills add https://github.com/JimmyChen-NXP/zephyr-team-activity-dashboard --skill dhh-rails-style-jimmychen-nxp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dhh-rails-style
Source: https://github.com/JimmyChen-NXP/zephyr-team-activity-dashboard/tree/main/.github/skills/dhh-rails-style
Command: npx skills add https://github.com/JimmyChen-NXP/zephyr-team-activity-dashboard --skill dhh-rails-style-jimmychen-nxp

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and 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, focusing on clarity, maintainability, and rapid development.

Core Features & Use Cases

  • Code Generation & Refactoring: Apply DHH's conventions to new or existing Ruby/Rails code.
  • Code Review: Ensure code aligns with 37signals' philosophy (e.g., fat models, thin controllers, Hotwire, REST purity).
  • Guidance on Best Practices: Understand what to use (e.g., Minitest, Fixtures, Solid Queue) and what to avoid (e.g., Devise, Sidekiq, ViewComponents).
  • Use Case: You're building a new feature in a Rails app and want to ensure your models are "fat," controllers are "thin," and you're leveraging Turbo for interactivity, just like in Basecamp or HEY.

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 the DHH Rails style for structuring models and controllers?

The DHH Rails style emphasizes fat models and thin controllers, pushing business logic into models while keeping controllers focused on RESTful routing. This approach prioritizes clarity and maintainability over cleverness.

How do I refactor Ruby code to match 37signals best practices?

Refactoring Ruby code to 37signals best practices involves enforcing REST purity, adopting Current attributes, and replacing complex logic with clear patterns. This Skill guides generation and review based on production Basecamp codebases.

Does the DHH Rails style recommend using Hotwire and Turbo for interactivity?

Yes, the DHH Rails style recommends using Hotwire patterns and Turbo for interactivity instead of heavy JavaScript frameworks. This approach aligns with the pragmatic architecture found in Basecamp and HEY.

Which Ruby on Rails gems should I avoid to follow 37signals conventions?

To follow 37signals conventions, you should avoid Devise, Sidekiq, and ViewComponents. The DHH style favors built-in alternatives like Minitest, Fixtures, and Solid Queue to maintain application clarity and speed.

When should I not use the DHH style for my Rails application?

You should not use the DHH style if your application requires architectural patterns outside REST purity, or if your team relies heavily on gems like Sidekiq or ViewComponents that this style explicitly avoids. It prioritizes rapid development over strict decoupling.