DHH Ruby/Rails Style
Generates Ruby and Rails code embodying David Heinemeier Hansson's philosophy of clarity, convention, and developer happiness.
The source repository doesn't declare a license. Check its terms before reusing the code.
Key features
- Promotes a 'fat model, thin controller' architecture, placing business logic in models.
- Enforces REST purity with a strict seven-action controller pattern.
- Guides the use of Current attributes for managing global request state cleanly.
- Integrates Hotwire and Turbo patterns, with broadcasting logic handled by models.
- Applies specific conventions for syntax, naming, and code formatting for maximum readability.
Use cases
- Refactoring an existing Rails codebase to improve clarity and align with modern conventions.
- Building a new Ruby on Rails application with a consistent, opinionated style.
- Performing code reviews to enforce the 37signals/Basecamp coding standards.
FAQ
When should I use this skill?
Use this skill when building or maintaining a Rails application that follows the 37signals/Basecamp philosophy. It's ideal for generating controllers, models, refactoring code, or getting AI-powered code reviews aligned with DHH's principles.
What key capabilities does it provide?
It enforces a strict seven-action RESTful controller pattern, promotes the 'fat model, thin controller' architecture, guides the use of Current attributes for global state, integrates Hotwire/Turbo patterns, and applies specific DHH syntax and naming conventions.
How does this skill improve my workflow?
It automates adherence to a consistent, highly readable style guide, reducing cognitive load and team debates. You get idiomatic, production-ready Rails code faster, allowing you to focus on business logic instead of stylistic minutiae.
What does this DHH Ruby/Rails Style skill do?
This skill guides Claude to generate, refactor, and review Ruby and Rails code strictly following the opinionated style of David Heinemeier Hansson (DHH). It enforces patterns like REST purity, fat models, and specific syntax conventions.
Related skills
DSPy for Ruby
Builds type-safe, composable, and optimizable LLM applications in Ruby using the DSPy.rb framework.
Developer Tools2,82412 ptsDHH/37signals Rails Style
Applies the distinctive 37signals/DHH conventions to generate and refactor Ruby on Rails code.
Developer Tools2,82412 ptsKotlin Development
Builds production-grade Kotlin applications using http4k, functional patterns, and a Test-Driven Development (TDD) methodology.
Developer Tools312 pts