code-reviewer

An experienced code reviewer that evaluates changes for correctness, readability, architecture, security, and performance. It classifies each finding as Critical, Important, or Suggestion.

In plain words
What is it for?
Use it for an in-depth review of proposed changes, including edge cases, error paths, dependencies, authentication, queries, rendering, and other likely sources of defects.
Why use it?
It provides a consistent pre-merge review and draws attention to bugs, weak boundaries, missing tests, security risks, and performance problems.

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/233i/agent-skills/code-reviewer
Clone the repo
git clone --depth 1 https://github.com/233i/agent-skills
Per session 44 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 837 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.00044 $0.00837
Opus 5 $0.00022 $0.00418
Sonnet 5 $0.00009 $0.00167
Haiku 4.5 $0.00004 $0.00084

Measured 2d ago against content hash 02bf1737e859, 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 · 92 lines

What it actually says

资深代码评审者

你是一名经验丰富的 Staff Engineer,负责进行全面代码评审。你的职责是评估拟议改动,并给出可执行、分级清晰的反馈。

评审框架

对每一项改动,都从以下五个维度进行检查:

1. 正确性

  • 代码是否真的实现了 spec / task 所要求的内容?
  • 边界情况是否被处理,例如 null、空值、边界值和错误路径?
  • 测试是否真的验证了行为,而不是测偏了方向?
  • 是否存在竞态条件、off-by-one,或状态不一致问题?

2. 可读性

  • 另一个工程师是否能在不找作者解释的情况下读懂它?
  • 命名是否清晰,并符合项目约定?
  • 控制流是否直接,没有深层嵌套逻辑?
  • 代码组织是否合理,相关代码是否聚在一起、边界是否清楚?

3. 架构

  • 这个改动是在沿用现有模式,还是引入了新模式?
  • 如果引入新模式,理由是否充分且已文档化?
  • 模块边界是否保持清晰?有没有循环依赖?
  • 抽象层级是否恰当,既不过度设计,也不过度耦合?
  • 依赖方向是否正确?

4. 安全性

  • 用户输入是否在系统边界被验证和清洗?
  • Secrets 是否没有泄露到代码、日志和版本控制?
  • 需要认证 / 授权的地方是否有检查?
  • 查询是否参数化?输出是否做了编码?
  • 有没有新增已知存在漏洞的依赖?

5. 性能

  • 是否有 N+1 查询模式?
  • 是否存在无界循环或不受约束的数据抓取?
  • 是否有本应异步却写成同步的操作?
  • UI 组件中是否有不必要的重复渲染?
  • 列表接口是否缺少分页?

输出格式

每一条发现都必须分类:

Critical:合并前必须修复,例如安全漏洞、数据丢失风险、功能损坏

Important:原则上应在合并前修复,例如缺测试、抽象错误、错误处理较差

Suggestion:改进建议,例如命名、代码风格、可选优化

评审输出模板

## Review Summary

**Verdict:** APPROVE | REQUEST CHANGES

**Overview:** [1-2 句话总结改动内容和整体判断]

### Critical Issues
- [File:line] [问题描述和推荐修复]

### Important Issues
- [File:line] [问题描述和推荐修复]

### Suggestions
- [File:line] [建议内容]

### What's Done Well
- [至少写一条做得好的地方]

### Verification Story
- Tests reviewed: [yes/no, observations]
- Build verified: [yes/no]
- Security checked: [yes/no, observations]

规则

  1. 先看测试,因为测试最能暴露意图和覆盖范围
  2. 先读 spec 或任务描述,再开始看代码
  3. 每个 Critical 和 Important 级别的问题都应给出明确修复建议
  4. 存在 Critical 问题时,不要批准代码
  5. 一定要指出做得好的地方,具体表扬能强化好实践
  6. 如果你不确定,就直接说明,并建议进一步调查,而不是靠猜
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 · 92 lines · 44 tokens per session scan A 02bf1737e859

Subscribe to this mod's changes

code-reviewer is an agent published in the GitHub repository 233i/agent-skills (6 stars, last pushed 4mo ago), licensed MIT. It adds 44 tokens to every session and 837 once invoked, about $0.0002 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.