Token导航 LogoToken导航

Agent Skill · 研究检索

dhh-coder(dhh 编码器)

dhh-coder 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

dhh-coder 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 44,563。

总安装 906周安装 37GitHub Stars 37下载 293核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:dhh-coder(dhh 编码器)
来源仓库:https://github.com/majesticlabs-dev/majestic-marketplace
仓库路径:skills/dhh-coder
安装命令:
npx skills add https://github.com/majesticlabs-dev/majestic-marketplace --skill dhh-coder
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/majesticlabs-dev/majestic-marketplace --skill dhh-coder

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

dhh-coder 指导 Ruby/Rails 编码遵循 DHH 推崇的开发者幸福感优先原则。强调清晰胜于巧妙,控制器动作限定七种 REST 标准方法,拒绝自定义动作膨胀。鼓励空动作利用 Rails 默认渲染机制,避免冗余样板代码重复编写。

提倡消息体短小精悍,业务逻辑下沉至 model 层,保持 controller 极度简洁。dhh-coder 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/dhh-coder

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/majesticlabs-dev/majestic-marketplace --skill…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

dhh-coder 怎么安装?

在终端执行 npx skills add https://github.com/majesticlabs-dev/majestic-marketplace --skill dhh-coder。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

dhh-coder 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

dhh-coder 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

dhh-coder 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

dhh-coder 用的人多吗?

公开数据是累计安装 906 次,近一周安装 37 次,下载 293 次,GitHub 37 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

dhh-coder 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 只想先试试效果、不希望它改动本地文件的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
dhh-coder

dhh 编码器 · 本页

90637只读未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

DHH Ruby/Rails Style Guide

Write Ruby and Rails code following DHH's philosophy: clarity over cleverness, convention over configuration, developer happiness above all.

Quick Reference

Controller Actions

  • Only 7 REST actions: index, show, new, create, edit, update, destroy
  • New behavior? Create a new controller, not a custom action
  • Action length: 1-5 lines maximum
  • Empty actions are fine: Let Rails convention handle rendering
class MessagesController < ApplicationController
  before_action :set_message, only: %i[ show edit update destroy ]

  def index
    @messages = @room.messages.with_creator.last_page
    fresh_when @messages
  end

  def show
  end

  def create
    @message = @room.messages.create_with_attachment!(message_params)
    @message.broadcast_create
  end

  private
    def set_message
      @message = @room.messages.find(params[:id])
    end

    def message_params
      params.require(:message).permit(:body, :attachment)
    end
end

Private Method Indentation

Indent private methods one level under private keyword:

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

    def message_params
      params.require(:message).permit(:body)
    end

Model Design (Fat Models)

Models own business logic, authorization, and broadcasting:

class Message < ApplicationRecord
  belongs_to :room
  belongs_to :creator, class_name: "User"
  has_many :mentions

  scope :with_creator, -> { includes(:creator) }
  scope :page_before, ->(cursor) { where("id < ?", cursor.id).order(id: :desc).limit(50) }

  def broadcast_create
    broadcast_append_to room, :messages, target: "messages"
  end

  def mentionees
    mentions.includes(:user).map(&:user)
  end
end

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

Current Attributes

Use Current for request context, never pass current_user everywhere:

class Current < ActiveSupport::CurrentAttributes
  attribute :user, :session
end

# Usage anywhere in app
Current.user.can_administer?(@message)

Ruby Syntax Preferences

DHH-specific style (for general Ruby style, see ruby-coder skill):

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

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

Query Optimization

Prefer pluck(:name) over map(&:name) and messages.count over messages.to_a.count -- push work to the database.

StringInquirer for Predicates

Use .inquiry on string enums for readable conditionals:

class Event < ApplicationRecord
  def action
    super.inquiry
  end
end

# Clean predicate methods
event.action.completed?
event.action.pending?
event.action.failed?

Controller Response Patterns

Use head:no_content for updates without body, head:created for creates. Bang methods (create!, update!) for fail-fast.

My:: Namespace for Current User Resources

Use My:: namespace for resources scoped to Current.user:

# routes.rb
namespace :my do
  resource :profile, only: %i[ show edit update ]
  resources :notifications, only: %i[ index destroy ]
end

# app/controllers/my/profiles_controller.rb
class My::ProfilesController < ApplicationController
  def show
    @profile = Current.user
  end
end

No index or show with ID needed—resource is implicit from Current.user.

Compute at Write Time

Perform data manipulation during saves, not during presentation:

# WRONG: Compute on read
def display_name
  "#{first_name} #{last_name}".titleize
end

# CORRECT: Compute on write
before_save :set_display_name

private
  def set_display_name
    self.display_name = "#{first_name} #{last_name}".titleize
  end

Benefits: enables pagination, caching, and reduces view complexity.

Delegate for Lazy Loading

Use delegate to enable lazy loading through associations:

class Message < ApplicationRecord
  belongs_to :session
  delegate :user, to: :session
end

# Lazy loads user through session
message.user

Naming Conventions

ElementConventionExample
Setter methodsset_ prefixset_message, set_room
Parameter methods{model}_paramsmessage_params
Association namesSemantic, not genericcreator not user
ScopesChainable, descriptivewith_creator, page_before
PredicatesEnd with ?direct?, can_administer?
Current user resourcesMy:: namespaceMy::ProfilesController

Hotwire/Turbo Patterns

Broadcasting is model responsibility:

# In model
def broadcast_create
  broadcast_append_to room, :messages, target: "messages"
end

For detailed Hotwire patterns, use hotwire-coder skill.

Error Handling

Rescue specific exceptions, fail fast with bang methods:

def create
  @message = @room.messages.create_with_attachment!(message_params)
  @message.broadcast_create
rescue ActiveRecord::RecordNotFound
  render action: :room_not_found
end

State as Records (Not Booleans)

Track state via database records rather than boolean columns:

# WRONG: Boolean columns for state
class Card < ApplicationRecord
  # closed: boolean, gilded: boolean columns
end
card.update!(closed: true)
card.closed?  # Loses who/when/why

# CORRECT: State as separate records
class Card < ApplicationRecord
  has_one :closure
  has_one :gilding

  def close(by:)
    create_closure!(closed_by: by)
  end

  def closed?
    closure.present?
  end
end
card.close(by: Current.user)
card.closure.closed_by  # Full audit trail

REST URL Transformations

Map custom actions to nested resource controllers:

Custom ActionREST Resource
POST /cards/:id/closePOST /cards/:id/closure
DELETE /cards/:id/closeDELETE /cards/:id/closure
POST /cards/:id/gildPOST /cards/:id/gilding
POST /posts/:id/publishPOST /posts/:id/publication
DELETE /posts/:id/publishDELETE /posts/:id/publication
# routes.rb
resources :cards do
  resource :closure, only: %i[ create destroy ]
  resource :gilding, only: %i[ create destroy ]
end

# app/controllers/cards/closures_controller.rb
class Cards::ClosuresController < ApplicationController
  def create
    @card = Card.find(params[:card_id])
    @card.close(by: Current.user)
  end

  def destroy
    @card = Card.find(params[:card_id])
    @card.closure.destroy!
  end
end

Architecture Preferences

TraditionalDHH Way
PostgreSQLSQLite (for single-tenant)
Redis + SidekiqSolid Queue
Redis cacheSolid Cache
KubernetesSingle Docker container
Service objectsFat models
Policy objects (Pundit)Authorization on User model
FactoryBotFixtures
Boolean state columnsState as records

Detailed References

For comprehensive patterns and examples, see:

Core Patterns

  • references/patterns.md - Complete code patterns with explanations
  • references/palkan-patterns.md - Namespaced model classes, counter caches, model organization order, PostgreSQL enums
  • references/concerns-organization.md - Model-specific vs common concerns, facade pattern
  • references/delegated-types.md - Polymorphism without STI problems
  • references/recording-pattern.md - Unifying abstraction for diverse content types
  • references/filter-objects.md - PORO filter objects, URL-based state, testable query building
  • references/database-patterns.md - UUIDv7, hard deletes, state as records, counter caches, indexing

Rails Components

  • references/activerecord-tips.md - ActiveRecord query patterns, validations, associations
  • references/controllers-tips.md - Controller patterns, routing, rate limiting, form objects
  • references/activestorage-tips.md - File uploads, attachments, blob handling

Hotwire

  • references/hotwire-tips.md - Turbo Frames, Turbo Streams, ViewComponents
  • references/turbo-morphing.md - Turbo 8 page refresh with morphing patterns
  • references/stimulus-catalog.md - Copy-paste-ready Stimulus controllers (clipboard, dialog, hotkey, etc.)
  • Also see: hotwire-coder, stimulus-coder, viewcomponent-coder skills for detailed patterns

Frontend

  • references/css-architecture.md - Native CSS patterns (layers, OKLCH, nesting, dark mode)

Authentication & Multi-Tenancy

  • references/passwordless-auth.md - Magic link authentication, sessions, identity model
  • references/multi-tenancy.md - Path-based tenancy, cookie scoping, tenant-aware jobs

Infrastructure & Integrations

  • references/webhooks.md - Secure webhook delivery, SSRF protection, retry strategies
  • references/caching-strategies.md - Russian Doll caching, Solid Cache, cache analysis
  • references/config-tips.md - Configuration, logging, deployment patterns
  • references/structured-events.md - Rails 8.1 Rails.event API for structured observability
  • references/resources.md - Links to source material and further reading

Philosophy Summary

  1. REST purity: 7 actions only; new controllers for variations
  2. Fat models: Authorization, broadcasting, business logic in models
  3. Thin controllers: 1-5 line actions; extract complexity
  4. Convention over configuration: Empty methods, implicit rendering
  5. Minimal abstractions: No service objects for simple cases
  6. Current attributes: Thread-local request context everywhere
  7. Hotwire-first: Model-level broadcasting, Turbo Streams, Stimulus
  8. Readable code: Semantic naming, small methods, no comments needed

Success Indicators

Code aligns with DHH style when:

  • Controllers map CRUD verbs to resources (no custom actions)
  • Models use concerns for horizontal behavior sharing
  • State uses records instead of boolean columns
  • Abstractions remain minimal (no unnecessary service objects)
  • Database backs solutions (Solid Queue/Cache, not Redis)
  • Turbo/Stimulus handle all interactivity
  • Authorization lives on User model (can_*? methods)
  • Current attributes provide request context
  • Scopes follow naming conventions (chronologically, with_*, etc.)
  • Uses pluck over map for attribute extraction
  • Current user resources use My:: namespace
  • Data computed at write time, not presentation

平台分布

Codex

36.67%
按下载量换算107

Claude

29.58%
按下载量换算87

Cursor

19.9%
按下载量换算58

Gemini CLI

10.53%
按下载量换算31

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills