plugins/clade/skills/review-pr/SKILL.md
AI checks out a PR into a worktree, runs the project's CI commands, and posts a structured review with execution evidence — parallel to OpenClaw's /review-pr
npx skillsauth add shenxingy/claude-code-kit review-prInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This workflow runs directly in Codex. Do not launch the claude CLI or
delegate the workflow to Clade's MCP bridge.
Codex compatibility rules:
AGENTS.md files for repository instructions. If a project
has only CLAUDE.md, treat it as legacy project guidance and read it too..clade/ (or ~/.clade/ for personal
state). Existing legacy Claude state may be read for migration, but do not
create new vendor-specific state./skill-name reference means the corresponding Codex $skill-name skill,
or the same workflow invoked naturally when explicit skill invocation is not
available.<plugin-root>/... are relative to the installed Clade plugin
containing this SKILL.md; resolve that root before invoking a helper.You are the Review PR skill. You check out a PR, run the project's own CI commands against it, and post a structured review — with execution evidence — as a GitHub PR comment.
Evidence before verdict: a review that never ran the code is an opinion. You execute the change first, then judge it.
Parse the argument (if any):
gh pr view --json number,url,title,body to get the PR42) → PR #42 in current repoIf no PR is found for the current branch, say so and exit.
gh pr diff {PR_NUMBER_OR_URL}
Also fetch PR metadata:
gh pr view {PR_NUMBER_OR_URL} --json title,body,additions,deletions,changedFiles,commits
Never disturb the current checkout — review in an isolated worktree:
WT="/tmp/review-pr-{PR_NUMBER}-$$"
git worktree add --detach "$WT"
cd "$WT" && gh pr checkout {PR_NUMBER}
gh pr checkout handles fork PRs and detached worktrees. If checkout fails (e.g. no permission to fetch the fork), note it — you'll still review the diff, but Evidence must say the change was never executed.
Discover what CI runs, the same way /commit Step 3.6 does:
.github/workflows/ in the worktree — if workflow files exist, extract every run: command from jobs that run on push/PR to main. These are the exact commands to run.AGENTS.md for the project's verify_cmd, test command, and build command.py_compile + pytest; TS/JS → tsc --noEmit + npm test; shell → bash -n; Go → go build ./... + go test ./...; Rust → cargo check + cargo test).Run them inside the worktree, adapted for the local machine (local interpreter/virtualenv paths, skip CI-only setup steps like actions/checkout — same adaptation rules as /commit Step 3.6). Wrap with timeout: syntax checks timeout 30, compile timeout 60, test suites timeout 120. Capture each command and its result verbatim:
[1/3] timeout 30 bash -n scripts/*.sh → OK
[2/3] timeout 60 python -m py_compile ... → OK
[3/3] timeout 120 .venv/bin/pytest tests/ -q → 237 passed in 3.1s
If a command fails or hangs, keep the failing output (tail ~20 lines) — that IS the evidence.
Read the full diff carefully. Write a structured review covering:
Summary — What does this PR do? (2-3 sentences max)
Changes — Key files touched and what changed in each (bullet list, be specific)
Evidence — The CI commands you ran in Step 4 and their actual results. If checkout or CI discovery failed, state exactly what could not be executed and why — never leave this section out.
Risks — Anything that could break, regress, or have unintended side effects. Be honest. If none, say "None identified."
Suggestions — Specific improvements (optional: only include if there are real ones). Format: file:line — suggestion
Verdict — One of:
The verdict must be grounded in the Evidence:
Format the review as markdown:
## AI Review
**Summary:** {summary}
**Changes:**
{bullet list}
**Evidence:**
{ci commands + results, or "Could not execute: {reason} — static review only"}
**Risks:** {risks or "None identified."}
**Suggestions:**
{suggestions or "None."}
---
**Verdict:** {verdict}
*Posted by `/review-pr` skill*
Post it:
gh pr comment {PR_NUMBER_OR_URL} --body "{review_markdown}"
Remove the worktree (always — even when review failed midway):
cd {original_repo_dir}
git worktree remove --force "$WT"
git branch -D {pr_branch} 2>/dev/null # branch created by gh pr checkout, if any
Print the PR URL and the verdict. Done.
.clade/blockers.md3-strike rule: If the same approach fails 3 times, switch to BLOCKED — do not retry indefinitely.
Checks out the PR into a worktree, discovers and runs the project's CI commands, writes a structured review (summary, evidence, risks, suggestions), and posts it as a PR comment via gh. The verdict is grounded in the Evidence section — tests that fail force ❌, and a review that couldn't execute the change never posts ✅.
/review-pr # Review the PR for the current branch
/review-pr 42 # Review PR #42
/review-pr https://github.com/owner/repo/pull/42
development
Orchestrate a fleet of parallel `codex exec` workers with you (Claude Code) as the supervisor — spawn one per isolated git worktree, dispatch headless, verify each INDEPENDENTLY, PR/merge. The manual "codex-ultracode" pattern for fanning out real implementation, research, or review work onto Codex. Bakes in the hard gotchas (stdin blocking, background tracking, don't-trust-self-reports, writer isolation). Triggers on — orchestrate codex, codex workers, codex fleet, spawn codex, delegate to codex in parallel, manual ultracode, 开 codex 小弟, 派 codex worker — NOT for a single cross-vendor opinion (use the `second-opinion-codex` agent), NOT for web-UI worker decomposition (use `/orchestrate`).
development
Create and manage git worktrees for parallel Codex sessions
development
Verify project behavior anchors — compilation, tests, and interaction checks after autonomous runs. NOT the Codex built-in /verify (which runs the app to observe a single change working) — this one walks the AGENTS.md "Features (Behavior Anchors)" list.
documentation
End-of-session documentation sync — updates TODO.md and PROGRESS.md only (run /commit after to commit everything)