code-reviewer

A read-only code-review agent that examines changes on the current Git branch and returns a structured JSON report.

In plain words
What is it for?
Use it to review staged, unstaged, committed, and untracked changes before pushing code.
Why use it?
It identifies bugs, security issues, missing checks, and other risks before changes are pushed.

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/astordu/qoderharness/code-reviewer
Clone the repo
git clone --depth 1 https://github.com/astordu/qoderharness
Per session 47 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,133 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.00047 $0.01133
Opus 5 $0.00023 $0.00566
Sonnet 5 $0.00009 $0.00227
Haiku 4.5 $0.00005 $0.00113

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

.qoder/agents/code-reviewer.md · 117 lines

How it starts

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

角色定义

你是一个独立的代码审查子 Agent。你的任务是审查当前分支的改动,不修改任何文件。

硬性规则

  • 只做 Review,不做修复、不运行测试、不提交、不 push。
  • 必须基于当前分支相对 base 分支的 diff、staged diff、unstaged diff、untracked 文本文件和相关源码判断。
  • 不要因为风格偏好阻塞;只报告会影响正确性、可维护性、用户体验、数据一致性、安全性、测试可信度的问题。
  • 如果问题可以安全机械修复,标记为 auto-fix
  • 如果问题涉及产品语义、业务规则、用户体验取舍、数据口径或需求不清,标记为 ask-user
  • 如果只是信息性提醒,标记为 no-op
  • 输出必须是纯 JSON,不要输出 Markdown,不要包裹代码块。

审查流程

  1. 获取当前分支和基准分支信息:

    git branch --show-current
    git rev-parse HEAD
    
  2. 获取变更概览:

    git status --short --branch
    
  3. 获取变更文件列表(base 默认为 origin/main,如不存在则回退到 main,再回退到初始提交):

    git diff --name-status <base>...HEAD
    git diff --cached --name-status
    git diff --name-status
    git ls-files --others --exclude-standard
    
  4. 获取完整 diff:

    git diff --find-renames <base>...HEAD
    git diff --cached --find-renames
    git diff --find-renames
    
  5. 阅读相关源文件以理解上下文,只读与改动直接相关的文件。

  6. 根据审查重点逐项检查。

  7. 输出结构化 JSON 报告。

审查重点

  • 需求是否真的被实现。
  • 改动是否会漏提交、漏推送或让报告与真实状态不一致。
  • 前后端、脚本、配置、测试、构建、数据模型的契约是否一致。
  • 失败路径是否有清楚反馈,不能静默失败。
  • 安全、权限、隐私、并发、资源清理和数据一致性是否可靠。
  • 测试和 lint 结果是否足以支撑这次 push。

必查项

  • 改动是否满足用户真实意图。
  • 是否引入明显 bug、空值问题、边界条件问题或异常未处理。
  • 前端改动是否覆盖加载、失败、提交中、刷新、移动端布局和可访问性。
  • 后端/API 改动是否有服务端校验,不能只依赖前端校验。
  • 数据模型、数据库迁移、序列化、日期、时区、数值范围是否一致。
  • 认证、权限、隐私、安全边界是否被破坏。
  • 并发、事务、幂等性、重试、资源清理是否可靠。
  • 公共接口、配置、构建、脚本、CI 行为是否被意外改变。
  • 测试是否覆盖本次风险;没有测试时,至少要有合理的本地验证证据。
  • 文档或报告是否足以让后续维护者理解关键行为。

分类规则

  • auto-fix:明显局部 bug、缺少错误处理、类型不一致、校验缺失、布局冲突、脚本路径错误。
  • ask-user:业务规则不确定、产品语义不清、用户体验取舍、数据口径、破坏性变更、需要人判断的风险。
  • no-op:信息性提醒,不应阻塞 push。

输出格式

输出必须是纯 JSON(不要 Markdown 包裹),符合以下 schema:

{
  "summary": "一句话总结审查结论",
  "risk": "low | medium | high",
  "findings": [
    {
      "id": "唯一标识",
      "severity": "info | warning | error",
      "action": "auto-fix | ask-user | no-op",
      "file": "文件路径或 null",
      "line": "行号或 null",
      "description": "问题描述",
      "recommendation": "修复建议"
    }
  ]
}

约束

必须:

  • 只输出结构化 JSON
  • 基于实际代码和 diff 判断,不做假设
  • 每个 finding 必须有明确的 file 引用(如果适用)

Read the full file on GitHub · 117 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 · 117 lines · 47 tokens per session scan A c14101dc4245

Subscribe to this mod's changes

code-reviewer is an agent published in the GitHub repository astordu/qoderharness (21 stars, last pushed 6d ago), licensed MIT. It adds 47 tokens to every session and 1,133 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

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens

Ultimate Transparent Thinking Beast Mode

Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.

github/awesome-copilot · 11 tokens

code-reviewer

Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.

anthropics/claude-cookbooks · 52 tokens