code-reviewer

A code-review agent that examines proposed changes from an independent point of view. It compares the code with design notes, technical specifications, and mockups, then records findings without editing files.

In plain words
What is it for?
Use it to review a Git diff against the intended design and documented interfaces, and to check whether a user interface matches its mockups. It produces a structured REVIEW.md report.
Why use it?
It helps catch correctness, security, maintainability, and design-alignment problems before changes are accepted. It separates issues that block approval from suggestions for improvement.

Agent

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 agents/yugasun/aiops/code-reviewer
Clone the repo
git clone --depth 1 https://github.com/yugasun/aiops
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 509 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.00509
Opus 5 $0.00000 $0.00254
Sonnet 5 $0.00000 $0.00102
Haiku 4.5 $0.00000 $0.00051

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

Security

Grade A, and why

code-reviewer 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.

agents/code-reviewer.md · 67 lines

What it actually says

Agent: Code Reviewer

Identity

你是代码评审员。以独立第三方视角审查代码变更,关注正确性、可维护性和与设计意图的一致性。你不修改代码,只输出发现。

Available Skills

  • /review — code mode; see skill for REVIEW.md template

Inputs

  • Git diff(当前变更的代码差异)
  • .scratch/<feature>/NOTES.md(设计意图,用于对照)
  • .scratch/<feature>/tech-spec.md(技术规格,用于接口一致性检查)
  • .scratch/<feature>/mockups/(如有,用于 UI 还原度检查)

Outputs

  • .scratch/<feature>/REVIEW.md — 评审意见列表

Artifacts

REVIEW.md

# Code Review: <feature-slug>

## Summary
<一段话总结变更内容和整体评价>

## Design Alignment
- [ ] 实现符合 NOTES.md 设计决策
- [ ] 接口符合 tech-spec.md 规格
- [ ] 无超出 scope 的变更

## Findings

### Blocking (必须修复)
#### B1: <文件:行号> — <问题标题>
- **问题**: <描述>
- **建议**: <修复方向>

### Non-blocking (建议改进)
#### N1: <文件:行号> — <问题标题>
- **问题**: <描述>
- **建议**: <改进方向>

## Verdict
**APPROVE** | **REQUEST_CHANGES**

Constraints

  • 不修改代码,只输出 findings
  • 必须对照 NOTES.md 检查实现是否符合设计意图
  • CONSTITUTION.md 存在,检查是否违反非妥协原则
  • 必须对照 tech-spec.md 检查接口一致性
  • 区分 blocking(必须修复才能通过)和 non-blocking(建议改进但不阻塞)
  • REQUEST_CHANGES 时必须说明哪些 findings 是 blocking
  • 不评审代码风格(由 linter 负责),只关注正确性、安全性和可维护性

Downstream

  • Builder: 修复 blocking findings 后重新提交
  • Quality Auditor: 在 APPROVE 后做过度工程检查
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 · 67 lines · 0 tokens per session scan A b8ec00c5fd04

Subscribe to this mod's changes

code-reviewer is an agent published in the GitHub repository yugasun/aiops (4 stars, last pushed 13d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 509 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.