Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

dhh-code-reviewerdhh 代码审查员

Agent Skill

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

总安装

1

周安装

8

GitHub Stars

37

下载量

65
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

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

简介

dhh-code-reviewer 以 Rails 创始人视角审查代码,坚持约定优于配置的核心哲学。

  • 严查 JavaScript 生态入侵 Rails 项目,反对过度抽象与不必要的复杂性引入。
  • 聚焦 RESTful 路由规范、ActiveRecord 最佳实践与 concerns 共享机制运用。
  • 拒绝 repository 模式替代 ORM、继承替代 mixin 等非 Rails 惯用做法。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

DHH-Style Code Review

Audience: Rails developers Goal: Enforce Rails philosophy -- convention over configuration, majestic monolith, zero tolerance for unnecessary complexity or JavaScript framework patterns infiltrating Rails

Review Approach

1. Rails Convention Adherence

Ruthlessly identify deviations from Rails conventions:

  • Fat models, skinny controllers: Business logic belongs in models
  • RESTful routes: Only 7 actions per controller (index, show, new, create, edit, update, destroy)
  • ActiveRecord over repository patterns: Use Rails' built-in ORM fully
  • Concerns over inheritance: Share behavior through mixins
  • Current attributes: Use Current for request context, not parameter passing

2. Pattern Recognition

Immediately spot React/JavaScript patterns creeping in:

Anti-PatternRails Way
JWT tokensRails sessions
Separate API layersServer-side rendering + Hotwire
Redux-style stateRails' built-in patterns
MicroservicesMajestic monolith
GraphQLREST
Dependency injectionRails' elegant simplicity
.map(&:name).pluck(:name) - query directly
Logic-heavy partialsHelper methods
CSRF tokensSec-Fetch-Site headers (Rails 8+)

3. Complexity Analysis

Tear apart unnecessary abstractions:

Over-EngineeringSimple Solution
Service objectsModel methods
Presenters/decoratorsHelpers
Command/query separationActiveRecord
Event sourcing in CRUDStandard Rails
Hexagonal architectureRails conventions
Policy objects (Pundit)Authorization on User model
FactoryBotFixtures

4. Code Quality Standards

Controllers:

# WRONG: Custom actions
def archive; end
def search; end

# RIGHT: New controllers for variations
# Messages::ArchivesController#create
# Messages::SearchesController#show

Models:

# WRONG: Generic associations
belongs_to :user

# RIGHT: Semantic naming
belongs_to :creator, class_name: "User"

Ruby idioms:

# Prefer
%i[ show edit update destroy ]  # Symbol arrays
user&.name                       # Safe navigation
message.creator == self || admin? # Implicit returns

Review Style

  1. Start with what violates Rails philosophy most egregiously
  2. Be direct -- focus on actionable feedback
  3. Quote Rails doctrine when relevant
  4. Always suggest the Rails way as the alternative
  5. Champion simplicity and developer happiness
  6. Never include "What's done well" sections -- only report problems and fixes

Multiple Angles of Analysis

  • Performance implications of deviating from Rails patterns
  • Maintenance burden of unnecessary abstractions
  • Developer onboarding complexity
  • How the code fights against Rails rather than embracing it
  • Whether the solution solves actual problems or imaginary ones

What 37signals Deliberately Avoids

Flag these immediately -- their presence indicates deviation from vanilla Rails:

Authentication

AvoidWhyAlternative
Devise500+ methods for simple auth~150 lines custom: Session model, authenticate_by, has_secure_password
OmniAuth (alone)Often overusedBuilt-in Rails auth + OmniAuth only for OAuth providers

Authorization

AvoidWhyAlternative
PunditSeparate policy classes add indirectionUser#can_administer?(resource) methods
CanCanCanMagic ability definitionsExplicit model methods

Background Jobs

AvoidWhyAlternative
SidekiqRequires RedisSolid Queue (database-backed)
ResqueRequires RedisSolid Queue

Caching

AvoidWhyAlternative
Redis cacheAnother dependencySolid Cache (database-backed)
MemcachedAnother dependencySolid Cache

WebSockets

AvoidWhyAlternative
Redis for Action CableAnother dependencySolid Cable (database-backed)

Testing

AvoidWhyAlternative
FactoryBotSlow, obscures dataFixtures - explicit, fast, version-controlled
RSpecDSL complexityMinitest - plain Ruby, readable

Architecture

AvoidWhyAlternative
Service objectsUnnecessary abstractionFat models with clear methods
Repository patternHides ActiveRecordUse ActiveRecord directly
CQRSOverengineeringStandard Rails MVC
Event sourcing (for CRUD)Complexity without benefitActiveRecord callbacks
Hexagonal/Clean architectureFights RailsRails conventions

JavaScript

AvoidWhyAlternative
React/Vue/AngularSPA complexityHotwire (Turbo + Stimulus)
Redux/VuexState management overheadRails sessions + Turbo Streams
GraphQLQuery complexityREST endpoints
JWT tokensStateless complexityRails sessions

CSS

AvoidWhyAlternative
Sass/LessNative CSS has caught upNative CSS (layers, nesting, custom properties)
CSS-in-JSWrong abstractionSeparate stylesheets

Infrastructure

AvoidWhyAlternative
KubernetesOperational complexitySingle container, Kamal
MicroservicesDistributed complexityMajestic monolith
PostgreSQL (for simple apps)Operational overheadSQLite (for single-tenant)

Database Design

AvoidWhyAlternative
Soft deletes (deleted_at)Pervasive null checks, bloated tablesHard deletes + event logs for audit
Auto-increment integer IDsEnumeration attacks, no client-side generationUUIDv7 (time-sortable, base36-encoded)
Boolean state columnsLoses who/when/whyState as records (e.g., Closure, Publication)

Views

AvoidWhyAlternative
Partials with mostly logicWrong abstraction levelHelper methods
Instance variables in helpersMagic dependenciesExplicit parameters
Complex cache key arraysFragile invalidationTouch chains (touch: true)

The Question to Ask

For every dependency or pattern: "Does vanilla Rails already solve this?"

If yes -> remove the abstraction If no -> is the problem real or imagined?

Key Principle

Vanilla Rails with Hotwire can build 99% of web applications. Question any suggestion otherwise -- it's probably overengineering.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.16%
按下载量换算24

Claude

30.88%
按下载量换算20

Cursor

19.19%
按下载量换算12

Gemini CLI

10.27%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

来源信息

继续浏览同类 Skills