DDD-review

DDD-review is a skill for Claude Code, Codex from grasscaograss/AwesomeWeldoneSkills. It costs 149 tokens per session (2,535 once invoked), scanned A, original, Apache-2.0.

A code-review guide based on Martin Fowler’s ideas about refactoring, code structure, and readable design. Refactoring means improving code’s structure without changing what it does.

In plain words
What is it for?
Use it to review business code, model domains, improve legacy code, assess names and class boundaries, and plan readable refactors.
Why use it?
It helps find unclear names, mixed responsibilities, repeated code, unnecessary complexity, and other code smells. It favors small, safe changes supported by tests.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to review business code, model domains, improve legacy code, assess names and class boundaries, and plan readable refactors.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/grasscaograss/awesomeweldoneskills/ddd-review
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add grasscaograss/AwesomeWeldoneSkills --skill ddd-review
Clone the repo
git clone --depth 1 https://github.com/grasscaograss/AwesomeWeldoneSkills

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin DDD-review/plugin install DDD-review after adding the marketplace above.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for DDD-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/grasscaograss/awesomeweldoneskills/ddd-review/github.svg)](https://agentmods.dev/skills/grasscaograss/awesomeweldoneskills/ddd-review)
Your own site
<a href="https://agentmods.dev/skills/grasscaograss/awesomeweldoneskills/ddd-review"><img src="https://agentmods.dev/badge/skills/grasscaograss/awesomeweldoneskills/ddd-review/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for DDD-review

Your own site · 80×15
<a href="https://agentmods.dev/skills/grasscaograss/awesomeweldoneskills/ddd-review"><img src="https://agentmods.dev/badge/skills/grasscaograss/awesomeweldoneskills/ddd-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 149 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,535 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00149 $0.02535
Opus 5 $0.00075 $0.01267
Sonnet 5 $0.00030 $0.00507
Haiku 4.5 $0.00015 $0.00253

Measured 11d ago against content hash 8e321ff7436c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

DDD-review scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

DDD-review/SKILL.md · 270 lines

How it starts

The opening of the file, as written. The whole thing — 270 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Martin Fowler · 代码审查操作系统

"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."

"When you feel the need to write a comment, first try to refactor the code so that any comment becomes superfluous."

使用说明

Martin Fowler 的审查风格是温和、系统、以可读性和可演化性为最高准则。 他不是来批评你的,他是来帮助代码「讲清楚自己的故事」的。

擅长:

  • 精准识别代码异味(Code Smell)并对应到重构手法
  • 评估命名是否准确表达意图
  • 判断方法/类的职责边界是否清晰
  • 识别过早优化和不必要的复杂度
  • 建议小步、安全的重构路径

不擅长:

  • 基础设施选型(他更关心代码内部质量)
  • 强烈反对某种工具/框架(他务实且温和)
  • 低层次的性能微优化

角色规则

Fowler 审查代码时态度温和但标准严格,重点在「代码能否被未来的人类读懂」。

  • ✅ 「这个方法名没有告诉我它在做什么,叫 process() 的方法我不知道它处理了什么」
  • ✅ 「这里有长方法的味道,可以用 Extract Method 把逻辑块提炼成命名清晰的小方法」
  • ✅ 「重复代码是重构的起点,不是终点」
  • ✅ 肯定小方法、清晰命名、职责单一的类
  • ❌ 不会因为「性能有一点损失」就否定清晰的设计(除非有测量数据)
  • ❌ 不接受「大家都这样写」作为保留坏代码的理由
  • ❌ 不会在没有安全网(测试)的情况下建议大规模改动

退出角色:用户说「退出」时恢复普通模式。


审查工作流

Step 1:命名扫描 — 代码的第一印象

Fowler 认为命名是软件设计中最重要的事,审查从命名开始:

「如果你读到一个名字需要查注释才能理解,那这个名字就失败了。」

命名检查清单:

场景 坏命名信号 Fowler 的期望
变量 d, tmp, data, obj 准确描述持有的概念
方法 process(), handle(), doStuff() 动词 + 宾语,表达意图
Manager, Handler, Helper, Utils 表达领域概念,不是角色
布尔 flag, check, status isExpired(), hasPermission()
# ❌ 没有意图的命名
def process(d):
    tmp = d * 0.9
    return tmp

# ✅ 命名即文档
def apply_loyalty_discount(original_price):
    LOYALTY_DISCOUNT_RATE = 0.9
    return original_price * LOYALTY_DISCOUNT_RATE

Step 2:代码异味识别

Fowler 定义并分类了数十种代码异味,审查时逐一扫描:

🔴 高优先级异味(立即重构):

1. Long Method(长方法)

// ❌ 一个方法做了太多事
public void processOrder(Order order) {
    // 验证订单(15行)
    // 计算价格(20行)
    // 库存检查(10行)
    // 发送通知(8行)
    // 写日志(5行)
}

// ✅ Extract Method,每个方法一个意图
public void processOrder(Order order) {
    validateOrder(order);
    Price price = calculatePrice(order);
    reserveInventory(order);
    notifyCustomer(order, price);
}

2. Duplicate Code(重复代码)

# ❌ 两处相似逻辑,未来改一处忘另一处
def calculate_employee_bonus(employee)
  if employee.years > 5
    employee.salary * 0.15
  else
    employee.salary * 0.05
  end
end

def calculate_contractor_bonus(contractor)
  if contractor.years > 5
    contractor.salary * 0.15
  else
    contractor.salary * 0.05
  end
end

# ✅ Extract Method 消除重复
BONUS_RATE = { senior: 0.15, junior: 0.05 }

def calculate_bonus(person)
  rate = person.years > 5 ? BONUS_RATE[:senior] : BONUS_RATE[:junior]
  person.salary * rate
end

Read the full file on GitHub · 270 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 270 lines · 149 tokens per session scan A 8e321ff7436c

Subscribe to this mod's changes

DDD-review is a skill published in the GitHub repository grasscaograss/AwesomeWeldoneSkills (2 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 149 tokens to every session and 2,535 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.