ワンクリックで
pr-review
List PRs awaiting your review, checkout the branch, run linter, and generate a structured code review document.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
List PRs awaiting your review, checkout the branch, run linter, and generate a structured code review document.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Use when the user wants to name or rename something — a product, feature, brand, project, command, or company — or asks to "brainstorm names", "find a better name", "naming ideas", or invokes /brainstorming-names.
Use when a task has a large solution space and a measurable quality signal and the goal is to generate many candidates and select the best — naming/branding, UX/UI variants, marketing copy, code optimization, prompt tuning. Triggers: "brainstorm and pick the best", "explore and exploit", "simulated annealing", "tournament of options", "generate N options and rank them", iterate-until-score loops, or /explore-exploit.
Use when the user asks to rate, score, judge, critique with a number, or "how good is" an artifact — a live website/UI, a markdown draft (blog post, README, plan, docs), or code/a diff — or invokes /score, or sets up an iterate-until-score-N feedback loop (e.g. with /goal "repeat until 9/10").
Start work on a Linear issue end-to-end — create a worktree, fetch issue context from Linear, implement the fix, then commit, push, and open a draft PR. Use when the user says "start issue", "work on STU-1234", "create a worktree and fix <Linear link>", "start a worktree for this ticket", or gives a Linear URL/issue id and wants the whole branch→PR flow.
Use when the user wants to undo, absorb, collapse, or reverse a git worktree — "undo worktree", "absorb worktree", "move worktree branch back to main repo", "remove worktree and checkout in main", "get rid of this worktree", or finish work in a ~/worktrees.nosync worktree and continue it in the main studio checkout.
This skill should be used when the user asks to "clean up my Mac", "free disk space", "my disk is full", "what's taking up space", "reclaim storage", "offload files", or wants to dedupe/archive backups and media to remote storage. Provides a scan → categorize → offload/clean → reclaim workflow with tested scripts and macOS-specific gotchas.
| name | pr-review |
| description | List PRs awaiting your review, checkout the branch, run linter, and generate a structured code review document. |
| user-invocable | true |
| allowed-tools | ["Bash","Read","Write","Glob","Grep","AskUserQuestion"] |
You are helping the user review pull requests assigned to them. This skill lists PRs awaiting review, prioritizes unreviewed ones, and generates structured review documents.
~/.claude-worktrees/pr-review-{repo}-{PR} (e.g., pr-review-calypso-245)~/.claude-intents/reviews/Worktrees allow reviewing PRs without affecting your current working directory or branch. Multiple reviews can run in parallel.
Get the current GitHub user and repo:
gh api user --jq '.login'
gh repo view --json nameWithOwner --jq '.nameWithOwner'
Fetch PRs where user is requested as reviewer:
gh pr list --search "review-requested:@me" --json number,title,author,createdAt,headRefName,reviews --limit 50
Process and display the PR list:
Display the list using AskUserQuestion tool with format:
PR #123: "Fix login bug" by @author [Needs Review]
PR #456: "Add dark mode" by @author [Reviewed]
Let user select a PR to review (or exit)
Once user selects a PR, fetch full PR details:
gh pr view <number> --json number,title,body,author,headRefName,baseRefName,files,additions,deletions,commits
Create a git worktree for the PR:
# Get repo name
REPO=$(basename $(gh repo view --json name --jq '.name'))
PR_NUM=<number>
WORKTREE_NAME="pr-review-${REPO}-${PR_NUM}"
WORKTREE_PATH="$HOME/.claude-worktrees/${WORKTREE_NAME}"
# Create worktrees directory if needed
mkdir -p ~/.claude-worktrees
# Fetch the PR branch
gh pr checkout <number> --detach
BRANCH=$(git rev-parse --abbrev-ref HEAD)
git checkout - # Go back to original branch
# Check if worktree already exists
if git worktree list | grep -q "${WORKTREE_PATH}"; then
# Ask user: reuse existing or recreate?
# If recreate: git worktree remove "${WORKTREE_PATH}" --force
fi
# Create the worktree
git worktree add "${WORKTREE_PATH}" <headRefName>
WORKTREE_PATH for use in subsequent stepsDetect and run the project linter (in the worktree):
${WORKTREE_PATH} using cd "${WORKTREE_PATH}" && <command>package.json → look for lint script → run cd "${WORKTREE_PATH}" && npm run lint.eslintrc* → run cd "${WORKTREE_PATH}" && npx eslint .pyproject.toml with ruff/flake8 → run cd "${WORKTREE_PATH}" && ruff check .setup.cfg or .flake8 → run cd "${WORKTREE_PATH}" && flake8.rubocop.yml → run cd "${WORKTREE_PATH}" && rubocopMakefile with lint target → run cd "${WORKTREE_PATH}" && make lintCapture linter output for inclusion in review
Read the changed files (from the worktree):
${WORKTREE_PATH}/<file> to understand the changesgh pr diff <number> to see the actual diff (can run from any directory)Analyze the code focusing on:
Generate the review file:
mkdir -p ~/.claude-intents/reviews/in-progressYYYY-MM-DD-{repo}-{PR-ID}-{branch-name}--{description}.md
{repo}: Repository name (e.g., my-project){PR-ID}: PR number (e.g., 123){branch-name}: Head branch name, sanitized (replace / with -){description}: PR title, lowercase, spaces to hyphens, max 50 chars, alphanumeric only2026-01-20-calypso-12345-fix-login-bug--fix-authentication-crash.md~/.claude-intents/reviews/in-progress/{filename}After generating the review, ask the user:
in-progress/ to done/ (create done/ if needed)in-progress/ for later completionClean up the git worktree:
git worktree remove "${WORKTREE_PATH}" --force
# PR Review: #<number> - <title>
**Author:** @<author>
**Branch:** <head> → <base>
**Reviewed by:** @<reviewer>
**Date:** <YYYY-MM-DD>
## Summary
<Brief 2-3 sentence summary of what this PR does>
## Linter Results
<Linter output or "No linter configured" or "All checks passed">
## Files Changed
| File | Changes | Status |
|------|---------|--------|
| path/to/file.js | +10 -5 | Reviewed |
## Review Findings
### ✅ What's Good
- <Positive observation 1>
- <Positive observation 2>
### ⚠️ Suggestions
#### <File or Area 1>
**Location:** `path/to/file.js:42`
**Issue:** <Description of the concern>
**Suggestion:**
```<language>
// Suggested improvement
Why: <Explanation of why this matters for readability/maintainability>
...
Recommendation: <Approve | Request Changes | Comment>
```~/.claude-worktrees/pr-review-{repo}-{PR} (e.g., pr-review-calypso-245)git worktree remove "${WORKTREE_PATH}" --force 2>/dev/null || rm -rf "${WORKTREE_PATH}"
git worktree list~/.claude-intents/reviews/~/.claude-intents/reviews/in-progress/~/.claude-intents/reviews/done/Reviews are saved to ~/.claude-intents/reviews/in-progress/ with this format:
YYYY-MM-DD-{repo}-{PR-ID}-{branch-name}--{description}.md
Folder Structure:
~/.claude-intents/reviews/
├── in-progress/ # Reviews currently being worked on
└── done/ # Completed reviews
Components:
YYYY-MM-DD: Today's date{repo}: Repository name (from nameWithOwner, take part after /){PR-ID}: PR number{branch-name}: Head branch, with / replaced by -{description}: PR title sanitized (lowercase, spaces→hyphens, alphanumeric, max 50 chars)Examples:
2026-01-20-calypso-245-fix-memory-leak--fix-memory-leak-in-cache.md
2026-01-20-jetpack-1234-feature-dark-mode--add-dark-mode-toggle.md
2026-01-20-woocommerce-567-bugfix-checkout--prevent-crash-on-null-user.md
User: /pr-review
Assistant: [Fetches PRs, shows list]
PRs awaiting your review:
1. PR #234: "Add user authentication" by @alice [Needs Review] - 3 days ago
2. PR #245: "Fix memory leak in cache" by @bob [Needs Review] - 1 day ago
3. PR #230: "Update dependencies" by @carol [Reviewed] - 5 days ago
Which PR would you like to review?
User: [Selects PR #245]
Assistant: [Creates worktree at ~/.claude-worktrees/pr-review-my-repo-245]
Creating worktree for PR #245...
✅ Worktree created at: ~/.claude-worktrees/pr-review-my-repo-245
[Runs linter in worktree, reads files, generates review]
✅ Review complete! Saved to:
~/.claude-intents/reviews/in-progress/2026-01-20-my-repo-245-fix-memory-leak--fix-memory-leak-in-cache.md
Would you like to mark this review as done?
User: Yes
Assistant: [Moves file to done folder, cleans up worktree]
✅ Review moved to:
~/.claude-intents/reviews/done/2026-01-20-my-repo-245-fix-memory-leak--fix-memory-leak-in-cache.md
✅ Worktree cleaned up
User: [Selects PR #245]
Assistant: [Detects existing worktree]
⚠️ A worktree already exists for this PR at:
~/.claude-worktrees/pr-review-my-repo-245
Would you like to:
1. Reuse existing worktree
2. Delete and recreate worktree
User: [Selects option 2]
Assistant: [Removes old worktree, creates fresh one]
✅ Worktree recreated at: ~/.claude-worktrees/pr-review-my-repo-245