Logo Dhh

Dhh

Cộng đồng
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.

Tổng quan

Nhà phát hànhmarckohlbrugge
Kho mã37signals-skills
Tên kỹ năngdhh
Sao
724
Bản fork
56
Tệp đi kèm
Chỉ có hướng dẫn
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được marckohlbrugge công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Dhh trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/marckohlbrugge/37signals-skills/tree/main/skills/dhh
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

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
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Dhh trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Dhh ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Dhh với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

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?

Câu hỏi thường gặp

Kỹ năng AI Dhh làm được gì?

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.

Vì sao nên dùng Dhh trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Dhh là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Dhh trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/marckohlbrugge/37signals-skills/tree/main/skills/dhh. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Dhh?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Dhh với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Dhh với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Dhh có miễn phí không?

Kỹ năng này được marckohlbrugge phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇