Token导航 LogoToken导航

Agent Skill · 运维和基础设施

codex-review(Codex 审查)

codex-review 用于记录任务执行中的错误、用户纠正、经验和能力缺口,适合在 Codex、Claude、Cursor、Gemini CLI 中希望让 Agent 持续沉淀问题、修正和最佳实践时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

codex-review 是运维和基础设施类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证为 MIT,第三方扫描已通过,按安装量在运维和基础设施类的 2,449 个 Skill 里排第 207。

总安装 9,816周安装 401GitHub Stars 11下载 3,144核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:codex-review(Codex 审查)
来源仓库:https://github.com/benedictking/codex-review
仓库路径:skills/codex-review
安装命令:
npx skills add https://github.com/benedictking/codex-review --skill codex-review
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/benedictking/codex-review --skill codex-review

这个 Skill 是做什么的

运维和基础设施类 Skill 处理部署、监控、日志和云资源,多数需要较高的执行权限。

通过智能难度评估和 CHANGELOG 同步进行自动代码审查。

自动检测未提交的更改或审查最新提交;在调用审核之前暂存未跟踪的文件并更新 CHANGELOG 评估任务复杂性(文件计数、行更改、重构范围)并选择适当的模型和推理工作水平 将准备(CHANGELOG、暂存)与隔离上下文中的审核执行分开,以减少令牌浪费 支持具有特定于语言的 linting 的 Go、Node 和 Python 项目;包括自我更正,以协调代码更改与 CHANGELOG 描述

来源仓库内路径:skills/codex-review

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/benedictking/codex-review --skill codex-review;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

codex-review 怎么安装?

在终端执行 npx skills add https://github.com/benedictking/codex-review --skill codex-review。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

codex-review 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

codex-review 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

codex-review 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

codex-review 用的人多吗?

公开数据是累计安装 9,816 次,近一周安装 401 次,下载 3,144 次,GitHub 11 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

codex-review 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理运维和基础设施类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

运维和基础设施类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
brainstorming

头脑风暴 · Codex、Claude

3,148,776173,131操作浏览器MIT通过
copywriting

文案写作 · Codex、Claude

1,996,72425,583需要联网MIT通过
openclaw-secure-linux-cloud

OpenClaw secure linux cloud 命令行 · Codex、Claude

1,853,08840接触敏感数据未明确未通过
xget

xget 命令行 · Codex、Claude

1,799,28040执行命令未明确未通过
requesting-code-review

代码审查请求 · Codex、Claude

1,590,144173,103权限未标注MIT通过
codex-review

Codex 审查 · 本页

9,81611只读MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Codex Code Review Skill

Trigger Conditions

Triggered when user input contains:

  • "代码审核", "代码审查", "审查代码", "审核代码"
  • "review", "code review", "review code", "codex 审核"
  • "帮我审核", "检查代码", "审一下", "看看代码"

Core Concept: Intention vs Implementation

Running codex review --uncommitted alone only shows AI "what was done (Implementation)". Recording intention first tells AI "what you wanted to do (Intention)".

"Code changes + intention description" as combined input is the most effective way to improve AI code review quality.

Skill Architecture

This skill operates in two phases:

  1. Preparation Phase (current context): Check working directory, update CHANGELOG
  2. Review Phase (isolated context): Invoke Task tool to execute Lint + codex review (using context: fork to reduce context waste)

Execution Steps

0. [First] Check Working Directory Status

git diff --name-only && git status --short

Decide review mode based on output:

  • Has uncommitted changes → Continue with steps 1-4 (normal flow)
  • Clean working directory → Directly invoke codex-runner: codex review --commit HEAD

1. [Mandatory] Check if CHANGELOG is Updated

Before any review, must check if CHANGELOG.md contains description of current changes.

# Check if CHANGELOG.md is in uncommitted changes
git diff --name-only | grep -E "(CHANGELOG|changelog)"

If CHANGELOG is not updated, you must automatically perform the following (don't ask user to do it manually):

  1. Analyze changes: Run git diff --stat and git diff to get complete changes
  2. Auto-generate CHANGELOG entry: Generate compliant entry based on code changes
  3. Write to CHANGELOG.md: Use Edit tool to insert entry at top of [Unreleased] section
  4. Continue review flow: Immediately proceed to next steps after CHANGELOG update

Auto-generated CHANGELOG entry format:

## [Unreleased]

### Added / Changed / Fixed

- Feature description: what problem was solved or what functionality was implemented
- Affected files: main modified files/modules

Example - Auto-generation Flow:

1. Detected CHANGELOG not updated
2. Run git diff --stat, found handlers/responses.go modified (+88 lines)
3. Run git diff to analyze details: added CompactHandler function
4. Auto-generate entry:
   ### Added
   - Added `/v1/responses/compact` endpoint for conversation context compression
   - Supports multi-channel failover and request body size limits
5. Use Edit tool to write to CHANGELOG.md
6. Continue with lint and codex review

2. [Critical] Stage All New Files

Before invoking codex review, must add all new files (untracked files) to git staging area, otherwise codex will report P1 error.

# Check for new files
git status --short | grep "^??"

If there are new files, automatically execute:

# Safely stage all new files (handles empty list and special filenames)
git ls-files --others --exclude-standard -z | while IFS= read -r -d '' f; do git add -- "$f"; done

Explanation:

  • -z uses null character to separate filenames, correctly handles filenames with spaces/newlines
  • while IFS= read -r -d '' reads filenames one by one
  • git add -- "$f" uses -- separator, correctly handles filenames starting with -
  • When no new files exist, loop body doesn't execute, safely skipped
  • This won't stage modified files, only handles new files
  • codex needs files to be tracked by git for proper review

3. Evaluate Task Difficulty and Invoke codex-runner

Count change scale:

# Get summary line for ALL changes (staged + unstaged)
# IMPORTANT: Must use 'HEAD' as base to include both staged and unstaged changes
git diff --stat HEAD | tail -1

Why use git diff --stat HEAD:

  • git diff --stat only shows unstaged changes
  • git diff --cached --stat only shows staged changes
  • git diff --stat HEAD shows BOTH staged and unstaged changes combined
  • The last line (tail -1) is the summary line with total file count and line changes

Difficulty Assessment Criteria:

Model + Reasoning Effort Combinations:

Only recommend gpt-5.3-codex; choose model_reasoning_effort and timeout based on task complexity.

CombinationQualityTimeTimeoutRecommended For
model=gpt-5.3-codex model_reasoning_effort=xhighHigh~8-20 min15-40 minDifficult tasks, critical code, architecture changes
model=gpt-5.3-codex model_reasoning_effort=highGood~5-6 min10 minNormal tasks (default)

Critical Tasks (meets any condition, use highest reasoning effort):

  • Modified files ≥ 30
  • Total code changes (insertions + deletions) ≥ 2000 lines
  • Involves core architecture/algorithm changes (user explicitly mentioned)
  • Config: --config model=gpt-5.3-codex --config model_reasoning_effort=xhigh, timeout 40 minutes

Difficult Tasks (meets any condition):

  • Modified files ≥ 10
  • Total code changes (insertions + deletions) ≥ 500 lines
  • Single metric: insertions ≥ 300 lines OR deletions ≥ 300 lines
  • Cross-module refactoring
  • Default config: --config model=gpt-5.3-codex --config model_reasoning_effort=xhigh, timeout 15 minutes

Normal Tasks (other cases):

  • Default config: --config model=gpt-5.3-codex --config model_reasoning_effort=high, timeout 10 minutes

Evaluation Method:

You MUST parse the git diff --stat HEAD output correctly to determine difficulty:

# Get the summary line (last line of git diff --stat HEAD)
git diff --stat HEAD | tail -1
# Example outputs:
# "20 files changed, 342 insertions(+), 985 deletions(-)"
# "1 file changed, 50 insertions(+)"  # No deletions
# "3 files changed, 120 deletions(-)"  # No insertions

Critical: Why the summary line matters:

  • Each file shows individual stats: file.go | 171 ++++++++++++++++++++-
  • Only the LAST line has the total: 6 files changed, 1341 insertions(+), 18 deletions(-)
  • You must extract the last line with tail -1 to get accurate totals

Parsing Rules:

  1. Extract file count from "X file(s) changed" (handle both "1 file" and "N files")
  2. Extract insertions from "Y insertion(s)(+)" if present (handle both "1 insertion" and "N insertions"), otherwise 0
  3. Extract deletions from "Z deletion(s)(-)" if present (handle both "1 deletion" and "N deletions"), otherwise 0
  4. Calculate total changes = insertions + deletions

Important Edge Cases:

  • Single file: "1 file changed" (singular form)
  • No insertions: Git omits "insertions(+)" entirely → treat as 0
  • No deletions: Git omits "deletions(-)" entirely → treat as 0
  • Pure rename: May show "0 insertions(+), 0 deletions(-)" or omit both

Decision Logic (check in order, first match wins):

  • IF file_count >= 30 OR total_changes >= 2000 → Critical (gpt-5.3-codex + xhigh)
  • IF file_count >= 10 → Difficult (gpt-5.3-codex + xhigh)
  • IF total_changes >= 500 → Difficult (gpt-5.3-codex + xhigh)
  • IF insertions >= 300 OR deletions >= 300 → Difficult (gpt-5.3-codex + xhigh)
  • ELSE → Normal (gpt-5.3-codex + high)

Example Cases:

  • ⭐ "50 files changed, 2000 insertions(+), 1500 deletions(-)" → 关键任务,使用 model=gpt-5.3-codex model_reasoning_effort=xhigh,超时 40 分钟(核心架构变更)
  • ✅ "20 files changed, 342 insertions(+), 985 deletions(-)" → 困难任务,使用 model=gpt-5.3-codex model_reasoning_effort=xhigh,超时 15 分钟
  • ✅ "5 files changed, 600 insertions(+), 50 deletions(-)" → 困难任务,使用 model=gpt-5.3-codex model_reasoning_effort=xhigh,超时 15 分钟
  • ❌ "3 files changed, 150 insertions(+), 80 deletions(-)" → 普通任务,使用 model=gpt-5.3-codex model_reasoning_effort=high,超时 10 分钟
  • ❌ "1 file changed, 50 insertions(+)" → 普通任务,使用 model=gpt-5.3-codex model_reasoning_effort=high,超时 10 分钟

Invoke codex-runner Subtask:

Use Task tool to invoke codex-runner, passing complete command (including Lint + codex review):

Task parameters:
- subagent_type: Bash
- description: "Execute Lint and codex review"
- timeout: 2400000 (40 minutes for critical tasks) / 900000 (15 minutes for difficult tasks) / 600000 (10 minutes for normal tasks)
- prompt: Choose corresponding command based on project type and difficulty

Go project - Critical task:
  go fmt ./... && go vet ./... && codex review --uncommitted --config model=gpt-5.3-codex --config model_reasoning_effort=xhigh
  (timeout: 2400000)

Go project - Difficult task:
  go fmt ./... && go vet ./... && codex review --uncommitted --config model=gpt-5.3-codex --config model_reasoning_effort=xhigh
  (timeout: 900000)

Go project - Normal task:
  go fmt ./... && go vet ./... && codex review --uncommitted --config model=gpt-5.3-codex --config model_reasoning_effort=high
  (timeout: 600000)

Node project - Critical task:
  npm run lint:fix && codex review --uncommitted --config model=gpt-5.3-codex --config model_reasoning_effort=xhigh
  (timeout: 2400000)

Node project - Difficult task:
  npm run lint:fix && codex review --uncommitted --config model=gpt-5.3-codex --config model_reasoning_effort=xhigh
  (timeout: 900000)

Node project - Normal task:
  npm run lint:fix && codex review --uncommitted --config model=gpt-5.3-codex --config model_reasoning_effort=high
  (timeout: 600000)

Python project - Critical task:
  black . && ruff check --fix . && codex review --uncommitted --config model=gpt-5.3-codex --config model_reasoning_effort=xhigh
  (timeout: 2400000)

Python project - Difficult task:
  black . && ruff check --fix . && codex review --uncommitted --config model=gpt-5.3-codex --config model_reasoning_effort=xhigh
  (timeout: 900000)

Python project - Normal task:
  black . && ruff check --fix . && codex review --uncommitted --config model=gpt-5.3-codex --config model_reasoning_effort=high
  (timeout: 600000)

Clean working directory:
  codex review --commit HEAD --config model=gpt-5.3-codex --config model_reasoning_effort=high
  (timeout: 600000)

4. Self-Correction and Severity-Driven Fixes

If Codex finds Changelog description inconsistent with code logic:

  • Code error → Fix code
  • Description inaccurate → Update Changelog

If Codex reports P0 / P1 / P2 issues, you must proactively fix them immediately instead of stopping at reporting.

Required behavior:

  1. P0 / P1 / P2 present → directly modify code or related files to fix the issue
  2. After fixing → rerun the necessary lint / validation / review command to confirm the issue is resolved
  3. Only report completion after recheck → clearly state what was fixed and what verification passed
  4. P3 or lower / suggestion only → may report without automatic modification unless the user explicitly asks for further cleanup

Fix priority:

  • P0: Blocker, security, data loss, correctness failure → must fix first
  • P1: High-impact functional or logic bug → must fix
  • P2: Important maintainability / correctness issue with clear fix → should proactively fix in the same run

Constraints:

  • Keep fixes minimal and directly related to the reported issue
  • Do not expand scope into unrelated refactors
  • Preserve existing style and architecture unless the issue requires structural adjustment

Complete Review Protocol

  1. [GATE] Check CHANGELOG - Auto-generate and write if not updated (leverage current context to understand change intention)
  2. [PREPARE] Stage Untracked Files - Add all new files to git staging area (avoid codex P1 error)
  3. [EXEC] Task → Lint + codex review - Invoke Task tool to execute Lint and codex (isolated context, reduce waste)
  4. [FIX] Severity-Driven Self-Correction - Fix code or update description when intention ≠ implementation; proactively fix P0/P1/P2 issues and rerun checks

Codex Review Command Reference

Basic Syntax

codex review [OPTIONS] [PROMPT]

Note: [PROMPT] parameter cannot be used with --uncommitted, --base, or --commit.

Common Options

OptionDescriptionExample
--uncommittedReview all uncommitted changes in working directory (staged + unstaged + untracked)codex review --uncommitted
--base <BRANCH>Review changes relative to specified base branchcodex review --base main
--commit <SHA>Review changes introduced by specified commitcodex review --commit HEAD
--title <TITLE>Optional commit title, displayed in review summarycodex review --uncommitted --title "feat: add JSON parser"
-c, --config <key=value>Override configuration valuescodex review --uncommitted -c model="gpt-5.3-codex"

Usage Examples

# 1. Review all uncommitted changes (most common)
codex review --uncommitted

# 2. Review latest commit
codex review --commit HEAD

# 3. Review specific commit
codex review --commit abc1234

# 4. Review all changes in current branch relative to main
codex review --base main

# 5. Review changes in current branch relative to develop
codex review --base develop

# 6. Review with title (title shown in review summary)
codex review --uncommitted --title "fix: resolve JSON parsing errors"

# 7. Review using the recommended model
codex review --uncommitted -c model="gpt-5.3-codex"

Important Limitations

  • --uncommitted, --base, --commit are mutually exclusive, cannot be used together
  • [PROMPT] parameter is mutually exclusive with the above three options
  • Must be executed in a git repository directory

Important Notes

  • Ensure execution in git repository directory
  • Timeout automatically adjusted based on task difficulty:

- Critical tasks: 40 minutes (timeout: 2400000) - Difficult tasks: 15 minutes (timeout: 900000) - Normal tasks: 10 minutes (timeout: 600000)

  • codex command must be properly configured and logged in
  • codex automatically processes in batches for large changes
  • CHANGELOG.md must be in uncommitted changes, otherwise Codex cannot see intention description

Design Rationale

Why separate contexts?

  1. CHANGELOG update needs current context: Understanding user's previous conversation and task intention to generate accurate change description
  2. Codex review doesn't need conversation history: Only needs code changes and CHANGELOG, more efficient to run independently
  3. Reduce token consumption: codex review as independent subtask, doesn't carry irrelevant conversation context

平台分布

Claude Code

29.2%
按下载量换算918

Codex

24.51%
按下载量换算771

Gemini CLI

15.63%
按下载量换算491

OpenCode

12.7%
按下载量换算399

Antigravity

7.44%
按下载量换算234

Cursor

3.04%
按下载量换算96

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills