dhh-rails-style

Apply DHH Rails conventions to Ruby and Rails code.

Updated Mar 22, 2026
One-click install
npx skills add https://github.com/drhazemibclc/plate --skill dhh-rails-style-drhazemibclc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dhh-rails-style
Source: https://github.com/drhazemibclc/plate/tree/main/.codex/skills/dhh-rails-style
Command: npx skills add https://github.com/drhazemibclc/plate --skill dhh-rails-style-drhazemibclc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

DHH Rails style provides a coherent blueprint for Ruby and Rails development, ensuring code remains readable, maintainable, and Rails-idiomatic by enforcing RESTful patterns, domain-driven structure, and conventional testing.

Core Features & Use Cases

  • RESTful mapping and resource-centric controllers mirroring standard CRUD, with dedicated controllers per resource
  • Domain-focused models using concerns to compose horizontal behavior and stateful patterns like closure, goldness, and not_now
  • Turbo/Stimulus-friendly views and testing with Minitest fixtures and native Rails patterns
  • Guidance for architecture, routing, and code review to enforce consistent style across teams

Quick Start

Apply DHH Rails-style conventions to implement a Ruby/Rails feature with RESTful controllers, state-tracking models via concerns, and Turbo/Stimulus-friendly views.

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 Rails conventions to make my Ruby code more maintainable?

Applying Rails conventions improves Ruby code maintainability by enforcing RESTful controllers, domain-driven models with concerns, and Minitest fixtures. This approach uses standard CRUD patterns and Turbo/Stimulus views to keep applications approachable and consistent across teams.

What is the best way to structure Rails controllers for resource-centric routing?

The best way to structure Rails controllers is mapping them RESTfully to mirror standard CRUD operations. You should use dedicated controllers per resource, ensuring resource-centric routing that aligns with DHH Rails conventions for improved consistency.

How does DHH Rails style handle state-tracking in domain models?

DHH Rails style handles state-tracking in domain models by using concerns to compose horizontal behavior. It applies stateful patterns like closure, goldness, and not_now to keep models domain-focused and maintainable without relying on excessive service objects.

Can I use Turbo and Stimulus with conventional Rails testing patterns?

Yes, you can use Turbo and Stimulus with conventional Rails testing. DHH Rails style encourages Turbo/Stimulus-friendly views paired with Minitest fixtures and native Rails patterns to ensure views remain consistent and testable.

When should I avoid service objects in Ruby on Rails applications?

You should avoid excessive service objects in Ruby on Rails applications when following DHH Rails style. This approach enforces minimal service objects, preferring database-backed patterns, modular concerns, and naming conventions to keep Rails apps approachable.

Does DHH Rails style work with Minitest fixtures or RSpec?

DHH Rails style works with Minitest fixtures, enforcing native Rails testing patterns. The convention specifically guides testing with Minitest fixtures rather than external testing frameworks to maintain approachability and consistency across the application architecture.