review

review is a command for Claude Code from Awesome-Embedded-Learning-Studio/CFDesktop. It costs 0 tokens per session (1,108 once invoked), scanned A, original, MIT.

A Chinese-language command for structured review of C++ code, including its build files and tests. C++ is a programming language commonly used for performance-sensitive software.

In plain words
What is it for?
Use it to review a specified C++ module or file and produce a report covering code quality, architecture, performance, and tests.
Why use it?
It checks several sources of defects and maintenance problems, including performance, dependencies, class design, and modern C++ usage.

Command for Claude Code

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.

agentmods
npx agentmods add commands/awesome-embedded-learning-studio/cfdesktop/review
Clone the repo
git clone --depth 1 https://github.com/Awesome-Embedded-Learning-Studio/CFDesktop

Made for: Claude Code.

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 review

README.md
[![agentmods](https://agentmods.dev/badge/commands/awesome-embedded-learning-studio/cfdesktop/review.svg)](https://agentmods.dev/commands/awesome-embedded-learning-studio/cfdesktop/review)
Your own site
<a href="https://agentmods.dev/commands/awesome-embedded-learning-studio/cfdesktop/review"><img src="https://agentmods.dev/badge/commands/awesome-embedded-learning-studio/cfdesktop/review.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,108 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.01108
Opus 5 $0.00000 $0.00554
Sonnet 5 $0.00000 $0.00222
Haiku 4.5 $0.00000 $0.00111

Measured 4d ago against content hash acf0e4c56075, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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 4d 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.

.claude/commands/review.md · 124 lines

How it starts

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

/review — 代码审查

对指定模块进行结构化代码审查,输出中文评审报告。

触发方式

  • /review <模块/文件路径> — 审查指定模块或文件
  • 用户说"审查 XXX 子模块"

审查流程

Step 1: 确认审查范围

  1. 根据用户指定,搜索相关源文件 (.h, .hpp, .cpp)
  2. 列出完整文件清单(含行数)
  3. 等待用户确认后再继续
  4. 如果范围过大(>20 个文件),建议拆分为子模块逐个审查

Step 2: 读取全部代码

  • 读取范围内所有 .h, .hpp, .cpp 文件
  • 读取对应 CMakeLists.txt 了解构建上下文
  • 查找并读取对应测试文件(test/ 目录下)

Step 3: 五维分析

3.1 性能关注点
  • 不必要的拷贝(缺少 std::move,大类型按值传递)
  • 多余的 QString/QByteArray 转换
  • 过多的堆分配(优先栈分配、std::array、small buffer optimization)
  • 虚调度开销(可用静态分派替代的场景)
  • Signal/Slot 连接类型(auto vs direct vs queued 的合理性)
  • 循环中的重复计算
  • 不必要的 Q_OBJECT 宏(非 QObject 子类使用)
3.2 模块间依赖检查

参考 .claude/commands/architecture.md 的层级规则:

  • base 不得 include ui/desktop
  • ui 不得 include desktop
  • CMake target_link_libraries 依赖方向正确
3.3 类级耦合分析
检查项 阈值 说明
继承深度 > 3 标记过深的继承链
friend 使用 任何 需要合理理由,否则标记
Signal 数量 > 10 过多 Signal 可能是设计异味
类行数 > 500 考虑拆分为多个类
公共方法数 > 30 检查是否违反接口隔离原则
依赖类数量 > 8 高耦合信号
3.4 C++23 现代性
  • 缺少 [[nodiscard]](const getter、工厂函数、返回 expected<T> 的函数)
  • constexpr 化但未标注的函数和变量
  • 裸指针(可用智能指针或引用替代的场景)
  • 缺少 override/final(重写虚方法时)
  • 缺少 noexcept(不抛异常的移动构造/赋值)
  • 可用 std::span 替代指针+长度参数
  • 可用 using enum 简化枚举使用
  • 可用结构化绑定简化返回值处理
3.5 文档完整性

对照 document/DOXYGEN_REQUEST.md 规范:

  • 未文档化的公共 API
  • @param 方向标记缺失
  • @return 与实际返回类型不匹配
  • 风格不一致(/** *//// 混用)

Step 4: 输出报告 (中文)

# 代码审查报告: <module_name>

## 审查范围
| 文件 | 类型 | 行数 |
|------|------|------|
| ... | .h/.cpp | N |

模块层次位置: base/ui/desktop — Layer N

## 性能关注点
1. **[严重/中等/建议]** 文件:行号 — 问题描述

## 依赖违规
(层级违规详情,或 "无违规")

## 类级耦合分析
- 继承深度: ...
- friend 使用: ...
- Signal/Slot 合理性: ...
- 类职责评估: ...
- 上帝类检测: ...

## 现代 C++ 改进建议
1. **[类别]** 文件:行号 — 具体建议

## 文档完整性
- 缺失文档的公共 API: ...
- Doxygen 标签问题: ...

## 综合评估
- 健康度评分: X/10
- 主要风险: ...
- 优先改进项:
  1. ...
  2. ...
  3. ...

## 改进指南
(可对接 /optimize 的具体改进项列表)

规则

  • 始终读取实际代码,不做假设
  • 引用具体文件路径和行号
  • 区分严重问题、中等问题和建议
  • 报告中的严重问题必须附带修复方案

Read the full file on GitHub · 124 lines

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. 4d ago First seen · 124 lines · 0 tokens per session scan A acf0e4c56075

Subscribe to this mod's changes

review is a command published in the GitHub repository Awesome-Embedded-Learning-Studio/CFDesktop (10 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,108 tokens. 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.