Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问许可证需确认审计提醒

codex-pr-reviewCodex PR 审查

Agent Skill

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

总安装

210

周安装

9

GitHub Stars

59

下载量

73
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/lploc94/codex_skill --skill codex-pr-review

简介

codex-pr-review 对分支变更进行同行评审,涵盖代码质量与合并 readiness。

  • 采用 Claude 与 Codex 平等辩论机制,不修改任何代码。
  • 需在有差异的分支上运行,支持 diff、提交历史与 PR 描述综合分析。
  • 建议提前备份工作区以防意外变更。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Codex PR Review

Purpose

Use this skill to run peer debate on branch changes before merge — covering code quality, PR description, commit hygiene, scope, and merge readiness. Claude and Codex are equal analytical peers — Claude orchestrates the debate loop and final synthesis. No code is modified.

When to Use

Before opening or merging a pull request. Covers branch diff, commit history, and PR description together in one pass — more thorough than /codex-impl-review for pre-merge scenarios.

Prerequisites

  • Current branch differs from base branch (has commits not in base).
  • git diff <base>...HEAD produces output.

Runner

RUNNER="{{RUNNER_PATH}}"
SKILLS_DIR="{{SKILLS_DIR}}"
json_esc() { printf '%s' "$1" | node -e 'let d="";process.stdin.on("data",c=>d+=c);process.stdin.on("end",()=>process.stdout.write(JSON.stringify(d)))'; }

Stdin Format Rules

  • JSONrender/finalize: heredoc. Literal-only → <<'RENDER_EOF'. Dynamic vars → escape with json_esc, use <<RENDER_EOF (unquoted).
  • json_esc output includes quotes → embed directly: {"KEY":$(json_esc "$VAL")}.
  • Plain textstart/resume: printf '%s' "$PROMPT" | node "$RUNNER"... — NEVER echo.
  • NEVER echo '{...}' for JSON. Forbidden: NULL bytes (\x00).

Workflow

1. Collect Inputs

Auto-detect context and announce defaults before asking anything.

Base-branch detection: git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null (strip prefix); fallback: check refs/remotes/origin/mainorigin/masterrefs/heads/mainrefs/heads/master via git show-ref --verify --quiet.

Effort detection (after base resolved): FILES_CHANGED=$(git diff --name-only "$BASE"...HEAD | wc -l) → <10: medium, 10–50: high, >50: xhigh; default high.

Announce: "Detected: base=$BASE, effort=$EFFORT (N files changed). Proceeding — reply to override. PR title/description optional." Block only if base cannot be resolved.

Inputs: base branch (validated: git rev-parse --verify <base>), PR title/description (optional), branch diff (git diff <base>...HEAD), commit log (git log <base>..HEAD --oneline), commit list/count, file stats (git diff <base>...HEAD --stat), effort.

2. Pre-flight Checks

Verify git repo (git rev-parse --show-toplevel). Branch diff: git diff <base>...HEAD --quiet must FAIL (exit 1) — else abort "no diff". Commits: git rev-list --count <base>..HEAD > 0 — else abort "no commits ahead".

3. Init Session

INIT_OUTPUT=$(node "$RUNNER" init --skill-name codex-pr-review --working-dir "$PWD")
SESSION_DIR=${INIT_OUTPUT#CODEX_SESSION:}

Validate: INIT_OUTPUT must start with CODEX_SESSION:.

4. Render Codex Prompt

Template round1:

PROMPT=$(node "$RUNNER" render --skill codex-pr-review --template round1 --skills-dir "$SKILLS_DIR" <<RENDER_EOF
{"PR_TITLE":$(json_esc "$PR_TITLE"),"PR_DESCRIPTION":$(json_esc "$PR_DESCRIPTION"),"BASE_BRANCH":$(json_esc "$BASE"),"COMMIT_COUNT":$(json_esc "$COMMIT_COUNT"),"COMMIT_LIST":$(json_esc "$COMMIT_LIST"),"USER_REQUEST":$(json_esc "$USER_REQUEST"),"SESSION_CONTEXT":$(json_esc "$SESSION_CONTEXT")}
RENDER_EOF
)

5. Start Round 1

printf '%s' "$PROMPT" | node "$RUNNER" start "$SESSION_DIR" --effort "$EFFORT"

Validate JSON: {"status":"started","round":1}. Error with CODEX_NOT_FOUND → tell user to install codex. Do NOT poll yet — proceed to Step 6.

6. Claude Independent Analysis

INFORMATION BARRIER: MUST NOT read any Codex output until analysis is complete.

Render Claude analysis prompt (template claude-analysis):

CLAUDE_PROMPT=$(node "$RUNNER" render --skill codex-pr-review --template claude-analysis --skills-dir "$SKILLS_DIR" <<RENDER_EOF
{"PR_TITLE":$(json_esc "$PR_TITLE"),"PR_DESCRIPTION":$(json_esc "$PR_DESCRIPTION"),"BASE_BRANCH":$(json_esc "$BASE"),"COMMIT_COUNT":$(json_esc "$COMMIT_COUNT"),"COMMIT_LIST":$(json_esc "$COMMIT_LIST")}
RENDER_EOF
)

Instructions: Read rendered prompt → read diff (git diff <base>...HEAD), commits (git log, git show <SHA>), file stats, PR title/description → write FINDING-{N} per references/claude-analysis-template.md → Overall Assessment (Code quality, PR description accuracy, Commit hygiene, Scope appropriateness) → Merge Readiness Pre-Assessment (must-pass status, blocking issues, recommendation) → Strongest Positions. CRITICAL: Complete BEFORE Step 7.

7. Poll

POLL_JSON=$(node "$RUNNER" poll "$SESSION_DIR")

Poll intervals: Round 1: 60s, 60s, 30s, 15s+. Round 2+: 30s, 15s+.

Report specific activities from activities array (e.g. "Codex [60s]: reading branch diff, analyzing commit hygiene"). NEVER report generic "Codex is running".

Continue while status === "running". Stop on completed|failed|timeout|stalled.

Note: status === "completed" means Codex finished its turn — it does NOT mean the debate is over. After completed, check the Loop Decision table to determine whether to continue or exit.

8. Cross-Analysis

Parse review.blocks (each: id, title, severity, category, location, problem, evidence) and review.overall_assessment (code_quality, pr_description_accuracy, commit_hygiene, scope_appropriateness) from poll JSON. Verdict in review.verdict.status. Fallback: review.raw_markdown.

Compare Claude FINDING-{N} vs Codex ISSUE-{N}:

ClassificationMeaning
AgreementBoth independently found same issue
DisagreementOpposing assessment
Claude-onlyClaude found, Codex did not
Codex-onlyCodex found, Claude did not
Same Direction, Different SeverityBoth found, disagree on severity

Build response: 1) Agreements — merged findings. 2) Disagreements — Claude's position + evaluation of Codex's. 3) New findings — Claude-only + evaluation of Codex-only. 4) Set status: CONTINUE/CONSENSUS/STALEMATE. Claude orchestration is authoritative — Codex VERDICT is advisory.

9. Render Rebuttal + Resume

Template round2+:

PROMPT=$(node "$RUNNER" render --skill codex-pr-review --template round2+ --skills-dir "$SKILLS_DIR" <<RENDER_EOF
{"SESSION_CONTEXT":$(json_esc "$SESSION_CONTEXT"),"PR_TITLE":$(json_esc "$PR_TITLE"),"BASE_BRANCH":$(json_esc "$BASE"),"COMMIT_COUNT":$(json_esc "$COMMIT_COUNT"),"COMMIT_LIST":$(json_esc "$COMMIT_LIST"),"AGREED_POINTS":$(json_esc "$AGREED_POINTS"),"DISAGREED_POINTS":$(json_esc "$DISAGREED_POINTS"),"NEW_FINDINGS":$(json_esc "$NEW_FINDINGS"),"CONTINUE_OR_CONSENSUS_OR_STALEMATE":$(json_esc "$STATUS")}
RENDER_EOF
)

Resume: printf '%s' "$PROMPT" | node "$RUNNER" resume "$SESSION_DIR" --effort "$EFFORT" → validate JSON. Go back to step 7 (Poll).

Loop Decision (after each poll returns status === "completed")

status === "completed" means Codex's turn is done — NOT that the debate is over. Claude orchestration is authoritative for stop/continue. Check IN ORDER (first match wins):

#ConditionAction
1Claude determines Full or Partial Consensus (no severity ≥ medium disagreements)EXIT loop → go to Completion step
2poll_json.convergence.stalemate === trueEXIT loop → go to Completion step (stalemate branch)
3Current round >= 5EXIT loop → go to Completion step (hard cap)
4Disagreements remain with severity ≥ mediumCONTINUE → go back to Cross-Analysis step

CRITICAL: Do NOT exit the loop unless condition 1, 2, or 3 is met. Codex VERDICT is advisory — if Claude sees unresolved disagreements, MUST continue even if Codex says CONSENSUS.

10. Completion + Stalemate

Consensus definitions: Full (no disagreements), Partial (overall matches but ≤2 minor disagreements, severity ≤ low), No Consensus (severity ≥ medium disagreements remain → continue or stalemate).

Stop triggers: Full/Partial Consensus; stalemate (same pairs 2 consecutive rounds, no new evidence); hard cap (5 rounds → forced STALEMATE); user stops.

poll_json.convergence.stalemate === true → present deadlocked issues with both sides' arguments. Round < 5 → ask user; round 5 → force final synthesis. Still produce Merge Readiness Scorecard from agreed findings — disagreed findings do not block scorecard.

Authority: Claude orchestration is authoritative for stop/continue. Codex VERDICT is advisory.

11. Final Output

Present consensus report + merge readiness — NEVER edit code or create commits.

Review Summary:

MetricValue
Rounds{N}
VerdictCONSENSUS / STALEMATE
Claude Findings{count}
Codex Issues{count}
Agreed{count}
Disagreed{count}

Present: FINDING↔ISSUE Mapping table (Claude FINDING | Codex ISSUE | Classification | Status), Consensus Points, Remaining Disagreements (Point | Claude | Codex).

Overall Assessment:

AspectClaudeCodexConsensus
Code quality
PR description accuracy
Commit hygiene
Scope appropriateness

Merge Readiness Scorecard (derived from agreed findings only):

CriterionMust-pass?ClaudeCodexConsensusStatus
Code correctness (bug)✅ Yes
Edge case handling⚠️ If high+
Security✅ Yes
Performance❌ Unless critical
Maintainability❌ No
PR description❌ No
Commit hygiene❌ No
Scope appropriateness❌ No

Per criterion: pass = no agreed finding severity ≥ medium; concern = agreed finding severity = medium (non-blocking); fail = agreed finding severity ≥ high.

Merge Recommendation (priority top-to-bottom, first match):

#ConditionRecommendation
1Any agreed critical in must-pass (bug, security)REJECT
2≥3 agreed high in must-passREJECT
3Any agreed high in must-passREVISE ⚠️
4Any agreed high in edge-caseREVISE ⚠️
5≥3 agreed medium in must-passREVISE ⚠️
6All remainingMERGE

Must-pass: bug, security. Conditional: edge-case (severity ≥ high → must-pass). Disagreed findings do NOT block merge — if a disagreed finding could change recommendation, note: "⚠️ If {point} confirmed, recommendation → {REVISE/REJECT}."

12. Finalize + Cleanup

node "$RUNNER" finalize "$SESSION_DIR" <<'FINALIZE_EOF'
{"verdict":"...","scope":"branch"}
FINALIZE_EOF

Optionally include "issues":{"total_found":N,"agreed":N,"disagreed":N}. Report $SESSION_DIR path.

node "$RUNNER" stop "$SESSION_DIR"

Always run cleanup, even on failure/timeout.

Errors:

  • failed → retry once (re-poll after 15s).
  • timeout → report partial results from review.raw_markdown, suggest lower effort. Run cleanup.
  • stalled → if recoverable === true: stop → prepend recovery note → resume --recovery → poll (30s, 15s+). If recoverable === false: report partial results, suggest lower effort. Run cleanup.
  • Start/resume CODEX_NOT_FOUND → tell user to install codex.
  • Cleanup sequencing: run finalize + stop ONLY after recovery resolves (success or second failure). Do NOT finalize before recovery attempt.

Rules

  • Safety: NEVER run git commit, git add, git rebase, or any command that modifies code or history. This skill is debate-only.
  • Both Claude and Codex are equal peers — no reviewer/implementer framing.
  • Information barrier: Claude MUST complete independent analysis (Step 6) before reading Codex output. This prevents anchoring bias.
  • NEVER edit code or create commits — only debate quality and assess merge readiness. The final output is a consensus report + merge readiness scorecard, not a fix.
  • Codex reviews only; it does not edit files.
  • If stalemate persists (same unresolved points for 2 consecutive rounds), present both sides, produce Merge Readiness Scorecard from agreed findings, and defer to user.
  • Runner manages all session state — do NOT manually read/write rounds.json, meta.json, or prompt.txt in the session directory.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

37.31%
按下载量换算27

Claude

28.68%
按下载量换算21

Cursor

17.76%
按下载量换算13

Gemini CLI

10.14%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

通过

权限和风险

只读

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

安装前确认

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

来源信息

继续浏览同类 Skills