review-task

A command that reviews a completed task’s code and writes a code-review report. It checks code quality, bugs, tests, error handling, security, documentation, and consistency with the technical plan.

In plain words
What is it for?
Used after implementation to inspect a task, optionally run deeper review tools, and create a review.md report with findings, severity, file locations, and suggested fixes.
Why use it?
It organizes the review around the task files and implementation report, so important problems and missing tests are less likely to be overlooked. It also requires the task status to be updated after the command runs.

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/modelengine-group/fit-framework/review-task
Clone the repo
git clone --depth 1 https://github.com/ModelEngine-Group/fit-framework

Made for: Claude Code.

Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,657 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.00013 $0.02657
Opus 5 $0.00006 $0.01328
Sonnet 5 $0.00003 $0.00531
Haiku 4.5 $0.00001 $0.00266

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

Security

Grade A, and why

review-task 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 2d 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-task.md · 346 lines

How it starts

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

Review Task Command

功能说明

审查任务的代码实现,检查代码质量、规范合规性、测试覆盖等,输出审查报告。

⚠️ CRITICAL: 状态更新要求

执行此命令后,你必须立即更新任务状态。参见规则 7。

执行流程

1. 验证前置条件

检查必需文件:

  • .ai-workspace/active/{task-id}/task.md - 任务文件
  • .ai-workspace/active/{task-id}/implementation.md - 实现报告

注意:{task-id} 格式为 TASK-{yyyyMMdd-HHmmss},例如 TASK-20260205-202013

如果任一文件不存在,提示用户先完成前置步骤。

2. 读取实现报告

仔细阅读 implementation.md,了解:

  • 已修改的文件列表
  • 实现的关键功能
  • 测试情况
  • 实现者标注的需要关注的点

3. 执行代码审查

按照 .agents/workflows/feature-development.yaml 中的 code-review 步骤:

必须审查的内容

  • 代码质量和编码规范(遵循 CLAUDE.md)
  • Bug 和潜在问题检测
  • 测试覆盖率和测试质量
  • 错误处理和边界情况
  • 性能和安全问题
  • 代码注释和文档
  • 与技术方案的一致性

审查原则

  1. 严格但公正:指出问题,但也认可优点
  2. 具体明确:给出具体的文件和行号
  3. 提供建议:不仅指出问题,还要提供改进建议
  4. 分级处理:区分必须修复和建议优化

4. 调用专业审查工具(可选)

如果需要更深度的审查,可以调用:

方案1:快速审查(推荐用于日常 PR)

/code-review:code-review <pr-number>
  • 5个并行 Sonnet 代理
  • CLAUDE.md 规范合规性
  • Bug 检测与历史上下文分析

方案2:深度审查(推荐用于重要功能)

/pr-review-toolkit:review-pr
  • 6个专业审查代理
  • 代码注释准确性、测试覆盖、错误处理、类型设计等多维度审查

5. 输出审查报告

创建 .ai-workspace/active/{task-id}/review.md,必须包含以下章节:

# 代码审查报告

## 审查概要

- **审查者**: {审查者}
- **审查时间**: {时间}
- **审查范围**: {文件数量和主要模块}
- **总体评价**: {通过/需要修改/不通过}

## 审查发现

### 🔴 必须修复(Blocker)

#### 1. {问题标题}
**文件**: `{file-path}:{line-number}`
**问题描述**: {详细描述}
**修复建议**: {具体建议}
**严重程度**: 高

### 🟡 建议修改(Major)

#### 1. {问题标题}
**文件**: `{file-path}:{line-number}`
**问题描述**: {详细描述}
**修复建议**: {具体建议}
**严重程度**: 中

### 🟢 优化建议(Minor)

#### 1. {优化点}
**文件**: `{file-path}:{line-number}`
**建议**: {优化建议}

## 优点与亮点

- {做得好的地方1}
- {做得好的地方2}

## 规范检查

### CLAUDE.md 合规性
- [ ] 编码规范
- [ ] 命名规范
- [ ] 注释规范
- [ ] 测试规范

### 代码质量指标
- 圈复杂度: {评估}
- 代码重复: {评估}
- 测试覆盖率: {百分比}

## 测试审查

### 测试覆盖
- 单元测试: {评价}
- 边界情况: {是否覆盖}
- 异常情况: {是否覆盖}

### 测试质量
- 测试命名: {评价}
- 断言充分性: {评价}
- 测试独立性: {评价}

## 安全审查

- SQL 注入风险: {检查结果}
- XSS 风险: {检查结果}
- 权限控制: {检查结果}
- 敏感信息泄露: {检查结果}

## 性能审查

- 算法复杂度: {评估}
- 数据库查询: {优化建议}
- 资源释放: {检查结果}

## 与方案的一致性

- [ ] 实现符合技术方案
- [ ] 未偏离设计意图
- [ ] 无计划外功能

## 总结与建议

### 是否批准
- [ ] ✅ 批准合并(无阻塞问题)
- [ ] ⚠️ 修改后批准(有建议修改项)
- [ ] ❌ 需要重大修改(有阻塞问题)

### 下一步行动
{根据审查结果给出下一步建议}

Read the full file on GitHub · 346 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. 2d ago First seen · 346 lines · 13 tokens per session scan A 4a3ea84e2e94

Subscribe to this mod's changes

review-task is a command published in the GitHub repository ModelEngine-Group/fit-framework (2,117 stars, last pushed 5mo ago), licensed MIT. It adds 13 tokens to every session and 2,657 once invoked, about $0.0001 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-30.