From claudey
Use when the user wants to review and optionally approve a pull request. Triggers: "review and approve PR", "approve PR #123", PR number/URL with approval intent, "LGTM this PR", "check and approve".
How this skill is triggered — by the user, by Claude, or both
Slash command
/claudey:pr-review-approveThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Automated PR review via code-reviewer agent with conditional `gh pr review --approve`.
Automated PR review via code-reviewer agent with conditional gh pr review --approve.
Extract PR number from user input. Accepted formats:
123 or #123 (PR number)https://github.com/owner/repo/pull/123 (full URL)owner/repo#123 (shorthand)If no argument provided, detect from current branch: gh pr view --json number -q .number
ORIGINAL_BRANCH=$(git rev-parse --abbrev-ref HEAD)
Store for restoration in Step 10.
gh auth status
If not authenticated, show:
Not authenticated. Run
gh auth loginto authenticate, then retry.
Stop here if auth fails.
gh pr view <NUMBER> --json number,title,author,baseRefName,headRefName,url,state
If PR not found or closed, show error and stop. Display PR title, author, and branch info to user.
gh pr checkout <NUMBER>
If checkout fails, show the git error and stop. Do NOT force-checkout.
Dispatch claudey:code-reviewer agent with prompt:
Review the changes in this PR. Run
git diff <baseRefName>...HEADto see all changes. Apply the full review checklist. End with the Review Summary table showing CRITICAL, HIGH, MEDIUM, LOW counts and verdicts.
From the code-reviewer output, extract severity counts:
| Severity | Count |
|---|---|
| CRITICAL | N |
| HIGH | N |
| MEDIUM | N |
| LOW | N |
Eligible for approval (all must be true):
LOW issues are informational and do not block approval.
Not eligible: Any MEDIUM, HIGH, or CRITICAL issue found.
If eligible, display:
PR #<N>: <title>
Review: PASS (0 blocking issues, N LOW informational)
Then use AskUserQuestion with options:
If not eligible, display:
PR #<N>: <title>
Review: BLOCKED (N CRITICAL, N HIGH, N MEDIUM issues)
List the blocking issues. Do NOT offer approval. Suggest the author fix the issues.
If user chose Approve:
Write a concise summary of what the PR does based on the diff reviewed in Step 6. The summary should explain the purpose and key changes (not the review outcome).
gh pr review <NUMBER> --approve --body "Reviewer Summary: <concise summary of what the PR does and its key changes>"
If user chose Approve with message, prepend "Reviewer Summary: " to their custom message and use that as the body.
Then restore original branch:
git checkout $ORIGINAL_BRANCH
| Scenario | Behavior |
|---|---|
gh not authenticated | Show gh auth login instructions, stop |
| PR not found | Show error, suggest gh pr list, stop |
| PR already closed/merged | Show state, stop |
| Checkout fails | Show git error, stop |
| Approval fails | Show possible causes: no write access, self-approval blocked by repo rules, branch protection |
gh api user -q .login.$ORIGINAL_BRANCH even on error.gh pr checkout fetches the latest.npx claudepluginhub oguzsh/claudey --plugin claudeyCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.