AgentSkillsCN

codex-cli-review

使用 Codex CLI(而非 MCP)来审查尚未提交的更改。Codex 以完全读取磁盘的权限,独立探索代码库。

SKILL.md
--- frontmatter
name: codex-cli-review
description: Use Codex CLI (not MCP) to review uncommitted changes. Codex explores the codebase independently with full disk read access.
allowed-tools: Bash(bash:*), Read, Grep, Glob
context: fork

Codex CLI Review Skill

Trigger

  • Keywords: codex cli review, cli review, script review

When to Use

  • Need Codex to independently explore the entire project (full disk read)
  • Don't need MCP's context persistence feature
  • Want to use Codex CLI's native review format

When NOT to Use

  • Need iterative review (use /codex-review-fast --continue)
  • Need to follow up with Codex (use MCP version)
  • Only want to see diff without waiting for Codex exploration (use /codex-review-fast)

Difference from MCP Version

FeatureCLI Version (this skill)MCP Version
Independent exploreFull disk readNeeds explicit instruction
Context persistenceNonethreadId
Iterative reviewEach run independent--continue
FormatCodex native formatCustom prompt format
Execution methodScript invocationMCP tool invocation

Workflow

code
┌─────────────────────────────────────────────────────────────────┐
│ Step 1: Check Changes                                           │
├─────────────────────────────────────────────────────────────────┤
│ git status --porcelain                                          │
│ No changes -> Early exit                                        │
└─────────────────────────────────────────────────────────────────┘
                              ↓
┌─────────────────────────────────────────────────────────────────┐
│ Step 2: Execute Codex CLI                                       │
├─────────────────────────────────────────────────────────────────┤
│ codex review --uncommitted                                      │
│   -c 'sandbox_permissions=["disk-full-read-access"]'            │
│                                                                 │
│ Codex will independently:                                       │
│ - Read changed files                                            │
│ - Explore related dependencies                                  │
│ - Check existing tests                                          │
│ - Understand project structure                                  │
└─────────────────────────────────────────────────────────────────┘
                              ↓
┌─────────────────────────────────────────────────────────────────┐
│ Step 3: Output Review Results                                   │
├─────────────────────────────────────────────────────────────────┤
│ Codex native format:                                            │
│ - Summary                                                       │
│ - Issues (Critical/Major/Minor/Suggestion)                      │
│ - Recommendations                                               │
└─────────────────────────────────────────────────────────────────┘

Script

bash
bash skills/codex-cli-review/scripts/review.sh [options]

Options

ParameterDescription
--base <branch>Compare with specified branch
--title "<text>"Set review title
--prompt "<text>"Custom review instructions

I/O Contract

Input:

  • Git working directory with changes

Output:

  • Codex review report (stdout)
  • Exit code: 0 = success, non-0 = failure

Verification

  • Script executes without errors
  • Codex explored the project (file references visible in output)
  • Output includes issue classification

Examples

bash
# Review uncommitted changes
/codex-cli-review

# Compare with main branch
/codex-cli-review --base main

# With title
/codex-cli-review --title "Feature: User Auth"

# Custom review instructions
/codex-cli-review --prompt "Focus on security and performance"

Related

Command/SkillDifference
/codex-review-fastMCP version, supports iterative review
/codex-reviewMCP version, includes lint + build
/codex-review-branchMCP version, reviews entire branch