Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计异常

codex-code-reviewCodex 代码审查

Agent Skill

codex-code-review 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

186

周安装

8

GitHub Stars

2

下载量

65
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/beshkenadze/claude-skills-marketplace --skill codex-code-review

简介

利用 OpenAI Codex CLI 进行 AI 驱动的代码审查,识别潜在 bug 与安全风险。

  • 适合在本地开发阶段提前发现逻辑错误或反模式,提升代码健壮性。
  • 支持分支对比、暂存区审查等多种模式,输出包含修复建议的详细报告。
  • 需预先安装 Codex CLI 并配置 API 密钥,部分高级功能可能产生费用。
  • codex-code-review 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Codex Code Review

Leverage OpenAI's Codex CLI for comprehensive, AI-powered code review that catches bugs, security issues, and code quality problems.

Prerequisites

  • Codex CLI installed (npm install -g @openai/codex)
  • OpenAI API key configured (OPENAI_API_KEY environment variable)
  • Git repository with changes to review

Quick Commands

Interactive CLI Review

# Start Codex CLI
codex

# Then type /review to access review presets

Review Modes

ModeUse When
Branch comparisonBefore opening a PR, to catch issues early
Uncommitted changesBefore committing, to review staged/unstaged files
Commit reviewTo analyze a specific commit's changes
Custom instructionsTo focus on specific concerns (security, accessibility, etc.)

Workflow: Local Code Review

Step 1: Review Before Commit

# Start interactive session
codex

# Review uncommitted changes
/review
# Select: "Review uncommitted changes"

Step 2: Review Before PR

codex

# Review against base branch
/review
# Select: "Review against a base branch"
# Choose your target branch (e.g., main)

Step 3: Focused Review

codex

/review
# Select: "Custom review instructions"
# Enter: "Focus on security vulnerabilities and SQL injection"

Workflow: GitHub Integration

Setup (One-time)

  1. Configure Codex cloud at https://codex.openai.com
  2. Navigate to Settings → Repositories
  3. Enable "Code review" for your repository
  4. (Optional) Enable "Automatic reviews" for all new PRs

Manual PR Review

Comment on any pull request:

@codex review

Codex will react with 👀 and post a standard GitHub code review.

Focused PR Review

@codex review for security regressions
@codex review focusing on performance implications
@codex review checking error handling

AGENTS.md Configuration

Create AGENTS.md in your repository root:

# Review Guidelines

## Security
- Check for SQL injection vulnerabilities
- Verify input sanitization
- Review authentication/authorization logic

## Code Quality
- Ensure functions have single responsibility
- Check for proper error handling
- Verify test coverage for new code

## Performance
- Review database queries for N+1 issues
- Check for unnecessary re-renders in React components

Workflow: CI/CD Integration

GitHub Action

name: Codex Code Review
on:
  pull_request:
    types: [opened, synchronize]

jobs:
  review:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - uses: openai/codex-action@v1
        with:
          prompt-file: .github/codex-review-prompt.md
          sandbox: read-only
          safety-strategy: drop-sudo
          output-file: review-findings.json
        env:
          OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

      - name: Post Review Comments
        uses: actions/github-script@v7
        with:
          script: |
            const findings = require('./review-findings.json');
            // Post inline comments based on findings

Review Prompt Template

Create .github/codex-review-prompt.md:

Review this pull request for:
1. Security vulnerabilities (OWASP Top 10)
2. Logic errors and edge cases
3. Performance issues
4. Code maintainability
5. Test coverage gaps

Focus on issues that impact correctness, performance, security,
maintainability, or developer experience.

Provide exact file paths and line numbers for all findings.
Rate confidence for each finding (high/medium/low).

Examples

Example: Quick Pre-commit Review

Input:

Review my changes before I commit

Output:

# Start Codex and run review
codex
/review
# Select: "Review uncommitted changes"

# Codex analyzes staged/unstaged files and reports:
# - P0: SQL injection risk in user_service.py:45
# - P1: Missing null check in api/handlers.py:123
# - P2: Consider extracting duplicate logic in utils.py

Example: Security-focused PR Review

Input:

Do a security review of PR #42

Output:

# Comment on GitHub PR:
@codex review for security vulnerabilities

# Codex responds with GitHub code review:
# 🔴 P0: Unsanitized user input passed to shell command (cmd.py:78)
# 🟠 P1: JWT token stored in localStorage (auth.js:34)
# 🟡 P2: Missing rate limiting on login endpoint (routes.py:56)

Example: CI/CD Integration Setup

Input:

Set up automatic code review in GitHub Actions

Output:

  1. Create .github/workflows/codex-review.yml with openai/codex-action@v1
  2. Add OPENAI_API_KEY to repository secrets
  3. Create .github/codex-review-prompt.md with review criteria
  4. PRs now get automatic Codex reviews on open/sync

Example: Custom Review Focus

Input:

Review this code focusing on React performance

Output:

codex
/review
# Select: "Custom review instructions"
# Enter: "Focus on React performance: unnecessary re-renders, missing memo/useMemo/useCallback, large bundle imports"

# Codex reports:
# - P1: Component re-renders on every parent update, wrap with React.memo
# - P1: Expensive computation in render, move to useMemo
# - P2: Importing entire lodash, use lodash-es with tree shaking

Tips

Tip 1: Combine Review Modes

Run multiple review types for comprehensive coverage:

# First: check uncommitted changes
/review → "Review uncommitted changes"

# Then: compare against main for full PR scope
/review → "Review against a base branch" → main

Tip 2: Create Project-specific AGENTS.md

Tailor reviews to your stack:

# Review Guidelines

## Our Stack: Next.js + Prisma + tRPC
- Check for missing Prisma transaction wrapping
- Verify tRPC input validation with Zod
- Review Next.js data fetching patterns (SSR vs CSR)
- Flag any `any` types in TypeScript

Tip 3: Use Structured Output for Metrics

Track code quality over time:

codex exec --output-schema review-schema.json "Review src/" > findings.json
# Parse findings.json to track P0/P1 counts per sprint

Tip 4: Review Before and After Refactoring

# Before refactor: baseline
git stash
codex → /review → "Review against main"
# Note: 3 P1 issues

# After refactor: verify improvement
git stash pop
codex → /review → "Review against main"
# Confirm: 0 P1 issues, no new problems introduced

Tip 5: Exclude Generated Files

Add to AGENTS.md to reduce noise:

## Exclusions
- Ignore files matching: *.generated.ts, *.min.js, dist/*, coverage/*
- Skip lock files: package-lock.json, yarn.lock, pnpm-lock.yaml

Best Practices

1. Use Appropriate Review Mode

SituationRecommended Mode
Pre-commit checkUncommitted changes
Pre-PR validationBranch comparison
Post-merge auditCommit review
Security auditCustom with security focus

2. Configure Severity Levels

Default GitHub integration shows only P0 (critical) and P1 (high) issues. Adjust in AGENTS.md:

# Review Guidelines

## Severity Configuration
- Show P0, P1, and P2 issues
- Ignore style-only findings

3. Combine with Claude Code

For optimal workflow:

  1. Claude Code: Fast implementation and iteration
  2. Codex: Thorough code review before merge
# Implement with Claude
claude "Add user authentication feature"

# Review with Codex before PR
codex
/review

4. Model Selection

For critical reviews, use the strongest model:

# In codex config (~/.codex/config.json)
{
  "review_model": "gpt-5.2-codex"
}

Structured Output Schema

For CI/CD integration with inline comments:

{
  "type": "object",
  "properties": {
    "findings": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "title": { "type": "string" },
          "body": { "type": "string" },
          "confidence": { "type": "number" },
          "priority": { "enum": ["P0", "P1", "P2", "P3"] },
          "file": { "type": "string" },
          "start_line": { "type": "integer" },
          "end_line": { "type": "integer" }
        }
      }
    },
    "verdict": {
      "type": "object",
      "properties": {
        "status": { "enum": ["approved", "changes_requested"] },
        "explanation": { "type": "string" },
        "confidence": { "type": "number" }
      }
    }
  }
}

Troubleshooting

"Review model not available"

Ensure your API key has access to the review model:

export OPENAI_API_KEY="sk-..."
codex models list

GitHub Integration Not Working

  1. Verify Codex cloud is configured
  2. Check repository has code review enabled
  3. Ensure @codex has repository access

Review Too Noisy

  1. Increase severity threshold in AGENTS.md
  2. Add exclusion patterns for generated files
  3. Use focused review instructions

References

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.73%
按下载量换算24

Claude

30.39%
按下载量换算20

Cursor

17.31%
按下载量换算11

Gemini CLI

8.55%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

未通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills