Setup
On first use, read setup.md for integration guidance and local memory initialization.
When to Use
User asks for a code review, PR review, merge-readiness check, or bug-risk audit before shipping.
Agent delivers a risk-ranked review with explicit evidence, impact, confidence, and concrete fix direction.
Architecture
Memory lives in ~/review-code/. See memory-template.md for structure and starter templates.
CODEBLOCK0
Quick Reference
| Topic | File |
|---|
| Setup and integration behavior | INLINECODE3 |
| Memory schema and templates |
memory-template.md |
| End-to-end review execution flow |
review-workflow.md |
| Severity and confidence calibration |
severity-and-confidence.md |
| Language and architecture risk checks |
language-risk-checklists.md |
| Test impact requirements by change type |
test-impact-playbook.md |
| Comment and report templates |
comment-templates.md |
| Patch strategy for actionable fixes |
patch-strategy.md |
Data Storage
Local notes stay in ~/review-code/.
Before creating or changing local files, present the planned write and ask for user confirmation.
Core Rules
1. Define the Review Contract First
Confirm target scope before reviewing: branch, files, risk tolerance, and release context.
If scope is unclear, state assumptions explicitly and keep findings tied to those assumptions.
2. Start With Risk Mapping, Then Deep Dive
Run a fast pass to locate high-risk zones first: auth, money, data integrity, concurrency, and migration paths.
Only then perform line-level analysis with
review-workflow.md so major failures are surfaced early.
3. Every Finding Must Be Evidence-Backed
Do not report vague concerns.
Each finding must include: trigger location, concrete failure mode, user or business impact, and minimal reproduction clue.
If evidence is weak, mark low confidence or downgrade to a question.
4. Separate Blocking vs Advisory With Severity + Confidence
Use
severity-and-confidence.md for consistent triage.
Blocking findings must be reproducible or highly probable with strong impact.
Advisory feedback must remain concise and never hide blockers.
5. Always Pair Findings With a Fix Path
For each blocking issue, provide a minimally disruptive fix strategy.
Use
patch-strategy.md to propose rollback-safe edits, guard tests, and verification steps.
6. Tie Review Quality to Test Impact
Map each change to required tests using
test-impact-playbook.md.
If tests are missing, list the exact scenarios that must be added and why they prevent regressions.
7. Optimize for Signal, Not Volume
Prioritize high-impact defects over style noise.
If no blockers are found, state that explicitly and list residual risks, test gaps, and monitoring advice.
Common Traps
- - Reporting opinions as facts -> review credibility drops and teams ignore real blockers.
- Mixing blocker and nit feedback without labels -> delayed merges and mis-prioritized fixes.
- Calling something “probably fine” without tests -> silent regressions in production.
- Suggesting large rewrites for local defects -> good fixes are postponed indefinitely.
- Ignoring release context (hotfix vs refactor) -> wrong trade-offs for urgency.
- Missing migration and backward-compatibility checks -> runtime failures after deploy.
External Endpoints
This skill makes NO external network requests.
| Endpoint | Data Sent | Purpose |
|---|
| None | None | N/A |
No other data is sent externally.
Security & Privacy
Data that leaves your machine:
- - Nothing by default. This is an instruction-only review skill unless the user explicitly exports artifacts.
Data stored locally:
- - Review preferences, project constraints, and optional findings approved by the user.
- Stored in
~/review-code/.
This skill does NOT:
- - auto-approve code or merge pull requests.
- make undeclared network calls.
- store credentials, tokens, or sensitive payloads.
- modify its own core instructions or auxiliary files.
Trust
This is an instruction-only code review skill.
No credentials are required and no third-party services are contacted by default.
Related Skills
Install with
clawhub install <slug> if user confirms:
- -
code - implementation workflow that complements review findings. - INLINECODE19 - safer branch, diff, and commit handling during remediation.
- INLINECODE20 - stricter typing and runtime safety review for TS-heavy codebases.
- INLINECODE21 - release-gate checks and deployment safeguards after fixes.
- INLINECODE22 - production risk assessment and rollback planning.
Feedback
- - If useful: INLINECODE23
- Stay updated: INLINECODE24
设置
首次使用时,请阅读 setup.md 获取集成指南和本地内存初始化说明。
使用时机
当用户请求代码审查、PR审查、合并就绪检查或发布前的缺陷风险评估时使用。
代理将提供带有明确证据、影响评估、置信度和具体修复方向的风险分级审查报告。
架构
内存数据存储在 ~/review-code/ 目录下。结构和初始模板请参考 memory-template.md。
text
~/review-code/
├── memory.md # 审查偏好、技术栈上下文和近期约束
├── findings/ # 可选的每次审查结果日志
├── baselines/ # 团队规范和已接受的风险基线
└── sessions/ # 持续审计的会话摘要
快速参考
| 主题 | 文件 |
|---|
| 设置和集成行为 | setup.md |
| 内存模式和模板 |
memory-template.md |
| 端到端审查执行流程 | review-workflow.md |
| 严重性和置信度校准 | severity-and-confidence.md |
| 语言和架构风险检查 | language-risk-checklists.md |
| 按变更类型的测试影响要求 | test-impact-playbook.md |
| 评论和报告模板 | comment-templates.md |
| 可操作修复的补丁策略 | patch-strategy.md |
数据存储
本地笔记保存在 ~/review-code/ 目录下。
在创建或修改本地文件前,需展示计划写入的内容并请求用户确认。
核心规则
1. 首先定义审查契约
审查前确认目标范围:分支、文件、风险容忍度和发布上下文。
如果范围不明确,明确说明假设条件,并将审查结果与这些假设关联。
2. 先进行风险映射,再深入分析
快速扫描定位高风险区域:认证、资金、数据完整性、并发和迁移路径。
然后使用 review-workflow.md 进行逐行分析,确保重大故障尽早暴露。
3. 每个发现必须有证据支持
不报告模糊的担忧。
每个发现必须包含:触发位置、具体故障模式、用户或业务影响、最小复现线索。
如果证据不足,标记为低置信度或降级为问题。
4. 使用严重性和置信度区分阻塞性和建议性问题
使用 severity-and-confidence.md 进行一致的分级处理。
阻塞性发现必须可复现或具有高概率和重大影响。
建议性反馈必须简洁,且不得掩盖阻塞性问题。
5. 每个发现必须附带修复路径
对于每个阻塞性问题,提供最小干扰的修复策略。
使用 patch-strategy.md 提出可回滚安全的编辑、防护测试和验证步骤。
6. 将审查质量与测试影响关联
使用 test-impact-playbook.md 将每个变更映射到所需测试。
如果缺少测试,列出必须添加的确切场景及其防止回归的原因。
7. 优化信号而非数量
优先处理高影响缺陷,而非风格噪音。
如果未发现阻塞性问题,明确说明,并列出剩余风险、测试缺口和监控建议。
常见陷阱
- - 将观点作为事实报告 → 审查可信度下降,团队忽略真正的阻塞问题。
- 不区分标签混合阻塞性和琐碎反馈 → 延迟合并和错误优先级排序。
- 没有测试就声称可能没问题 → 生产环境出现静默回归。
- 对局部缺陷建议大规模重写 → 好的修复被无限期推迟。
- 忽略发布上下文(热修复 vs 重构)→ 对紧急情况做出错误权衡。
- 遗漏迁移和向后兼容性检查 → 部署后出现运行时故障。
外部端点
此技能不发起任何外部网络请求。
不向外部发送其他数据。
安全与隐私
离开您机器的数据:
- - 默认情况下无任何数据。这是一个纯指令式审查技能,除非用户明确导出产物。
本地存储的数据:
- - 审查偏好、项目约束和经用户批准的可选审查结果。
- 存储在 ~/review-code/ 目录下。
此技能不会:
- - 自动批准代码或合并拉取请求。
- 发起未声明的网络调用。
- 存储凭据、令牌或敏感负载。
- 修改自身核心指令或辅助文件。
信任
这是一个纯指令式代码审查技能。
无需凭据,默认不联系任何第三方服务。
相关技能
如果用户确认,使用 clawhub install 安装:
- - code - 补充审查结果的实现工作流。
- git - 修复期间更安全的分支、差异和提交处理。
- typescript - 针对TS密集型代码库的更严格类型和运行时安全检查。
- ci-cd - 修复后的发布门控检查和部署保障。
- devops - 生产风险评估和回滚规划。
反馈
- - 如果觉得有用:clawhub star review-code
- 保持更新:clawhub sync