dhh-rails-style

Apply DHH Rails conventions to controllers, models, views, routes, and tests.

Updated Jan 21, 2026
One-click install
npx skills add https://github.com/ollieb89/orchestrator --skill dhh-rails-style-ollieb89
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dhh-rails-style
Source: https://github.com/ollieb89/orchestrator/tree/main/.cursor/skills/dhh-rails-style
Command: npx skills add https://github.com/ollieb89/orchestrator --skill dhh-rails-style-ollieb89

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Rails and Ruby projects often suffer from inconsistent style and architecture; this skill provides a structured approach to applying the DHH/Rails conventions across controllers, models, views, and tests to improve readability and maintainability.

Core Features & Use Cases

  • Enforces RESTful CRUD mapping by modeling actions as resources rather than verb-laden routes.
  • Encourages state as records via dedicated domain objects (e.g., closures, goldness) rather than boolean flags for auditability and queryability.
  • Standardizes use of Turbo/Stimulus, concerns, and Current attributes to keep context and behavior explicit across layers.
  • Use case: transforming a legacy Rails project to adopt DHH conventions to improve testability, readability, and collaboration.

Quick Start

Refactor your Rails project to apply DHH-style conventions across controllers, models, and 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 enforce DHH Rails conventions in my Ruby codebase?

To enforce DHH Rails conventions in Ruby code, apply structured patterns like RESTful controllers, state-as-records domain objects, and concerns for reuse. This improves readability and maintainability across controllers, models, views, and tests.

What is the best way to refactor legacy Rails controllers to follow DHH conventions?

The best way to refactor legacy Rails controllers is to enforce RESTful CRUD mapping by modeling actions as resources. This replaces verb-laden routes, aligning with DHH conventions for better testability and collaboration.

How does DHH Rails style handle state and boolean flags in models?

DHH Rails style encourages state as records via dedicated domain objects rather than boolean flags. This approach improves auditability and queryability across your Rails models.

Can I integrate Turbo and Stimulus with DHH Rails conventions?

Yes, you can integrate Turbo and Stimulus with DHH Rails conventions. The standardization of Turbo and Stimulus keeps context and behavior explicit across layers, alongside concerns and Current attributes.

Where should authorization go when following DHH Rails style?

When following DHH Rails style, authorization belongs in User models. This keeps context and behavior explicit across layers while maintaining RESTful controller patterns.