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.
npx agentmods add rules/mr-chen-05/rules-2.1-optimized-zh/code-reviewgit clone --depth 1 https://github.com/Mr-chen-05/rules-2.1-optimized-zhWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.01927 |
| Opus 5 | $0.00000 | $0.00963 |
| Sonnet 5 | $0.00000 | $0.00385 |
| Haiku 4.5 | $0.00000 | $0.00193 |
Grade A, and why
code-review 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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 226 lines — stays where its author put it; the contents beside it link to each section on GitHub.
🔍 Code Review Workflow - 代码审查工作流
多角色拉取请求审查清单,确保代码质量和团队协作。
🚀 Commands - 命令
/code-review- 启动代码审查流程/review-checklist- 显示审查清单/security-review- 安全审查/performance-review- 性能审查
👥 Review Roles - 审查角色
🧑💻 Developer Review - 开发者审查
关注点:代码逻辑、可读性、最佳实践
Checklist - 检查清单
- 代码逻辑正确 - 实现符合需求,逻辑清晰
- 命名规范 - 变量、函数、类名有意义且一致
- 代码复用 - 避免重复代码,合理抽象
- 错误处理 - 适当的异常处理和边界条件
- 注释质量 - 复杂逻辑有清晰注释
- 代码风格 - 遵循项目编码规范
Questions to Ask - 审查问题
- 这段代码是否易于理解和维护?
- 是否有更简洁的实现方式?
- 错误处理是否充分?
- 是否遵循了SOLID原则?
🏗️ Architecture Review - 架构审查
关注点:设计模式、系统架构、扩展性
Checklist - 检查清单
- 设计模式 - 使用合适的设计模式
- 模块划分 - 职责分离,模块边界清晰
- 依赖管理 - 依赖注入,避免循环依赖
- 接口设计 - API设计合理,向后兼容
- 扩展性 - 代码易于扩展和修改
- 性能考虑 - 算法复杂度合理
Questions to Ask - 审查问题
- 这个设计是否符合系统整体架构?
- 是否引入了不必要的复杂性?
- 如何处理未来的需求变更?
- 是否有潜在的性能瓶颈?
🔒 Security Review - 安全审查
关注点:安全漏洞、数据保护、权限控制
Checklist - 检查清单
- 输入验证 - 所有用户输入都经过验证
- SQL注入防护 - 使用参数化查询
- XSS防护 - 输出编码,CSP配置
- 认证授权 - 权限检查完整
- 敏感数据 - 密码、token等安全存储
- HTTPS使用 - 敏感操作使用HTTPS
Questions to Ask - 审查问题
- 是否存在潜在的安全漏洞?
- 敏感数据是否得到适当保护?
- 权限控制是否足够严格?
- 是否遵循了安全最佳实践?
⚡ Performance Review - 性能审查
关注点:性能优化、资源使用、扩展性
Checklist - 检查清单
- 算法效率 - 时间和空间复杂度合理
- 数据库查询 - 查询优化,避免N+1问题
- 缓存策略 - 合理使用缓存
- 资源管理 - 内存泄漏,连接池管理
- 并发处理 - 线程安全,死锁预防
- 监控指标 - 关键性能指标监控
Questions to Ask - 审查问题
- 这段代码在高负载下表现如何?
- 是否有性能优化的空间?
- 资源使用是否合理?
- 如何监控和调试性能问题?
📋 Review Process - 审查流程
1. Pre-Review Preparation - 审查前准备
# 检查PR信息
- PR标题和描述清晰
- 关联相关Issue
- 包含测试用例
- CI/CD检查通过
2. Code Review Steps - 代码审查步骤
Step 1: Overview - 概览
- 理解PR的目的和范围
- 检查文件变更列表
- 评估变更的影响范围
Step 2: Detailed Review - 详细审查
- 逐文件审查代码变更
- 应用相应角色的检查清单
- 标记问题和改进建议
Step 3: Testing Review - 测试审查
- 检查测试覆盖率
- 验证测试用例质量
- 确认边界条件测试
Step 4: Documentation Review - 文档审查
- API文档更新
- README和使用指南
- 代码注释完整性
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.
- 3d ago First seen · 226 lines · 0 tokens per session scan A 88c22592c74d
code-review is a cursor rule published in the GitHub repository Mr-chen-05/rules-2.1-optimized-zh (29 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,927 tokens. 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.
Other cursor rules, from other repositories
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
cli-error-handling
CLI command error handling patterns.
prefer-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.
control-plane-descriptors
Control plane descriptor and instance implementation patterns.
family-instance-domain-actions
Family instance domain action implementation patterns.