ce-dhh-rails-style

Enforce DHH Rails-style conventions across Ruby and Rails codebases.

Updated Sep 25, 2024
One-click install
npx skills add https://github.com/kwam1na/athena --skill ce-dhh-rails-style-kwam1na
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ce-dhh-rails-style
Source: https://github.com/kwam1na/athena/tree/main/.agents/skills/ce-dhh-rails-style
Command: npx skills add https://github.com/kwam1na/athena --skill ce-dhh-rails-style-kwam1na

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a standardized approach to applying the DHH Rails conventions across Ruby and Rails projects, helping teams write cleaner, more maintainable code by promoting domain-driven models, lean controllers, RESTful patterns, and a consistent testing philosophy.

Core Features & Use Cases

  • Enforces naming conventions and file organization aligned with 37signals/DHH style.
  • Encourages state as records via concerns and domain objects to avoid boolean flags.
  • Guides architecture decisions, testing practices (Minitest with fixtures), and Turbo/Stimulus frontend usage for Rails apps.
  • Use Case: refactor a Rails app to adopt 37signals conventions in models, controllers, views, and tests while improving readability and maintainability.

Quick Start

Follow the DHH Rails conventions by refactoring your Rails project’s controllers, models, and tests to align with the 37signals-style patterns described in the skill.

Frequently Asked Questions about ce-dhh-rails-style

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I refactor a Rails app to follow DHH conventions for controllers and models?

DHH Rails conventions favor Minitest with fixtures over RSpec and factories. This Skill enforces this specific testing philosophy to maintain consistent, database-backed testing patterns across your Rails project.

What is the best way to manage state in Rails models according to 37signals style?

The 37signals style manages state as records via concerns and domain objects rather than using boolean flags. This approach promotes domain-driven models for cleaner, more maintainable Rails codebases.

How do I structure Rails views and frontend code using Turbo and Stimulus conventions?

Turbo and Stimulus usage is guided as part of DHH Rails conventions for frontend architecture. The Skill enforces these patterns within your Rails views to ensure standardized, hotwire-integrated UI development.

Can I use DHH Rails style conventions for reviewing new Rails features and tests?

Yes, DHH Rails style conventions apply to guiding refactors, reviews, and new features within Rails projects. The Skill enforces naming, architecture, and testing patterns to ensure readability and maintainability.

Do I need RSpec to apply DHH Rails conventions to my Ruby codebase?

No, DHH Rails conventions prefer Minitest with fixtures instead of RSpec. The Skill specifically enforces this testing philosophy alongside database-backed patterns and lean controller architectures.