C

Codex审查

作者:鹿Sir开发工具v2

使用Codex CLI进行最终代码/计划审查。请在sonnet之后作为最后的审查步骤使用。

下载量
262
点赞
65
价格
免费

技能文档

---
name: majiayu000-review-codex
title: Codex审查
category: 通用技能
description: 使用Codex CLI进行最终代码/计划审查。请在sonnet之后作为最后的审查步骤使用。
---

# Review Codex (Final Review)

You are the final reviewer, invoking Codex CLI for the ultimate review before approval.

## Reference Documents

First, read and understand:
- `skill/multi-ai/reference/standards.md` - Review criteria and decision rules

## Setup: Copy Schemas to Task Directory

Before invoking Codex, copy the required schema files to `.task/` so Codex can access them:

```bash
mkdir -p .task
cp skill/multi-ai/reference/schemas/plan-review.schema.json .task/
cp skill/multi-ai/reference/schemas/review-result.schema.json .task/
```

## Your Role

- **Final gate**: Last check before plan approval or code completion
- **External review**: Use Codex CLI for independent assessment
- **Structured output**: Enforce JSON schema for consistent results

## Determine Review Type

Check which files exist:

1. If `.task/plan-refined.json` exists and no `.task/impl-result.json` -> **Plan Review**
2. If `.task/impl-result.json` exists -> **Code Review**

## Session Management

Check if `.task/.codex-session-active` exists:
- If yes: This is a **subsequent review** (Codex has reviewed before)
- If no: This is a **first review**

## For Plan Reviews

1. Read `.task/plan-refined.json`
2. Invoke Codex using Bash:

```bash
codex exec \
  --full-auto \
  --output-schema ".task/plan-review.schema.json" \
  -o .task/review-codex.json \
  "Review the plan in .task/plan-refined.json. Check for completeness, feasibility, security concerns, and potential issues. Apply standards from skill/multi-ai/reference/standards.md."
```

## For Code Reviews

1. Read `.task/impl-result.json`
2. Invoke Codex using Bash:

```bash
codex exec \
  --full-auto \
  --output-schema ".task/review-result.schema.json" \
  -o .task/review-codex.json \
  "Review the implementation in .task/impl-result.json. Identify bugs, security issues, code style violations. Apply standards from skill/multi-ai/reference/standards.md."
```

## For Subsequent Reviews

If `.task/.codex-session-active` exists, use resume:

```bash
codex exec \
  --full-auto \
  --output-schema ".task/review-result.schema.json" \
  -o .task/review-codex.json \
  resume --last \
  "Re-review the changes. Previous issues should be addressed."
```

## After Codex Completes

1. Mark session as active: `touch .task/.codex-session-active`
2. Read `.task/review-codex.json` to get the result
3. Report back:
   - Review type (plan or code)
   - Status from Codex (approved or needs_changes)
   - Summary of Codex findings
   - Confirm output in `.task/review-codex.json`

## If Codex Fails

If the Bash command fails or output is invalid:
1. Report the error to the user
2. Check if `codex` CLI is installed and authenticated
3. Try the command again with verbose output
4. If persistent failure, ask user to verify Codex CLI setup

使用说明

# Codex审查

使用Codex CLI进行最终代码/计划审查。请在sonnet之后作为最后的审查步骤使用。

## 使用

直接描述你的需求即可。

## 工作原理

基于预定义工作流自动处理用户请求并输出结构化结果。

如何安装此技能?

访问技能市场,点击「安装」按钮,按提示将技能包放入 AI 编程助手的 skills 目录即可。

浏览技能市场

支持平台:Qoder · QoderWork · Claude · Codex 等 AI 编程助手