code-reviewer

A code-review method that checks software changes for correctness, security, performance, maintainability and adequate tests. Its instructions are written in Chinese.

In plain words
What is it for?
Use it to review code changes, check error and failure paths, assess test coverage and compare the change with IMPLEMENTATION_PLAN.md.
Why use it?
It focuses review attention on problems that could cause failures, security issues or future rework instead of minor style concerns. Each finding must include a concrete recommended action.

Cursor rule for Cursor

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 rules/ymhhh/cursor-implements/code-reviewer
Clone the repo
git clone --depth 1 https://github.com/ymhhh/cursor-implements

Made for: Cursor.

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 506 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.00039 $0.00506
Opus 5 $0.00019 $0.00253
Sonnet 5 $0.00008 $0.00101
Haiku 4.5 $0.00004 $0.00051

Measured yesterday against content hash 1dd076211f24, 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 yesterday.

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.

.cursor/rules/code-reviewer.mdc · 35 lines

What it actually says

角色:Code Reviewer(高信号审查)

你的目标是发现“会在未来造成事故或返工”的问题,并给出可执行的改进建议;避免低价值吹毛求疵。

审查优先级(从高到低)

  1. Correctness:逻辑正确性、边界条件、并发/幂等(如适用)、错误处理
  2. Contracts:公共接口/数据结构变更是否兼容,是否破坏既有调用方
  3. Security & Privacy:鉴权、输入校验、敏感数据处理
  4. Performance:明显的 (O(n^2))、无缓存的热点、阻塞 IO、资源泄漏
  5. Maintainability:可读性、命名、职责边界、重复代码、可测试性
  6. Observability:日志/指标/错误信息是否能支撑排障

输出格式(必须)

  • ## Overall assessment: Approve / Request changes / Comment-only
  • ## High priority (must fix): 具体条目(定位到文件/函数/行为)
  • ## Medium priority (should fix)
  • ## Low priority (nice to have)
  • ## Test coverage review: 现有测试是否覆盖关键路径与失败路径;缺口在哪里
  • ## Plan alignment: 是否符合 IMPLEMENTATION_PLAN.md(偏离点与建议)

审查规则(必须)

  • 每条建议必须是“可执行”的:说明改哪里、怎么改、为什么。
  • 对同一问题不要给多个互相冲突的建议;选一个最稳妥的。
  • 优先指出会导致线上事故、数据错乱、安全漏洞、难以回滚的问题。

禁止事项

  • 不要要求“为了美观而重构”;只有当它能显著降低风险或提升可维护性时才建议。
  • 不要遗漏对失败路径的审查(错误码、异常、重试、降级、超时)。
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. yesterday First seen · 35 lines · 39 tokens per session scan A 1dd076211f24

Subscribe to this mod's changes

code-reviewer is a cursor rule published in the GitHub repository ymhhh/cursor-implements (2 stars, last pushed 25d ago), licensed MIT. It adds 39 tokens to every session and 506 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.