claude-review — Self-Review Quality Gate
Uses Claude CLI (claude --print) as an independent reviewer to catch errors, missed requirements, and quality issues in your work before delivering to the user.
How It Works
- 1. You complete your task and save output to file(s)
- INLINECODE1 sends your work to a separate Claude instance for independent review
- If a skill was used, the reviewer checks against the skill's specific requirements
- If LESSONS.md exists, the reviewer checks for repeat mistakes
- Issues are returned with severity ratings (critical / major / minor) and a PASS/FAIL verdict
- You fix issues and re-review until clean
The reviewer is a separate Claude instance — it has no context of your conversation, so it reviews purely on merit.
Auto-learning: When a review fails, critical and major issues are automatically logged to LESSONS.md. This file is auto-included in future reviews so the reviewer checks for repeat mistakes.
Prerequisites
- -
claude CLI must be installed and available in PATH (npm install -g @anthropic-ai/claude-code) - Valid API key configured for Claude CLI
Command
CODEBLOCK0
| Argument | Required | Description |
|---|
| INLINECODE5 | Yes | What the work was supposed to accomplish |
| INLINECODE6 |
Yes | File or folder containing the work to review. Can also include reference material, test output, or anything relevant. |
|
--skill <path> | No | SKILL.md or skill folder used for this task. The reviewer uses its requirements as a definition of done. |
Auto-included (no flag needed):
- -
LESSONS.md — if it exists, always included so the reviewer checks for repeat mistakes
All paths accept both files and folders. Claude reads all file types natively (text, images, PDFs, code).
Workflow
When instructed to review your work:
- 1. Identify every file you created or modified
- Run
review-work with the task summary, --context pointing to your output, and --skill if a skill was used - Read the review output — look for VERDICT: PASS or FAIL
- Fix any critical or major issues
- Re-run
review-work after fixing (up to 3 cycles) - Report the review summary in your final output
Examples
Review a single file:
CODEBLOCK1
Review with skill context (reviewer verifies against skill requirements):
CODEBLOCK2
Review an entire project folder:
CODEBLOCK3
Review with extra context (reference articles, test output, etc.):
CODEBLOCK4
Rules
- 1. Review every file you created or modified — not just the main one
- If a skill was used for the task, always pass INLINECODE13
- If the review reports critical or major issues → fix them → re-review (up to 3 cycles)
- Only finish after the verdict is PASS (zero critical/major issues)
- Include the review summary in your final output
- After 3 failed cycles, finish but attach the full review report
What NOT to Do
- - Do NOT ask the user for arguments — you already know what you created and which skill you used
- Do NOT say "review passed" without actually running the command
- Do NOT fabricate review results — the command produces real output
- Do NOT forget
--skill when a skill was involved in the task
LESSONS.md
Failed reviews are auto-logged to LESSONS.md (default: ~/.openclaw/workspace/LESSONS.md). Override the path with the LESSONS_FILE environment variable.
This file is also auto-read on every review, so the reviewer checks: "are any past mistakes being repeated?"
claude-review — 自我审查质量门
使用Claude CLI(claude --print)作为独立审查者,在交付给用户之前捕捉工作中的错误、遗漏需求和质量问题。
工作原理
- 1. 完成任务并将输出保存到文件
- review-work将你的工作发送到独立的Claude实例进行审查
- 如果使用了技能,审查者会对照技能的特定要求进行检查
- 如果存在LESSONS.md,审查者会检查重复错误
- 问题按严重等级(严重/主要/次要)返回,并给出通过/未通过判定
- 修复问题并重新审查,直到完全通过
审查者是独立的Claude实例——它没有你的对话上下文,因此纯粹基于工作本身进行审查。
自动学习: 当审查未通过时,严重和主要问题会自动记录到LESSONS.md。该文件会在未来的审查中自动包含,以便审查者检查重复错误。
前提条件
- - 必须安装claude CLI并在PATH中可用(npm install -g @anthropic-ai/claude-code)
- 为Claude CLI配置有效的API密钥
命令
bash
review-work <任务摘要> --context <文件或文件夹> [--skill <文件或文件夹>]
| 参数 | 必需 | 描述 |
|---|
| task_summary | 是 | 工作应该完成什么任务 |
| --context <路径> |
是 | 包含待审查工作的文件或文件夹。也可以包含参考资料、测试输出或任何相关内容。 |
| --skill <路径> | 否 | 此任务使用的SKILL.md或技能文件夹。审查者将其要求作为完成标准。 |
自动包含(无需标志):
- - LESSONS.md — 如果存在,始终包含,以便审查者检查重复错误
所有路径都接受文件和文件夹。Claude原生读取所有文件类型(文本、图片、PDF、代码)。
工作流程
当被指示审查你的工作时:
- 1. 识别你创建或修改的每个文件
- 运行review-work,包含任务摘要、指向输出的--context,以及如果使用了技能则包含--skill
- 阅读审查输出——查找判定:通过或未通过
- 修复任何严重或主要问题
- 重新运行review-work(最多3个周期)
- 报告最终输出中的审查摘要
示例
审查单个文件:
bash
review-work 编写一个Python邮箱验证器 --context /tmp/email.py
带技能上下文的审查(审查者对照技能要求进行验证):
bash
review-work 撰写一篇关于集体诉讼的SEO博客 --context /tmp/blog.md --skill ~/.openclaw/workspace/skills/seo-content-writer/SKILL.md
审查整个项目文件夹:
bash
review-work 用React构建一个待办事项应用 --context /tmp/todo-app/ --skill ~/skills/fullstack/SKILL.md
带额外上下文的审查(参考文章、测试输出等):
bash
将你的输出和参考资料放在一个文件夹中
review-work 撰写一篇符合MoneyPilot风格的博客 --context /tmp/blog-project/
规则
- 1. 审查你创建或修改的每个文件——不仅仅是主要文件
- 如果任务使用了技能,始终传递--skill
- 如果审查报告了严重或主要问题 → 修复它们 → 重新审查(最多3个周期)
- 只有在判定为通过(零严重/主要问题)后才完成
- 在最终输出中包含审查摘要
- 3个周期失败后,完成但附上完整的审查报告
禁止事项
- - 不要向用户询问参数——你已经知道自己创建了什么以及使用了什么技能
- 不要在没有实际运行命令的情况下说审查通过
- 不要捏造审查结果——命令会产生真实输出
- 当任务涉及技能时,不要忘记--skill
LESSONS.md
失败的审查会自动记录到LESSONS.md(默认:~/.openclaw/workspace/LESSONS.md)。使用LESSONS_FILE环境变量覆盖路径。
该文件在每次审查时也会自动读取,因此审查者会检查:是否有任何过去的错误被重复?