con un clic
pull-request-review
Review a pull request by branch name or URL, using a git worktree
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Review a pull request by branch name or URL, using a git worktree
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Implement a feature or fix based on a Linear issue
Create well-structured Linear issues, projects, project updates, or initiatives
Validate a filed bug against the source before fixing it — verify every claim, hunt the broader class, find the contract question, and scope the outcome
Disciplined per-commit workflow with Greybeard review, build gates, and Critique loops
Engineering philosophy and work culture principles. Load this skill when making architectural decisions or to understand the team's work principles.
General coding conventions for clean, maintainable code. Always load this skill when writing or reviewing code in any language.
| name | pull-request-review |
| description | Review a pull request by branch name or URL, using a git worktree |
Use this skill to review a pull request given a branch name or URL.
This skill accepts either:
feature/add-auth)https://github.com/owner/repo/pull/123)If given a URL, extract the pull request information:
# GitHub PR URL format: https://github.com/owner/repo/pull/123
# GitLab MR URL format: https://gitlab.com/owner/repo/-/merge_requests/123
# For GitHub, use gh CLI to get branch name
gh pr view <url-or-number> --json headRefName --jq '.headRefName'
# For GitLab, use glab CLI or parse the MR page
glab mr view <number> --output json | jq -r '.source_branch'
Find the root of the current git repository:
git rev-parse --show-toplevel
Fetch the branch from the remote and verify it exists:
# Fetch the specific branch
git fetch origin <branch-name>
# Verify the branch exists
if ! git rev-parse --verify "origin/<branch-name>" >/dev/null 2>&1; then
echo "Error: Branch '<branch-name>' does not exist on the remote."
exit 1
fi
If the branch does not exist, inform the user of the error and stop. Do not proceed with worktree creation or review.
Create a worktree in a sibling directory under worktree/:
# From repository root
REPO_ROOT=$(git rev-parse --show-toplevel)
WORKTREE_PATH="${REPO_ROOT}/../worktree/<branch-name>"
# Create the worktree directory if needed
mkdir -p "${REPO_ROOT}/../worktree"
# Add the worktree
git worktree add "$WORKTREE_PATH" "origin/<branch-name>"
The worktree path follows the pattern ../worktree/<branch-name> relative to the repository root.
Change the working directory to the new worktree and ensure the branch is checked out:
cd "$WORKTREE_PATH"
# Checkout the branch
git checkout <branch-name>
# Verify you are on the correct branch
git branch --show-current
Confirm the output matches the expected branch name before proceeding.
Before reviewing, the repository must be properly set up. Look for developer documentation that describes how to install dependencies and prepare the codebase:
Search for setup instructions in these common locations:
README.mdCONTRIBUTING.mddocs/ directoryDEVELOPMENT.mdSETUP.mdFollow the documented setup steps exactly. Common setup tasks include:
npm install, yarn, pip install, bundle install, etc.)Do not assume the setup process. Every repository has its own conventions and requirements.
If no setup documentation exists, ask the user how to set up the repository before proceeding.
Identify the base branch for comparison:
# For GitHub PRs
gh pr view --json baseRefName --jq '.baseRefName'
# For GitLab MRs
glab mr view --output json | jq -r '.target_branch'
# If working from branch name only, assume main or master
git branch -r | grep -E 'origin/(main|master)$' | head -1 | sed 's/.*origin\///'
Load and follow the code-review skill to perform the actual review. The code-review skill provides guidance on:
After the review is complete, the worktree can be removed:
git worktree remove "$WORKTREE_PATH"
Inform the user that the worktree remains available for further investigation and can be removed manually when no longer needed.
If any command fails during the workflow, do not retry or attempt workarounds. Stop immediately and ask the user for guidance. Common failure scenarios include:
Present the error output to the user and ask how they would like to proceed.