26.2.21openclaw-viking/.agents/archive/review-pr-v1/SKILL.md
Review-only GitHub pull request analysis with the gh CLI. Use when asked to review a PR, provide structured feedback, or assess readiness to land. Do not merge, push, or make code changes you intend to keep.
npx skillsauth add adoresever/agi_ananans 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.
Perform a thorough review-only PR assessment and return a structured recommendation on readiness for /prepare-pr.
main or origin/main, not during review, not ever.git push at all during review. Treat review as read only..local/review.md inside the worktree..local/pr-meta.env inside the worktree.Create a checklist of all review steps, print it, then continue and execute the commands.
Use an isolated worktree for all review work.
repo_root=$(git rev-parse --show-toplevel)
cd "$repo_root"
gh auth status
WORKTREE_DIR=".worktrees/pr-<PR>"
git fetch origin main
# Reuse existing worktree if it exists, otherwise create new
if [ -d "$WORKTREE_DIR" ]; then
git worktree list
cd "$WORKTREE_DIR"
git fetch origin main
git checkout -B temp/pr-<PR> origin/main
else
git worktree add "$WORKTREE_DIR" -b temp/pr-<PR> origin/main
cd "$WORKTREE_DIR"
fi
# Create local scratch space that persists across /review-pr to /prepare-pr to /merge-pr
mkdir -p .local
Run all commands inside the worktree directory.
Start on origin/main so you can check for existing implementations before looking at PR code.
pr_meta_json=$(gh pr view <PR> --json number,title,state,isDraft,author,baseRefName,headRefName,headRefOid,headRepository,url,body,labels,assignees,reviewRequests,files,additions,deletions,statusCheckRollup)
printf '%s\n' "$pr_meta_json" | jq '{number,title,url,state,isDraft,author:.author.login,base:.baseRefName,head:.headRefName,headSha:.headRefOid,headRepo:.headRepository.nameWithOwner,additions,deletions,files:(.files|length),body}'
cat > .local/pr-meta.env <<EOF
PR_NUMBER=$(printf '%s\n' "$pr_meta_json" | jq -r .number)
PR_URL=$(printf '%s\n' "$pr_meta_json" | jq -r .url)
PR_AUTHOR=$(printf '%s\n' "$pr_meta_json" | jq -r .author.login)
PR_BASE=$(printf '%s\n' "$pr_meta_json" | jq -r .baseRefName)
PR_HEAD=$(printf '%s\n' "$pr_meta_json" | jq -r .headRefName)
PR_HEAD_SHA=$(printf '%s\n' "$pr_meta_json" | jq -r .headRefOid)
PR_HEAD_REPO=$(printf '%s\n' "$pr_meta_json" | jq -r .headRepository.nameWithOwner)
EOF
ls -la .local/pr-meta.env
# Use keywords from the PR title and changed files
rg -n "<keyword_from_pr_title>" -S src packages apps ui || true
rg -n "<function_or_component_name>" -S src packages apps ui || true
git log --oneline --all --grep="<keyword_from_pr_title>" | head -20
If it already exists, call it out as a BLOCKER or at least IMPORTANT.
Assign yourself so others know someone is reviewing. Skip if the PR looks like spam or is a draft you plan to recommend closing.
gh_user=$(gh api user --jq .login)
gh pr edit <PR> --add-assignee "$gh_user" || echo "Could not assign reviewer, continuing"
Use the body from step 1. Summarize goal, scope, and missing context.
Minimum:
gh pr diff <PR>
If you need full code context locally, fetch the PR head to a local ref and diff it. Do not create a merge commit.
git fetch origin pull/<PR>/head:pr-<PR> --force
mb=$(git merge-base origin/main pr-<PR>)
# Show only this PR patch relative to merge-base, not total branch drift
git diff --stat "$mb"..pr-<PR>
git diff "$mb"..pr-<PR>
If you want to browse the PR version of files directly, temporarily check out pr-<PR> in the worktree. Do not commit or push. Return to temp/pr-<PR> and reset to origin/main afterward.
# Use only if needed
# git checkout pr-<PR>
# git branch --show-current
# ...inspect files...
git checkout temp/pr-<PR>
git checkout -B temp/pr-<PR> origin/main
git branch --show-current
Be honest. Call out low value AI slop.
Review correctness, design, performance, and ergonomics.
Assume OpenClaw subagents run with full disk access, including git, gh, and shell. Check auth, input validation, secrets, dependencies, tool safety, and privacy.
Identify what exists, what is missing, and what would be a minimal regression test.
If you run local tests in the worktree, bootstrap dependencies first:
if [ ! -x node_modules/.bin/vitest ]; then
pnpm install --frozen-lockfile
fi
Check if the PR touches code with related documentation such as README, docs, inline API docs, or config examples.
Check if CHANGELOG.md exists and whether the PR warrants an entry.
Decide if /prepare-pr can fix issues or the contributor must update the PR.
Write the full structured review sections A through J to .local/review.md.
Create or overwrite the file and verify it exists and is non-empty.
ls -la .local/review.md
wc -l .local/review.md
Produce a review that matches what you saved to .local/review.md.
A) TL;DR recommendation
B) What changed
C) What is good
D) Security findings
E) Concerns or questions (actionable)
F) Tests
G) Docs status
H) Changelog
CHANGELOG.md needs an entry and which category.I) Follow ups (optional)
J) Suggested PR comment (optional)
testing
Simulate a strict academic reviewer and produce a manuscript risk report without editing the draft. Use when the user asks to act as a reviewer, find weaknesses before submission, inspect evidence gaps, check overclaims, evaluate manuscript readiness, combine advisor notes or meeting minutes into revision priorities, or generate a 审稿人模拟检查 report.
development
Build or reorganize an academic paper project workspace with clear folders and local instructions for literature, drafts, feedback, extracted text, and output reports. Use when the user wants to set up a论文工作台, organize mixed manuscript materials, create project rules, or prepare a stable workflow before citation checking, evidence matching, reviewer simulation, or manuscript revision.
testing
Match manuscript claims against user-provided literature and produce a traceable claim-evidence table. Use when the user asks to add references, check whether PDFs support manuscript statements, find supporting or opposing evidence from a literature folder, distinguish strong support from background support, or create a 论点-证据匹配 report for an academic draft.
development
Twitter/X data via the 6551 API. Supports user profiles, tweet search, user tweets, follower events, deleted tweets, and KOL followers.