Skip to content
Agent Orchestration
Skill

/codex-code-reviewer

Systematic code review workflow using zen mcp's codex tool. Use this skill when the user explicitly requests "use codex to check the code", "check if the recently generated code has any issues", or "check the code after each generation". The skill performs iterative review

BOOST
From plugin
claude-code-zen-mcp-skill-work
1186 skills1 command
Install
$ npx -y skills add VCnoC/Claude-Code-Zen-mcp-Skill-Work --skill codex-code-reviewer --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/codex-code-reviewer

Context preview

The summary Claude sees to decide when to auto-load this skill.

Systematic code review workflow using zen mcp's codex tool. Use this skill when the user explicitly requests "use codex to check the code", "check if the recently generated code has any issues", or "check the code after each generation". The skill performs iterative review

SKILL.md

codex-code-reviewer.SKILL.md
name: codex-code-reviewer
description: Systematic code review workflow using zen mcp's codex tool. Use this skill when the user explicitly requests "use codex to check the code", "check if the recently generated code has any issues", or "check the code after each generation". The skill performs iterative review cycles - checking code quality, presenting issues to the user for approval, applying fixes, and re-checking until no issues remain or maximum iterations (5) are reached.

Codex Code Reviewer

Overview

This skill provides a systematic, iterative code review workflow powered by zen mcp's codex tool. It automatically checks recently modified code files against project standards (CLAUDE.md requirements), presents identified issues to users for approval, applies fixes, and re-validates until code quality standards are met or the maximum iteration limit is reached.

**Operation Modes:**

  • **Interactive Mode (Default)**: Present issues to user, wait for approval before applying fixes
  • **Full Automation Mode**: Automatically select and apply all suggested fixes without user approval (activated when user initially requests "full automation" or "complete automation")

When to Use This Skill

Trigger this skill when the user says:

  • "Use codex to check the code"
  • "Please help me check if the recently generated code has any issues"
  • "Check the code after each generation"
  • Similar requests for code quality validation using codex

Workflow: Iterative Code Review Cycle

Prerequisites

Before starting the review cycle:

1. ** Read Operation Mode from Context (automation_mode - READ FROM SSOT):**

  • automation_mode definition and constraints: See CLAUDE.md「📚 共享概念速查」
  • **This skill's role**: Skill Layer (read-only), read from context `[AUTOMATION_MODE: true/false]`, true → auto-fix / false → ask user

1a. **Read Coverage Target from Context (coverage_target - READ FROM SSOT):**

  • coverage_target definition and constraints: See CLAUDE.md「📚 共享概念速查」
  • **This skill's role**: Skill Layer (read-only), read from context `[COVERAGE_TARGET: X%]`, validate coverage (≥ target pass, < 70% reject)

2. **Identify Files to Review:**

  • Use `git status` or similar to identify recently modified files
  • **Interactive Mode (automation_mode = false)**: Confirm with user which files should be reviewed
  • **Automated Mode (automation_mode = true)**: Auto-select all recently modified files, log decision to auto_log.md

3. Initialize iteration counter: `current_iteration = 1` 4. Set maximum iterations: `max_iterations = 5` 5. Initialize review tool tracker: `first_review_done = false` 6. **Detect Review Context:**

  • Check if this is **final quality validation** (project completion/final verification)
  • If YES: Enable **Final Validation Mode** (requires minimum 2 passes: codereview + clink)
  • If NO: Use **Standard Review Mode**

Review Cycle Loop

Execute the following loop until termination conditions are met:

Step 1: Select and Invoke Appropriate Review Tool

**Tool Selection Logic:**

if current_iteration == 1 and not first_review_done:
    # First review: Use mcp__zen__codereview
    review_tool = "mcp__zen__codereview"
    first_review_done = True
else:
    # Second and subsequent reviews: Use mcp__zen__clink with codex CLI
    review_tool = "mcp__zen__clink"

**A) First Review: Call `mcp__zen__codereview`**

Tool: mcp__zen__codereview
Parameters:
- step: Detailed review request (e.g., "Review the following files for code quality, security, performance, and adherence to project standards...")
- step_number: current_iteration
- total_steps: Estimate based on findings (start with 2-3)
- next_step_required: true (initially)
- findings: Document all discovered issues
- relevant_files: [list of recently modified file paths - MUST be absolute full paths]
- review_type: "full" (covers quality, security, performance, architecture)
- model: "codex" (or user-specified model)
- review_validation_type: "external" (for expert validation)
- confidence: Start with "exploring", increase as understanding grows

**Important**: Use absolute full paths; follow zen mcp's codereview workflow (2-3 steps); reference `references/quality_standards/README.md` (on-demand loading)

**B) Second and Subsequent Reviews: Call `mcp__zen__clink` with codex CLI**

Tool: mcp__zen__clink
Parameters:
- prompt: "Review files for: 1) Code quality 2) Security 3) Performance 4) Architecture 5) Documentation. Categorize by severity (critical/high/medium/low), provide file:line locations and fix recommendations."
- cli_name: "codex"
- role: "code_reviewer"
- files: [absolute full paths]
- continuation_id: [optional, for context continuity]

**Important**: Use absolute full paths for `files`; use `continuation_id` for context continuity; supported params: prompt, cli_name, role, files, images, continuation_id

Step 2: Present Findings and Decision Making

After codex returns the review results:

1. **Summarize Issues Clearly:**

  • Group by severity (critical/high/medium/low)
  • Provide specific file locations and line numbers
  • Explain the impact of each issue

2. **Decision Making Based on automation_mode (READ FROM CONTEXT):**

  • automation_mode behavior and decision logic: See CLAUDE.md「📚 共享概念速查」and「G11 Automated Repair Skills」
  • `[AUTOMATION_MODE: false]` → Interactive: Ask user approval
  • `[AUTOMATION_MODE: true]` → Automated: Auto-fix Critical/High, conditional Medium, auto-fix Low style issues
  • Output `[Automated Decision Record]` fragments for auto_log.md (collected by router, generated by simple-gemini)

Step 3: Apply Fixes

**Interactive Mode**: If user approves **Automation Mode**: Proceed directly based on auto-decision logic

1. Apply fixes to the identified issues 2. Use appropriate tools (Edit, Write, etc.) to modify code 3. Follow project coding standards from CLAUDE.md 4. Document changes made

**Automation Mode Transpar

Read more
Ships withclaude-code-zen-mcp-skill-work

🚀 一个为 AI 编程智能体设计的、开箱即用的规则体系与技能包。 本项目不仅仅是工具的集合,更是一套标准化的工作流程和质量保障机制。它通过智能路由、多阶段工作流和自动化代码审查,赋能 AI 智能体以更高效、更可靠的方式完成复杂的编程任务。

Get the whole plugin