dhh-rails-style

Apply DHH Rails conventions to Ruby codebases with RESTful CRUD and fat models.

Updated Feb 25, 2026
One-click install
npx skills add https://github.com/robwestz/bacowr_b --skill dhh-rails-style-robwestz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dhh-rails-style
Source: https://github.com/robwestz/bacowr_b/tree/main/every-marketplace/plugins/compound-engineering/skills/dhh-rails-style
Command: npx skills add https://github.com/robwestz/bacowr_b --skill dhh-rails-style-robwestz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill provides a structured approach to applying DHH's Rails conventions across Ruby and Rails codebases, promoting RESTful design, fat models, thin controllers, and consistent patterns for maintainability and collaboration.

Core Features & Use Cases

  • REST-first guidance: map actions to resources and prefer new resources over custom actions.
  • State as records: encourage using dedicated models (e.g., Closure, Goldness) rather than boolean flags.
  • Current attributes and Turbo/Stimulus: promote request-scoped state and modern frontend patterns for interactive UIs.
  • Code review patterns: align contributions with DHH-style practices during reviews and refactorings.
  • Guidance for teams: practical best practices for models, controllers, views, and architectural decisions.

Quick Start

Audit your Rails app to apply DHH style by aligning controllers with REST, modeling state as records, and using Turbo/Stimulus for interactivity.

Frequently Asked Questions about dhh-rails-style

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

FAQPage Schema
How do I apply DHH Rails style conventions to my Ruby codebase?

To apply DHH Rails style, enforce RESTful CRUD mappings, fat models, thin controllers, Current attributes, and Turbo/Stimulus frontends. This approach restructures code generation and refactoring requests for maintainable Ruby on Rails applications.

What is the DHH approach to modeling state in Rails applications?

The DHH approach models state as dedicated database records rather than using boolean flags. This means creating specific models like Closure or Goldness to represent state, ensuring cleaner fat models and maintainable Ruby code.

How do I align my Rails controllers with RESTful design principles?

Align Rails controllers with REST by mapping actions directly to resources and preferring new resources over custom actions. This DHH style guidance keeps controllers thin and standardizes interactions across your Ruby codebase.

Can I use Turbo and Stimulus for frontend interactivity in a DHH-style Rails app?

Yes, DHH Rails style promotes Turbo and Stimulus for modern frontend patterns. This approach builds interactive UIs using a database-backed architecture, avoiding heavy JavaScript frameworks while maintaining request-scoped state with Current attributes.

Does DHH Rails style work with Minitest and fixtures?

Yes, DHH Rails style enforces a database-backed approach using Minitest and fixtures. This testing convention aligns with 37signals and Basecamp practices, ensuring reliable Ruby code reviews and refactoring requests.

When should I use Current attributes in Ruby on Rails?

Use Current attributes in Ruby on Rails to manage request-scoped state, a core DHH style convention. This pattern supports clean fat models and thin controllers by providing a centralized way to access current user or session data.