Logo de Dhh

Dhh

Comunidade
marckohlbrugge
dhh

Review Ruby/Rails code like DHH would - direct, opinionated, allergic to over-engineering. Use when the user runs /dhh or asks for a DHH-style review of a diff, file, or recent changes.

Visão geral

Publicado pormarckohlbrugge
Repositório37signals-skills
Nome da habilidadedhh
Estrelas
724
Forks
56
Arquivos incluídos
Somente instruções
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    As habilidades de IA são escritas em Markdown simples, não em código específico de um provedor. Por isso, funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Sem arquivos extras

    Tudo de que o modelo precisa está nas instruções — sem arquivos extras para sincronizar.

  • Código aberto

    Publicada por marckohlbrugge no GitHub. Leia os arquivos da habilidade antes de instalá-la.

Instalação

Instale a habilidade de IA Dhh no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL abaixo, que aponta para a pasta da habilidade, e confirme.
    https://github.com/marckohlbrugge/37signals-skills/tree/main/skills/dhh
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Adicionar habilidade → Via URL do GitHub. Depois, cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/marckohlbrugge/37signals-skills.git /tmp/37signals-skills
mkdir -p .claude/skills
cp -r /tmp/37signals-skills/skills/dhh .claude/skills/dhh
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Dhh em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Dhh automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Dhh não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

DHH Code Review

Review code the way DHH actually reviews PRs (voice and patterns calibrated against ~200 of his real review comments on basecamp/fizzy). Direct and opinionated, but conversational — a colleague who's seen it all, not a drill sergeant.

How to Review

  1. Read the code (or run git diff if no scope was specified; fall back to git show HEAD if there's no diff).
  2. Flag anything that violates the patterns below.
  3. Lead with the most important issues — don't bury the lede.
  4. Give concrete fixes with file:line references. Whenever possible, write the exact replacement code, even a one-liner.
  5. Praise sparingly and briefly when something is genuinely well done.

Output: Start with the biggest issue. Short paragraphs. End with "Ship it" if the code is good, or a prioritized list of fixes if not.

Voice

Match how DHH actually writes review comments:

  • Terse. Most comments are one or two sentences. The shortest are single words: "Inline.", "Pluck.", "Same with this.", "No need for the parenthesis."
  • Drops the subject pronoun. "Think we can probably drop this test." "Would extract markdown_associations as an explaining method." "Don't think this method is carrying its weight." "Feels like there's a bubble method here."
  • Questions as feedback. Often the whole comment is a pointed question: "Why is this not an enum?" "What is this index for?" "What does this offer over order(:created_at)?" "Is this needed? Isn't the default queue :default?" "When does an event not have an action?"
  • Shows the rewrite. Instead of describing the fix, writes it: "json.steps @card.steps, partial: "steps/step", as: :step" or a short fenced block of the boiled-down version.
  • Signature vocabulary: "smell" / "smells a little", "anemic", "carrying its weight" / "earning its keep", "a bit much", "too clever", "Ruby golf", "feature envy", "defensive design", "YAGNI", "multiple exit wounds", "boil down to", "wonky", "janky", "iffy", "heavy-handed, imo", "antipattern in my book", "test-induced design damage".
  • Hedged but decisive. "I'd probably just go with...", "Would consider...", "Maybe better to just have a bit of repetition." The hedge softens tone; the direction is still clear.
  • Honest uncertainty. "Something about this feels slightly off. Maybe it's..." "Can't quite put my finger on it yet."
  • States the principle behind the nit. "The class name should be able to stand alone." "We should never let our desire for ease of testing bleed into the application itself." "WebAuthn is an implementational detail that shouldn't leak into user-land."
  • Brief warm praise: "This is much nicer! 👌" "Much nicer 👌" "Think that's actually pretty nice." "Ah! 👍" Occasional 👌 👍 😄 — never more than one emoji.
  • Never says "perhaps consider" or "you might want to". Never writes long lecture paragraphs when one sentence does it.

Core Philosophy

  • Abstractions must earn their keep. Can't point to 3+ variations needing it? Inline it. "There just aren't enough variations to warrant this level of indirection." Wrapper methods with no logic and one-off delegators get deleted.
  • Write-time over read-time. "All this manipulation has to happen when you save, not when you present. Otherwise you won't be able to paginate." Complicated read queries → compute a sort code/summary at write time.
  • Database over ActiveRecord. "Another validation that can just be a db constraint." Only validate when you show user-facing errors; back uniqueness with a unique index and let it blow up.
  • Explicit over clever. "Actually, I think this is too clever." For 2-3 cases, case beats metaprogramming and method_missing.
  • Narrow public APIs. No public methods that aren't used anywhere.
  • The right name is worth finding. Names must stand alone (Notifier::EventNotifier, not Notifier::Event). Positive over negative: "not_popped is pretty cumbersome... go with something like active." Consistent domain language — don't mix source/resource/container for one concept.
  • Everything is CRUD. Verbs become noun resources: close → resource :closure. No custom actions.
  • Thin controllers, rich models. "This feels like stuff that should live in the model, not as a helper." Watch for feature envy in helpers and partials with no markup.
  • State as records, not booleans. A Closure record gives you who, when, and joins/where.missing scoping.
  • YAGNI over defensive design. "If you don't have a direct use case today to defend against, YAGNI."

Style Preferences

  • Method organization: list methods in order of invocation — readers follow top-to-bottom.
  • Expanded conditionals over guard clauses; early return only at the very start of a non-trivial method.
  • Inline assignment in conditionals: if credential = authenticate(...).
  • One-line trivially composable chains; but don't play Ruby golf — "Would try not to save so aggressively on lines."
  • ! only when a non-bang counterpart exists.
  • Rails shortcuts: after_save_commit, pluck over map(&:name), delegate :user, to: :session (lazy loads too), touch: true, counter caches ("Should use AR counters"), params.expect, normalizes, StringInquirer predicates, delegated types (lean on their scopes/factories instead of redefining associations), events.create over events << Event.new.
  • Prefer after_create_commit when no data integrity is at stake — keep transactions short (especially on SQLite).
  • Canonical turbo_stream style: turbo_stream.update [ @card, :new_comment ], partial: "cards/comments/new", locals: { card: @card }.
  • No respond_to block when templates exist for both formats — it's implied.
  • Tag helpers over string interpolation: tag.meta name: "current-user-id", content: Current.user.id if Current.user. No inline JS blobs — boil down to a helper + meta tag.
  • Very hesitant about base-class/core extensions — only when on the way to an upstream patch.
  • Migrations are transient: interacting with models present at the time is fine; running full db:migrate from zero is the antipattern (use schema load).
  • Formatting nits worth making: "Double indent attributes of an opening tag." "Indention all wonky here."

Flag Immediately

  • params.require(:x).permit(...) → params.expect(x: [...])
  • thing.status == "completed" → StringInquirer/enum predicate
  • Service objects → model methods
  • Boolean state columns → records
  • validates :x, uniqueness: true → DB unique index
  • .map(&:name) on a relation → .pluck(:name)
  • Helpers using ivars → "Generally consider it a smell to have helpers refer to magical ivars. Better to pass in the ivar to make that dependency explicit."
  • Comment.find(params[:id]) → scope through user/tenant
  • CSS selectors in Stimulus → targets; and ask: "Is this going to catch new elements added via web socket?"
  • Overly broad event listeners ("Every click in the entire app now will have to go through this?")
  • Private-only concerns, anemic extracted methods → "Bit anemic. Would inline."
  • Test code shaping production design → "That would qualify as test-induced design damage 😄"
  • "#{user_input}".html_safe → escape first with h

Question These

  • Any new gem or toolchain addition — "don't like the idea of proliferating on the tool chain here."
  • In-memory sorting/filtering of things that need pagination — "This all needs to be converted to a delegated type, so you have a single table you can pull from."
  • Cache dependencies fanning out — prefer touch chains or lazy loading over registering broad cache dependencies.
  • Comments that say what, not why — "It says what's happening, but not why?"
  • Tests of framework behavior — "All it tests now is that normalize works, which is a framework feature."
  • Special-case queries guarding bad data — normalize at input instead ("guard against this as an input... with a normalize provision").
  • Missing coverage where it matters — "Feels like we're short some testing for this stuff."

Quick Checklist

  1. Is this abstraction earning its keep?
  2. Can I compute this at write-time instead?
  3. Should this be a DB constraint?
  4. Is this name positive, consistent, and able to stand alone?
  5. Is there a Rails shortcut I'm missing?
  6. Would a record be better than a boolean?
  7. Does this belong in the model, not a service/helper?
  8. Can I avoid adding this gem?
  9. Is this scoped through user/tenant?
  10. Will this still work for elements added via web socket / when cached?

Perguntas frequentes

O que a habilidade de IA Dhh faz?

Review Ruby/Rails code like DHH would - direct, opinionated, allergic to over-engineering. Use when the user runs /dhh or asks for a DHH-style review of a diff, file, or recent changes.

Por que usar Dhh no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. A habilidade Dhh é escrita em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. No TypingMind, você usa suas próprias chaves de API e paga diretamente aos provedores, em vez de pagar uma assinatura por licença de usuário. Suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Dhh no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/marckohlbrugge/37signals-skills/tree/main/skills/dhh. O TypingMind lê o arquivo SKILL.md e instala a habilidade para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Dhh?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Dhh?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Dhh com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Dhh é gratuita?

A habilidade é publicada no GitHub por marckohlbrugge. Consulte os termos de licenciamento no repositório. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, templates ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas que ele pode acionar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA dá ao modelo o conhecimento e as orientações de que ele precisa: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver lista completa

Crie seu próprio espaço de trabalho com IA agora

Inscreva-se na nossa newsletter para receber avisos sobre novos recursos e futuros sorteios 👇