Run the CI Codex PR review locally against this branch's unpushed work (committed + uncommitted) before pushing. Same policy and reasoning effort as the codex-p
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-local-review-codex-5e542cf65a2e ,按照其中的说明把「local-review-codex」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Runs the exact same review Codex performs in CI (.github/workflows/codex-pr-review.yml),
but locally and scoped to work you have not pushed yet — so you catch what CI would flag
before the PR exists. Use this before git push on a non-trivial change.
Correspondence with CI — identical:
REVIEW.md (severity triage, public-surface checklist, AGENTS.md compliance, test coverage).model_reasoning_effort="xhigh".## Codex Review, findings tagged P0 / P1 / P2 with file:line.Differences from CI — local-only:
gpt-6-astra; CI stays on gpt-5.6-sol. Not an oversight to reconcile: gpt-6-astra is confirmed on the ChatGPT auth codex login uses locally, while CI authenticates with OPENAI_API_KEY (codex-pr-review.yml prefers it over CODEX_AUTH_JSON) and that tier is unverified for the model. Move CI once API access is confirmed, or once CI switches to CODEX_AUTH_JSON.main at the merge-base, including uncommitted changes (CI reviews a pushed PR diff).read-only (CI uses danger-full-access on an ephemeral runner). Codex reads the diff and files but cannot modify your working tree.codex exec is a separate cold process, so it does not anchor on the current chat session — the same reason local-review insists on a subagent.codex CLI >= 0.153.4 installed and authed via codex login (an OPENAI_API_KEY in the environment takes priority and may not reach gpt-6-astra — see the model note above). Older CLIs reject the model with "requires a newer version of Codex"; run.sh checks the version up front. Upgrade with npm install --global @openai/codex@0.153.4 (may need sudo for a global install). This matches the pin in .github/workflows/codex-pr-review.yml — the CLI version is the same on both sides, only the model differs.git fetch the base ref if it's stale, so the merge-base is accurate.bash .agents/skills/local-review-codex/run.sh # review vs main (default)
bash .agents/skills/local-review-codex/run.sh <base> # review vs a different base ref
Invoke with bash (or run the executable directly) — the script needs Bash for
set -o pipefail; sh is Dash on Debian/Ubuntu and would fail. If main isn't a
local branch (e.g. a fresh single-branch checkout), the runner falls back to
origin/main automatically.
The script computes BASE_SHA = git merge-base HEAD <base>, feeds Codex REVIEW.md plus a
diff context pointing at git diff <BASE_SHA> (which folds in uncommitted edits), and prints
the review. It writes only temp files — nothing lands in the working tree.
Print the Codex output verbatim. Do not re-summarize or filter it — the value of a cold Codex pass is surfacing what the current session would rationalize away. Then decide with the user whether to address findings before pushing.
For a Claude-native review instead, use local-review (branch-diff-reviewer subagent). This
skill is the Codex counterpart; run both for independent perspectives.