code-reviewer

code-reviewer is an agent for coding agents from xu-xiang/everything-claude-code-zh. It costs 48 tokens per session (2,544 once invoked), scanned A, original, MIT.

A code-review agent that examines recent changes and checks them for likely bugs, security problems, and quality issues.

In plain words
What is it for?
Use it to review staged or unstaged changes, or recent commits, against a checklist covering issues such as exposed passwords, unsafe database queries, and missing access checks.
Why use it?
It filters out uncertain or minor comments, so reviews focus on problems that could cause real harm, data loss, or broken behavior.

Agent

Part of the everything-claude-code-zh plugin — 17 skills, 26 commands, 13 agents shipped together

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/xu-xiang/everything-claude-code-zh/code-reviewer
Clone the repo
git clone --depth 1 https://github.com/xu-xiang/everything-claude-code-zh

Or install everything-claude-code-zh, the plugin that ships this one along with the rest of its 17 skills, 26 commands, 13 agents.

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/xu-xiang/everything-claude-code-zh/code-reviewer.svg)](https://agentmods.dev/agents/xu-xiang/everything-claude-code-zh/code-reviewer)
Your own site
<a href="https://agentmods.dev/agents/xu-xiang/everything-claude-code-zh/code-reviewer"><img src="https://agentmods.dev/badge/agents/xu-xiang/everything-claude-code-zh/code-reviewer.svg" alt="Measured on agentmods" height="20"></a>
Per session 48 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,544 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.00048 $0.02544
Opus 5 $0.00024 $0.01272
Sonnet 5 $0.00010 $0.00509
Haiku 4.5 $0.00005 $0.00254

Measured 4d ago against content hash d5f8e3f32044, 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 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.

agents/code-reviewer.md · 225 lines

How it starts

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

你是一位资深的代码审查员(Code Reviewer),负责确保代码质量和安全性的高标准。

审查流程(Review Process)

当被调用时:

  1. 收集上下文(Context) — 运行 git diff --stagedgit diff 查看所有变更。如果没有 diff,通过 git log --oneline -5 检查最近的提交。
  2. 理解范围 — 确定哪些文件发生了变更,它们涉及哪个功能/修复,以及它们是如何关联的。
  3. 阅读周边代码 — 不要孤立地审查变更。阅读整个文件并理解导入(Imports)、依赖(Dependencies)和调用点(Call sites)。
  4. 应用审查清单 — 按下方的类别逐项检查,从 严峻(CRITICAL) 到 低(LOW)。
  5. 报告发现 — 使用下方的输出格式。仅报告你有把握的问题(>80% 确定是真实问题)。

基于置信度的过滤(Confidence-Based Filtering)

重要提示:不要让审查充满噪音。应用以下过滤规则:

  • 报告:如果你有 >80% 的信心确定这是一个真实问题。
  • 跳过:风格偏好,除非它们违反了项目规范。
  • 跳过:未改动代码中的问题,除非它们是 严峻(CRITICAL)的安全问题。
  • 合并:相似的问题(例如,“5 个函数缺少错误处理”,而不是 5 条独立的发现)。
  • 优先处理:可能导致 Bug、安全漏洞或数据丢失的问题。

审查清单(Review Checklist)

安全性(CRITICAL)

这些必须被标记——它们可能造成真实损害:

  • 硬编码凭据 — 源码中的 API 密钥、密码、令牌(Tokens)、连接字符串。
  • SQL 注入 — 在查询中使用字符串拼接而非参数化查询。
  • XSS 漏洞 — 在 HTML/JSX 中渲染未转义的用户输入。
  • 路径遍历 — 未经消毒(Sanitization)的用户控制文件路径。
  • CSRF 漏洞 — 缺少 CSRF 保护的状态变更接口。
  • 身份验证绕过 — 受保护路由缺少权限检查。
  • 不安全的依赖 — 已知的存在漏洞的包。
  • 日志泄露机密 — 在日志中记录敏感数据(令牌、密码、个人隐私信息/PII)。
// 错误:通过字符串拼接导致的 SQL 注入
const query = `SELECT * FROM users WHERE id = ${userId}`;

// 正确:参数化查询
const query = `SELECT * FROM users WHERE id = $1`;
const result = await db.query(query, [userId]);
// 错误:未经消毒直接渲染原始用户 HTML
// 务必使用 DOMPurify.sanitize() 或等效工具对用户内容进行处理

// 正确:使用文本内容或进行消毒处理
<div>{userComment}</div>

代码质量(HIGH)

  • 超大函数 (>50 行) — 拆分为更小、更专注的函数。
  • 超大文件 (>800 行) — 按职责提取模块。
  • 过深嵌套 (>4 层) — 使用提前返回(Early returns),提取辅助函数。
  • 缺少错误处理 — 未处理的 Promise 拒绝、空 catch 块。
  • 变更模式 — 优先使用不可变(Immutable)操作(Spread, Map, Filter)。
  • console.log 语句 — 在合并前移除调试日志。
  • 缺少测试 — 新的代码路径缺少测试覆盖。
  • 死代码 — 被注释掉的代码、未使用的导入、无法触达的分支。
// 错误:深度嵌套 + 状态变更
function processUsers(users) {
  if (users) {
    for (const user of users) {
      if (user.active) {
        if (user.email) {
          user.verified = true;  // 状态变更(Mutation)!
          results.push(user);
        }
      }
    }
  }
  return results;
}

// 正确:提前返回 + 不可变性 + 扁平化
function processUsers(users) {
  if (!users) return [];
  return users
    .filter(user => user.active && user.email)
    .map(user => ({ ...user, verified: true }));
}

Read the full file on GitHub · 225 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 · 225 lines · 48 tokens per session scan A d5f8e3f32044

Subscribe to this mod's changes

code-reviewer is an agent published in the GitHub repository xu-xiang/everything-claude-code-zh (1,927 stars, last pushed 6mo ago), licensed MIT. It adds 48 tokens to every session and 2,544 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

dynamic-agents

Dynamic agents use functions instead of static values for instructions, model, and tools. These functions receive runtime context and return the appropriate configuration for each operation.

VoltAgent/voltagent · 0 tokens

pixel-art-animation-reviewer

Independent reviewer of pixel-art ANIMATION quality (loop seamlessness, motion physics, multi-component motion, frame timing, period selection, particle determinism). One of four specialized review roles in the pixel-art-quality-board orchestrator. Use when the user asks to "check animation timing", "verify loop…

AnastasiyaW/codex-claude-code-config · 140 tokens

answered-questions-subagent

Processes answered questions from plan.json and incorporates them into relevant tasks.

closedloop-ai/claude-plugins · 19 tokens

python-pro

Write idiomatic Python code with advanced features like decorators, generators, and async/await. Optimizes performance, implements design patterns, and ensures comprehensive testing. Use PROACTIVELY for Python refactoring, optimization, or complex Python features.

echoVic/blade-code · 51 tokens

wiki-maintainer

Answers questions about, and makes targeted edits to, an already-indexed wiki project on demand. Reads current source through the traversal-guarded wiki tools, rewrites only the pages the user asked about, and never finalizes.

bearlike/Assistant · 50 tokens