dhh-rails-style

Apply 37signals/DHH Rails conventions to Ruby and Rails code.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/jjeremycai/claudekit --skill dhh-rails-style-jjeremycai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dhh-rails-style
Source: https://github.com/jjeremycai/claudekit/tree/main/plugins/compound-engineering/skills/dhh-rails-style
Command: npx skills add https://github.com/jjeremycai/claudekit --skill dhh-rails-style-jjeremycai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers apply The Unofficial 37signals/DHH Rails style to Ruby and Rails projects, promoting clear domain models, RESTful architecture, and lightweight, testable code. It consolidates conventions around models, controllers, views, and architecture patterns to improve consistency and maintainability across Rails apps.

Core Features & Use Cases

  • Enforces State-as-Records patterns (Closure, Goldness, NotNow) over booleans to capture when and by whom changes happened.
  • Advocates for concerns-based controllers and model-centric authorization to keep business rules close to domain objects.
  • Guides integration of Turbo Streams, Stimulus, and native CSS for interactive yet accessible UI without heavy JS frameworks.
  • Use Case: A mid-size Rails team restructures a legacy app to reflect DHH patterns, enabling easier onboarding and more reliable auditing.

Quick Start

Instantiate a Rails project, then align controllers/models with the DHH approach by adding the recommended concerns and patterns; ask for a walkthrough on migrating an existing Cards feature to Closure-based state 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 conventions to an existing Ruby codebase?

To apply DHH Rails conventions, restructure controllers and models using concerns, enforce State-as-Records patterns over booleans, and integrate Turbo and Stimulus for UI interactions. This aligns your Ruby code with 37signals architecture for better maintainability.

What is the State-as-Records pattern in Rails and when do I need it?

The State-as-Records pattern in Rails captures when and by whom changes happened using Closure, Goldness, and NotNow records instead of simple booleans. You need it when auditing state transitions and maintaining clear domain models in your Rails application.

Can I use Turbo Streams and Stimulus without heavy JavaScript frameworks in Rails?

Yes, you can use Turbo Streams and Stimulus with native CSS to build interactive, accessible Rails UIs without heavy JavaScript frameworks. This approach keeps your frontend lightweight while maintaining dynamic page updates and client-side interactivity.

Does the DHH Rails style require external dependencies for background jobs and infrastructure?

No, the DHH Rails style avoids heavy external dependencies by using database-backed infrastructure and shallow background jobs. This keeps your Rails application lightweight, testable, and self-contained without relying on complex external service layers.

What's the best way to organize Rails controllers following 37signals conventions?

The best way to organize Rails controllers following 37signals conventions is using concerns-based controllers with model-centric authorization. This keeps business rules close to domain objects and maintains RESTful architecture throughout your Rails application.