dhh-rails-style

Enforce DHH Rails conventions across Ruby and Rails codebases.

3|1|Updated Jan 15, 2026
One-click install
npx skills add https://github.com/i3ringit/antigravity-cortex --skill dhh-rails-style-i3ringit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dhh-rails-style
Source: https://github.com/i3ringit/antigravity-cortex/tree/main/.agent/skills/dhh-rails-style
Command: npx skills add https://github.com/i3ringit/antigravity-cortex --skill dhh-rails-style-i3ringit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill standardizes Ruby/Rails code to follow DHH's 37signals style, ensuring consistent architecture and review patterns.

Core Features & Use Cases

  • Enforces REST-first patterns by mapping actions to resources
  • Provides guidance on models, controllers, concerns, and authorization aligned with DHH style
  • Use during code generation, refactoring requests, or code reviews to ensure style conformance

Quick Start

Use the dhh-rails-style skill to enforce DHH Rails conventions on the current Rails codebase, focusing on REST-first patterns, fat models, thin controllers, and Current attributes.

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 codebase?

DHH Rails style enforces REST-first patterns, fat models with thin controllers, and Current attributes for authorization. Apply it during code generation or refactoring by mapping controller actions to resources, organizing logic into concerns, and keeping authorization simple on the User model.

What does REST-first architecture mean in Rails?

REST-first means designing controllers around resources and HTTP verbs rather than custom actions. Each resource maps to standard actions (index, show, create, update, destroy), simplifying routing, reducing controller complexity, and aligning with Rails conventions.

Can I use DHH Rails style with Turbo and Stimulus?

Yes. DHH Rails style includes guidance for Turbo and Stimulus integration within REST-first patterns. These tools enhance view interactivity without breaking REST principles or requiring fat controllers.

How do I structure models and controllers following DHH conventions?

Place business logic in models (fat models), keep controllers lean by delegating to models, use concerns for shared behavior across models, and implement authorization through Current attributes and User model logic rather than scattered authorization checks.

What's the difference between DHH style and other Rails approaches?

DHH style prioritizes simplicity and convention over configuration, favoring fat models, thin controllers, database-backed design, and modular concerns. It contrasts with service-object-heavy or microservice approaches by keeping Rails apps monolithic and straightforward.

Can I use this skill during code reviews?

Yes. The skill codifies DHH Rails conventions to guide code reviews, ensuring consistent patterns across controllers, models, concerns, and authorization workflows. Use it as a reference for maintaining style conformance across your team.