dhh-rails-style

Enforce DHH's 37signals Ruby and Rails coding conventions in code generation, refactoring, and review.

1|Updated Feb 23, 2026
One-click install
npx skills add https://github.com/hackefeller/ghostwire --skill dhh-rails-style-hackefeller
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dhh-rails-style
Source: https://github.com/hackefeller/ghostwire/tree/main/.github/skills/dhh-rails-style
Command: npx skills add https://github.com/hackefeller/ghostwire --skill dhh-rails-style-hackefeller

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 conventions to new code or refactor existing code.
  • Model & Controller Best Practices: Implement fat models, thin controllers, and RESTful patterns.
  • Frontend Integration: Utilize Hotwire (Turbo, Stimulus) and native CSS effectively.
  • Use Case: You're building a new feature in a Rails app and want to ensure it follows the "clarity over cleverness" philosophy, using state-as-records and avoiding unnecessary gems.

Quick Start

Apply the DHH Rails style 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
How do I refactor Rails code to follow fat models and thin controllers?

To refactor Rails code for fat models and thin controllers, move business logic out of controllers into model scopes and methods. This approach enforces REST purity and keeps controllers strictly handling HTTP request routing and responses.

What is the best way to write Ruby code in the DHH 37signals style?

The DHH 37signals Ruby style prioritizes clarity over cleverness by using state-as-records, adhering to specific naming conventions, and choosing database-centric solutions. It avoids unnecessary gems and favors pragmatic, native implementations.

How do I integrate Hotwire patterns when building new Rails features?

To integrate Hotwire patterns in Rails features, utilize Turbo and Stimulus alongside native CSS for frontend interactions. This ensures efficient page updates without heavy JavaScript frameworks, adhering to modern Rails conventions.

Can I use this approach to review and refactor existing Ruby code?

Yes, you can use this approach to review and refactor existing Ruby code. It enforces DHH's coding conventions by checking for REST purity, state management via records, and removing unnecessary dependencies during refactoring.

When should I avoid using extra gems for state management in Rails?

You should avoid extra gems for state management in Rails when you can use database-centric solutions and state-as-records. The DHH style prioritizes pragmatic native implementations over adding external dependencies for state handling.

Does following DHH's Rails conventions require avoiding JavaScript frameworks?

Following DHH's Rails conventions requires prioritizing Hotwire patterns like Turbo and Stimulus alongside native CSS. This approach effectively minimizes reliance on heavy external JavaScript frameworks for frontend dynamic updates.