Browse / Api Development / DHH Ruby/Rails Style

DHH Ruby/Rails Style

Writes Ruby on Rails code following David Heinemeier Hansson's distinctive 37signals architectural and style conventions.

SkillApi DevelopmentDocs Standards

The source repository doesn't declare a license. Check its terms before reusing the code.

Key features

  • Strict RESTful controller design with only 7 standard actions.
  • "Fat Model, Thin Controller" architecture, placing business logic, authorization, and broadcasting in models.
  • Specific guidance on using CurrentAttributes for managing request context.
  • Model-centric broadcasting patterns for Hotwire and Turbo.
  • Enforces distinctive Ruby syntax and naming conventions for maximum clarity.

Use cases

  • Scaffolding new Rails models, controllers, and views that follow 37signals' conventions.
  • Refactoring an existing Rails codebase to improve clarity and align with modern DHH patterns.
  • Implementing real-time features using Hotwire and Turbo in a conventional, model-centric way.

FAQ

What is the DHH Ruby/Rails Style skill?

It's a specialized Claude Code Skill that instructs Claude to generate Ruby on Rails code following the distinct architectural and stylistic conventions of David Heinemeier Hansson (DHH), the creator of Rails, and his company 37signals.

When should I use this skill?

Use this skill when generating or refactoring any Ruby/Rails code, from controllers and models to entire applications. It's ideal for projects that follow the 37signals/Basecamp architecture or for developers who want to learn and apply these conventions.

How does this skill improve my workflow?

It ensures consistent, high-quality code generation without manual style correction. By automatically applying DHH's conventions, it lets you focus on business logic while maintaining a clean, conventional, and readable codebase.

What key architectural patterns does it enforce?

The skill enforces core DHH patterns like 'Fat Model, Thin Controller,' strict 7-action RESTful controllers, model-centric Hotwire/Turbo broadcasting, and the use of `CurrentAttributes` for managing request context.