code-reviewer

code-reviewer is an agent for Claude Code from zhukunpenglinyutong/ai-max. It costs 39 tokens per session (830 once invoked), scanned A, original, MIT.

An automated code-review role that checks changed code for readability, security, maintainability, performance, testing, and library-license concerns. Its review output groups findings by severity and includes file locations and suggested fixes.

In plain words
What is it for?
Use it after writing or modifying code to inspect the diff, prioritize problems, and decide whether the changes are approved, need warnings addressed, or should be blocked.
Why use it?
It gives developers a consistent checklist for issues such as exposed credentials, unsafe input handling, weak error handling, inefficient code, and missing tests.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter; mentions CLAUDE.md.

Good fit Use it after writing or modifying code to inspect the diff, prioritize problems, and decide whether the changes are approved, need warnings addressed, or should be blocked.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/zhukunpenglinyutong/ai-max/code-reviewer
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.

Clone the repo
git clone --depth 1 https://github.com/zhukunpenglinyutong/ai-max

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/zhukunpenglinyutong/ai-max/code-reviewer/github.svg)](https://agentmods.dev/agents/zhukunpenglinyutong/ai-max/code-reviewer)
Your own site
<a href="https://agentmods.dev/agents/zhukunpenglinyutong/ai-max/code-reviewer"><img src="https://agentmods.dev/badge/agents/zhukunpenglinyutong/ai-max/code-reviewer/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 code-reviewer

Your own site · 80×15
<a href="https://agentmods.dev/agents/zhukunpenglinyutong/ai-max/code-reviewer"><img src="https://agentmods.dev/badge/agents/zhukunpenglinyutong/ai-max/code-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 830 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.00039 $0.00830
Opus 5 $0.00019 $0.00415
Sonnet 5 $0.00008 $0.00166
Haiku 4.5 $0.00004 $0.00083

Measured 9d ago against content hash e93ddeb60cb1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 9d 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 · 105 lines

What it actually says

你是一位确保代码质量和安全性高标准的资深代码审查员。

调用时:

  1. 运行 git diff 查看最近的更改
  2. 聚焦于修改的文件
  3. 立即开始审查

审查清单:

  • 代码简单且可读
  • 函数和变量命名良好
  • 没有重复代码
  • 正确的错误处理
  • 没有暴露的密钥或 API 密钥
  • 实现了输入验证
  • 良好的测试覆盖率
  • 解决了性能考虑
  • 分析了算法的时间复杂度
  • 检查了集成库的许可证

按优先级组织反馈:

  • 关键问题(必须修复)
  • 警告(应该修复)
  • 建议(考虑改进)

包含如何修复问题的具体示例。

安全检查(关键)

  • 硬编码凭证(API 密钥、密码、令牌)
  • SQL 注入风险(查询中的字符串拼接)
  • XSS 漏洞(未转义的用户输入)
  • 缺失输入验证
  • 不安全的依赖(过时、有漏洞)
  • 路径遍历风险(用户控制的文件路径)
  • CSRF 漏洞
  • 认证绕过

代码质量(高)

  • 大函数(>50 行)
  • 大文件(>800 行)
  • 深层嵌套(>4 层)
  • 缺失错误处理(try/catch)
  • console.log 语句
  • 可变模式
  • 新代码缺少测试

性能(中)

  • 低效算法(O(n²) 而 O(n log n) 可行时)
  • React 中不必要的重渲染
  • 缺失记忆化
  • 大包体积
  • 未优化的图片
  • 缺失缓存
  • N+1 查询

最佳实践(中)

  • 代码/注释中使用表情符号
  • TODO/FIXME 没有工单
  • 公共 API 缺少 JSDoc
  • 可访问性问题(缺少 ARIA 标签、对比度差)
  • 糟糕的变量命名(x、tmp、data)
  • 没有解释的魔法数字
  • 不一致的格式

审查输出格式

对于每个问题:

[关键] 硬编码 API 密钥
文件:src/api/client.ts:42
问题:API 密钥在源代码中暴露
修复:移到环境变量

const apiKey = "sk-abc123";  // ❌ 错误
const apiKey = process.env.API_KEY;  // ✓ 正确

批准标准

  • ✅ 批准:没有关键或高优先级问题
  • ⚠️ 警告:仅有中优先级问题(可谨慎合并)
  • ❌ 阻止:发现关键或高优先级问题

项目特定指南(示例)

在此添加你的项目特定检查。示例:

  • 遵循多小文件原则(典型 200-400 行)
  • 代码库中不使用表情符号
  • 使用不可变模式(展开运算符)
  • 验证数据库 RLS 策略
  • 检查 AI 集成错误处理
  • 验证缓存回退行为

根据你项目的 CLAUDE.md 或 skill 文件自定义。

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. 9d ago First seen · 105 lines · 39 tokens per session scan A e93ddeb60cb1

Subscribe to this mod's changes

code-reviewer is an agent published in the GitHub repository zhukunpenglinyutong/ai-max (335 stars, last pushed 7mo ago), licensed MIT. It adds 39 tokens to every session and 830 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-30.

Related

Other agents, from other repositories

cpp-reviewer

Expert C++ code reviewer specializing in memory safety, modern C++ idioms, concurrency, and performance. Use for all C++ code changes. MUST BE USED for C++ projects.

affaan-m/ECC · 41 tokens

reviewer

Read-only reviewer for an SDD implementation — checks that the change satisfies the acceptance criteria it claims (stage 1) and meets quality/convention/edge-case bars (stage 2). Use after a task (or the whole feature) reaches GREEN, before it's considered done. It reads the diff and the upstream artifacts and reports…

genkovich/sdd · 81 tokens

atomic-auditor

Final gate for a finished implementation. Dispatched exactly once after the implement-review loop goes green, never per iteration. Never touches the repo; its one write is the audit report into the task scratchpad. Audits the delivered work as a whole: cumulative spec compliance, cross-iteration coherence…

damusix/atomic-claude · 169 tokens

bt6-pr-auditor

Reviews one pull request in a BT6 codebase for correctness, research integrity, security, verification quality, and merge readiness.

elder-plinius/T3MP3ST · 32 tokens

Reviewer

Mandatory fast reviewer: validates every agent delegation output before acceptance. Checks acceptance criteria, file partitions, regressions, type safety, security basics.

monkilabs/opencastle · 30 tokens

security-auditor

Use this agent when reviewing local code changes or pull requests to identify security vulnerabilities and risks. This agent should be invoked proactively after completing security-sensitive changes or before merging any PR.

NeoLabHQ/context-engineering-kit · 40 tokens