Agent skill

Dhh Rails Style

by davekilleen in davekilleen/Dex

This skill should be used when writing Ruby and Rails code in DHH's distinctive 37signals style.

MITAuto-check passedDevelopment

Install Dhh Rails Style

skills CLI
$ npx skills add davekilleen/Dex --skill dhh-rails-style -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install davekilleen/Dex dhh-rails-style --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/davekilleen/Dex.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/plugins/compound-engineering/skills/dhh-rails-style .claude/skills/dhh-rails-style && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
dhh-rails-style
GitHub stars
494
Used in
1 other repo
Token cost
~1.7k tokens
SKILL.md length
558 words
Files
7 (incl. references)
Skills in repo
61
Repo updated
First seen
Licence
MIT

At a glance

This skill should be used when writing Ruby and Rails code in DHH's distinctive 37signals style.

  • Works in 8 steps: Controllers - REST mapping, concerns,… → Models - Concerns, state records,… → Views & Frontend - Turbo, Stimulus, CSS,… → …
  • Ruby/Rails code generation
  • SKILL.md covers Core Philosophy, Naming Conventions, REST Mapping and Ruby Syntax Preferences, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Dhh Rails Style is an agent skill from davekilleen/Dex. This skill should be used when writing Ruby and Rails code in DHH's distinctive 37signals style. It applies when writing Ruby code, Rails applications, creating models, controllers, or any Ruby file. Triggers on Ruby/Rails code generation, refactoring requests, code review, or when the user mentions DHH, 37signals, Basecamp, HEY, or Campfire style. Embodies REST purity, fat models, thin controllers, Current attributes, Hotwire patterns, and the "clarity over cleverness" philosophy.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including reference files (for example `references/architecture.md`, `references/controllers.md` and `references/frontend.md`).

It sits in Development, covering Backend development. It works with Ruby and Basecamp. The repository describes itself as: Your AI Chief of Staff — a personal operating system starter kit that adapts to your role. No coding required. The licence is MIT.

When your agent uses it

  • Ruby/Rails code generation
  • Refactoring requests
  • The user mentions DHH

Example prompts

  • “clarity over cleverness”
  • “/dhh-rails-style”

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. Controllers - REST mapping, concerns, Turbo responses, API patterns
  2. Models - Concerns, state records, callbacks, scopes, POROs
  3. Views & Frontend - Turbo, Stimulus, CSS, partials
  4. Architecture - Routing, multi-tenancy, authentication, jobs, caching
  5. Testing - Minitest, fixtures, integration tests
  6. Gems & Dependencies - What to use vs avoid
  7. Code Review - Review code against DHH style
  8. General Guidance - Philosophy and conventions

What it can do on your machine

Read from SKILL.md and the folder at commit d0ffc6b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are ruby).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com
    • x.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Dhh Rails Style loads about 1.7k tokens when it runs, and up to ~14k if it reads all its reference files. Until then it costs about 126 tokens; SKILL.md has 558 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~126
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~14k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from davekilleen/Dex at commit d0ffc6b, republished under its MIT licence (© davekilleen). 558 words, ~1,703 tokens.

Download SKILL.mdSave it as .claude/skills/dhh-rails-style/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
dhh-rails-style
description
This skill should be used when writing Ruby and Rails code in DHH's distinctive 37signals style. It applies when writing Ruby code, Rails applications, creating models, controllers, or any Ruby file. Triggers on Ruby/Rails code generation, refactoring requests, code review, or when the user mentions DHH, 37signals, Basecamp, HEY, or Campfire style. Embodies REST purity, fat models, thin controllers, Current attributes, Hotwire patterns, and the "clarity over cleverness" philosophy.
<objective>
Apply 37signals/DHH Rails conventions to Ruby and Rails code. This skill provides comprehensive domain expertise extracted from analyzing production 37signals codebases (Fizzy/Campfire) and DHH's code review patterns.
</objective>

<essential_principles>

Core Philosophy

"The best code is the code you don't write. The second best is the code that's obviously correct."

Vanilla Rails is plenty:

  • Rich domain models over service objects
  • CRUD controllers over custom actions
  • Concerns for horizontal code sharing
  • Records as state instead of boolean columns
  • Database-backed everything (no Redis)
  • Build solutions before reaching for gems

What they deliberately avoid:

  • devise (custom ~150-line auth instead)
  • pundit/cancancan (simple role checks in models)
  • sidekiq (Solid Queue uses database)
  • redis (database for everything)
  • view_component (partials work fine)
  • GraphQL (REST with Turbo sufficient)
  • factory_bot (fixtures are simpler)
  • rspec (Minitest ships with Rails)
  • Tailwind (native CSS with layers)

Development Philosophy:

  • Ship, Validate, Refine - prototype-quality code to production to learn
  • Fix root causes, not symptoms
  • Write-time operations over read-time computations
  • Database constraints over ActiveRecord validations </essential_principles>
<intake>
What are you working on?
  1. Controllers - REST mapping, concerns, Turbo responses, API patterns
  2. Models - Concerns, state records, callbacks, scopes, POROs
  3. Views & Frontend - Turbo, Stimulus, CSS, partials
  4. Architecture - Routing, multi-tenancy, authentication, jobs, caching
  5. Testing - Minitest, fixtures, integration tests
  6. Gems & Dependencies - What to use vs avoid
  7. Code Review - Review code against DHH style
  8. General Guidance - Philosophy and conventions

Specify a number or describe your task. </intake>

<routing>
ResponseReference to Read
1, controllercontrollers.md
2, modelmodels.md
3, view, frontend, turbo, stimulus, cssfrontend.md
4, architecture, routing, auth, job, cachearchitecture.md
5, test, testing, minitest, fixturetesting.md
6, gem, dependency, librarygems.md
7, reviewRead all references, then review code
8, general taskRead relevant references based on context

After reading relevant references, apply patterns to the user's code. </routing>

<quick_reference>

Naming Conventions

Verbs: card.close, card.gild, board.publish (not set_style methods)

Predicates: card.closed?, card.golden? (derived from presence of related record)

Concerns: Adjectives describing capability (Closeable, Publishable, Watchable)

Controllers: Nouns matching resources (Cards::ClosuresController)

Scopes:

  • chronologically, reverse_chronologically, alphabetically, latest
  • preloaded (standard eager loading name)
  • indexed_by, sorted_by (parameterized)
  • active, unassigned (business terms, not SQL-ish)
Show full SKILL.md (210 more words)Show less

REST Mapping

Instead of custom actions, create new resources:

POST /cards/:id/close    → POST /cards/:id/closure
DELETE /cards/:id/close  → DELETE /cards/:id/closure
POST /cards/:id/archive  → POST /cards/:id/archival

Ruby Syntax Preferences

ruby
# Symbol arrays with spaces inside brackets
before_action :set_message, only: %i[ show edit update destroy ]

# Private method indentation
  private
    def set_message
      @message = Message.find(params[:id])
    end

# Expression-less case for conditionals
case
when params[:before].present?
  messages.page_before(params[:before])
else
  messages.last_page
end

# Bang methods for fail-fast
@message = Message.create!(params)

# Ternaries for simple conditionals
@room.direct? ? @room.users : @message.mentionees

Key Patterns

State as Records:

ruby
Card.joins(:closure)         # closed cards
Card.where.missing(:closure) # open cards

Current Attributes:

ruby
belongs_to :creator, default: -> { Current.user }

Authorization on Models:

ruby
class User < ApplicationRecord
  def can_administer?(message)
    message.creator == self || admin?
  end
end

</quick_reference>

<reference_index>

Domain Knowledge

All detailed patterns in references/:

FileTopics
controllers.mdREST mapping, concerns, Turbo responses, API patterns, HTTP caching
models.mdConcerns, state records, callbacks, scopes, POROs, authorization, broadcasting
frontend.mdTurbo Streams, Stimulus controllers, CSS layers, OKLCH colors, partials
architecture.mdRouting, authentication, jobs, Current attributes, caching, database patterns
testing.mdMinitest, fixtures, unit/integration/system tests, testing patterns
gems.mdWhat they use vs avoid, decision framework, Gemfile examples
</reference_index>

<success_criteria> Code follows DHH style when:

  • Controllers map to CRUD verbs on resources
  • Models use concerns for horizontal behavior
  • State is tracked via records, not booleans
  • No unnecessary service objects or abstractions
  • Database-backed solutions preferred over external services
  • Tests use Minitest with fixtures
  • Turbo/Stimulus for interactivity (no heavy JS frameworks)
  • Native CSS with modern features (layers, OKLCH, nesting)
  • Authorization logic lives on User model
  • Jobs are shallow wrappers calling model methods </success_criteria>
<credits>
Based on [The Unofficial 37signals/DHH Rails Style Guide](https://github.com/marckohlbrugge/unofficial-37signals-coding-style-guide) by [Marc Köhlbrugge](https://x.com/marckohlbrugge), generated through deep analysis of 265 pull requests from the Fizzy codebase.

Important Disclaimers:

  • LLM-generated guide - may contain inaccuracies
  • Code examples from Fizzy are licensed under the O'Saasy License
  • Not affiliated with or endorsed by 37signals
    </credits>

© davekilleen, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (references) in .claude/plugins/compound-engineering/skills/dhh-rails-style of davekilleen/Dex.

  • SKILL.md
  • references/architecture.md
  • references/controllers.md
  • references/frontend.md
  • references/gems.md
  • references/models.md
  • references/testing.md

Open the folder on GitHubat commit d0ffc6b

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in davekilleen/Dex, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Dhh Rails Style next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Dhh Rails Style compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Dhh Rails Style this skilldavekilleen/Dex4941 repos~1.7kAutomated safety check: PassMIT
Dhh Ruby StyleMicrock/ordinary-claude-skills404—~1.4kAutomated safety check: PassCustom licence
Gumroad Prod Consoleantiwork/gumroad9.8k—~2.9kAutomated safety check: NotesMIT
Dhhmarckohlbrugge/37signals-skills724—~2.2kAutomated safety check: PassNone
Ruby Prodavila7/claude-code-templates33k8 repos~445Automated safety check: PassMIT
Rubyericrisco/rsc-harness180—~3.2kAutomated safety check: PassMIT

Similar skills

  • Dhh Ruby Style

    Microck/ordinary-claude-skills

    Write Ruby and Rails code in DHH's distinctive 37signals style.

    404 GitHub stars~1.4k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Gumroad Prod Console

    antiwork/gumroad

    Execute read-only Ruby/Rails commands against Gumroad's production database for debugging and investigation.

    9.8k GitHub stars~2.9k tokensUpdated today
    DevelopmentAuto-check: notes
  • Dhh

    marckohlbrugge/37signals-skills

    Review Ruby/Rails code like DHH would - direct, opinionated, allergic to over-engineering.

    724 GitHub stars~2.2k tokensUpdated 4 mo ago
    DevelopmentAuto-check passed
  • Ruby Pro

    davila7/claude-code-templates

    Write idiomatic Ruby code with metaprogramming, Rails patterns, and performance optimization.

    33k GitHub starsUsed in 8 repos~445 tokens
    DevelopmentAuto-check passed
  • Ruby

    ericrisco/rsc-harness

    A skill your agent uses when writing or refactoring plain Ruby outside Rails — scripts, CLIs, gems, libraries: Enumerable chains and blocks, module mixins and value objects, Bundler/gemspec…

    180 GitHub stars~3.2k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Antipattern Prevention

    doorkeeper-gem/doorkeeper

    Avoid common Ruby and Rails antipatterns that degrade maintainability and performance.

    5.5k GitHub stars~1.1k tokensUpdated yesterday
    Backend & APIsAuto-check passed

More from davekilleen/Dex

All 61 skills in this repo
  • Dspy Ruby

    davekilleen/Dex

    This skill should be used when working with DSPy.rb, a Ruby framework for building type-safe, composable LLM applications.

    494 GitHub starsUsed in 1 repo~3.9k tokens
    Auto-check passed
  • Diff Adopt Profile

    davekilleen/Dex

    Adopt a full published Heydex profile by handle ('set me up like @davekilleen').

    494 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed
  • Diff Generate

    davekilleen/Dex

    Package one workflow — how you use Dex for a specific job — into a shareable DexDiff methodology doc.

    494 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed
  • Creating Agent Skills

    davekilleen/Dex

    Expert guidance for creating, writing, and refining Claude Code Skills.

    494 GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed
  • Feedback

    davekilleen/Dex

    Report a Dex bug to the Dex team with zero homework — Dex investigates locally, builds a privacy-safe report, shows it to you (or auto-sends if you've chosen that), and tracks the ticket until it's…

    494 GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed
  • Skill Score

    davekilleen/Dex

    Grade a Dex skill against the shape-aware quality rubric and report a ship/revise/no verdict with the exact fixes.

    494 GitHub stars~2.6k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Dhh Rails Style

What does Dhh Rails Style do?

This skill should be used when writing Ruby and Rails code in DHH's distinctive 37signals style. Dhh Rails Style is an agent skill from davekilleen/Dex. This skill should be used when writing Ruby and Rails code in DHH's distinctive 37signals style.

When should I use Dhh Rails Style?

Dhh Rails Style fits situations like: ruby/Rails code generation; refactoring requests; the user mentions DHH.

How do I install Dhh Rails Style in Claude Code?

Run `npx skills add davekilleen/Dex --skill dhh-rails-style -a claude-code`. Or copy the skill folder (.claude/plugins/compound-engineering/skills/dhh-rails-style in davekilleen/Dex) into .claude/skills/dhh-rails-style in your project. Claude Code loads it when a task matches its description.

How do I install Dhh Rails Style in Codex?

Run `npx skills add davekilleen/Dex --skill dhh-rails-style -a codex`. Or copy the skill folder (.claude/plugins/compound-engineering/skills/dhh-rails-style in davekilleen/Dex) into .agents/skills/dhh-rails-style in your project. Codex loads it when a task matches its description.

Can I use Dhh Rails Style in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add davekilleen/Dex --skill dhh-rails-style -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/dhh-rails-style, .gemini/skills/dhh-rails-style, .github/skills/dhh-rails-style and .opencode/skills/dhh-rails-style in your project.

What does Dhh Rails Style need to run?

SKILL.md names no scripts, command-line tools or credentials: Dhh Rails Style is instructions for the agent only.

Does Dhh Rails Style access the network?

SKILL.md names 2 domains. As links in the text: github.com and x.com. This is read from the text; nothing was executed.

Is Dhh Rails Style safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Dhh Rails Style use?

Dhh Rails Style is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Dhh Rails Style use?

About 1.7k tokens (SKILL.md is roughly 6.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 13k tokens, read only when the agent opens those files.

What are the alternatives to Dhh Rails Style?

Skills that share tags, products or a category with Dhh Rails Style: Dhh Ruby Style (Microck/ordinary-claude-skills, 404 stars), Gumroad Prod Console (antiwork/gumroad, 9.8k stars), Dhh (marckohlbrugge/37signals-skills, 724 stars) and Ruby Pro (davila7/claude-code-templates, 33k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Dhh Rails Style?

davekilleen (a GitHub user) maintains it in davekilleen/Dex, which has 494 GitHub stars. The repository holds 61 skills in this directory. The repository was last updated on October 9, 2026.

Source: davekilleen/Dex on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.