← Back to list
name: github-pr-review-setup
description: Prepare a clean local checkout for a GitHub PR (worktree-first via

github-pr-review-setup
by prateek
My dotfiles
⭐ 0🍴 3📅 Jan 21, 2026
SKILL.md
name: github-pr-review-setup
description: Prepare a clean local checkout for a GitHub PR (worktree-first via wf/wt), fetch the PR base ref, and emit PR context (CI checks + PR comments/reviews) as JSON for downstream review.
GitHub PR Review Setup
Inputs
pr: PR number or URL (preferred)repo(optional):OWNER/REPO(used whenpris a number and repo can’t be inferred)repo-dir(optional): local clone path (required for non-openai/openaiPRs if you aren’t already in that repo)checkout-mode(optional):worktree(default) orinplaceworktree-name(optional): override worktree/branch name (default:pr-review-<number>)out(optional): path to also write the JSON payload
Quick start
- Prepare a PR review workspace + print JSON:
python "<path-to-skill>/scripts/prepare_github_pr_review.py" --pr "<number-or-url>"- Add
--repo "<owner/repo>"when--pris just a number and repo inference isn’t possible. - Add
--repo-dir "<path-to-local-clone>"for non-openai/openaiPRs when needed.
Output (JSON)
The script prints one JSON object to stdout containing at least:
worktree_dir: local checkout path (worktree or in-place)compare_to: base ref suitable forcodex review --baseand PALcompare_to(e.g.upstream/main)checks:gh pr checksJSONissue_comments,reviews,review_comments: all PR discussion content pulled viagh api --paginate
Workflow
1) Create / reuse a clean checkout (default: worktree)
- Uses
wfforopenai/openaiandwtfor all other repos. - For
--checkout-mode inplace, checks out the PR branch directly in the target clone (requires a clean repo).
2) Fetch the PR base ref (shared prerequisite)
- Chooses remote: prefer
upstreamif present, elseorigin. - Fetches
<base_ref>socompare_toexists locally.
3) Pull CI + discussion context (JSON only)
- CI checks:
gh pr checks - PR conversation: issue comments
- Reviews + inline review comments
4) Run the actual review
Use the code-review skill with:
path = worktree_dircompare_to = compare_to
Score
Total Score
50/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon