pulumi/pr-review
Review and approve/merge pull requests as a maintainer (full workflow with approve, request changes, merge, close actions)
npx skills add https://github.com/pulumi/docs --skill pr-review
Use this when: You're reviewing someone's pull request as a maintainer and need to approve, request changes, merge, or close it.
Performs comprehensive review with code quality and metadata checks, then provides an interactive workflow for approval actions. Automatically detects contributor type (internal/external/bot) and adapts communication tone (warm/welcoming for external, professional for internal, technical/professional for bots).
/pr-review <PR_NUMBER>
Reviews any pull request and presents action choices for approval, changes, or closure.
Required: PR number
Works with: All PRs (internal, external, and bots)
Special handling: Automatically detects contributor type and adapts messaging (warm for external, professional for internal, technical for bots). Default "Approve and merge" for pulumi-bot metadata PRs.
CRITICAL SUCCESS CRITERIA: Complete all 10 steps in sequence. Every step is mandatory and serves a critical purpose in the review workflow. DO NOT SKIP ANY STEP OR END THE WORKFLOW PREMATURELY!
Step Counter: Display progress before each step as: [Step X/10] followed by the step heading. This helps users track progress through the workflow.
References: Always follow the detailed instructions in the referenced documents for each step. The references contain the complete implementation details required.
bash .claude/commands/pr-review/scripts/contributor-detection.sh {{arg}}
The script outputs:
AUTHOR - GitHub usernameCONTRIBUTOR_TYPE - bot/internal/externalPR_METADATA - JSON with number, title, urlFILES_CHANGED - List of changed file pathsPR_DATA_JSON - Complete PR data for cachingAfter running the script, store the following for later steps:
## Contributor Detection
[icon] Reviewing PR #{{arg}} from @username ([type] contributor)
Icons:
Continue to Step 2.
gh pr view {{arg}}gh pr diff {{arg}}Continue to Step 3.
CRITICAL: This step must be completed and presented to the user IMMEDIATELY after Step 2 and BEFORE starting Step 4. Do not delay this output.
bash .claude/commands/pr-review/scripts/test-deployment-guidance.sh {{arg}}
The script outputs JSON with:
prNumber - The pull request numberdeploymentUrl - The preview deployment URL or nulldeploymentStatus - "ready" or "pending"isAutomationPR - Whether the PR was opened by an automation botfileCategories - Categorized changed filesThis allows users to review the deployment while you perform the comprehensive analysis in Step 5.
Only after displaying output from this step, continue to Step 4.
Check if PR contains infrastructure or CI/CD changes:
infrastructure/.github/workflows/Makefile or scripts/ci/origin-bucket-metadata.jsonIf infrastructure changes detected, flag for careful review and note potential production impact.
Only after displaying output from this step, continue to Step 5.
Review all files against registry review criteria: Go code quality, YAML validity, CI workflow correctness, build system compatibility, infrastructure safety, BUILD-AND-DEPLOY.md currency, community package list integrity, and general spelling/grammar/links. See _common:review-criteria for full criteria.
Large diffs (>100 lines): Summarize findings by category rather than line-by-line.
Continue to Step 6.
Present review results in terminal-friendly format:
## Review Summary
**Overall Assessment**: [Clean/Minor issues/Issues found/Critical issues]
### Findings
**[Category]**: [Brief summary]
- Line X: [Issue description]
- Line Y: [Issue description]
### Recommendations
[Specific recommendations based on findings]
Continue to Step 7.
Use AskUserQuestion (max 4 options) to present the appropriate action menu based on contributor type (bot vs non-bot) and review findings.
See pr-review:references:action-menus for complete menu structures and logic.
Continue to Step 8 with selected action.
CRITICAL: Always show what will happen before executing.
See pr-review:references:action-preview-templates for preview formats.
Display preview showing:
pr-review:references:message-templates)Confirmation options (use AskUserQuestion):
Handle each response appropriately:
Continue to Step 9 with confirmed action.
Execute using confirmed/edited content from Step 8.
Commands by action:
gh pr review {{arg}} --approve --body "{{COMMENT}}"gh pr review {{arg}} --approve --body "{{COMMENT}}" then gh pr merge {{arg}} --auto --squashgh pr review {{arg}} --request-changes --body "{{COMMENT}}"gh pr comment {{arg}} --body "{{COMMENT}}" then gh pr close {{arg}}Make changes and approve: See pr-review:references:action-preview-templates for complete workflow.
Continue to Step 10.
See pr-review:references:execution-results for result message templates.
Display appropriate success message with:
Workflow complete.
If any command fails during execution:
Failed to [action] PR #{{arg}}
Error: [error message]
Recovery options:
- /pr-review {{arg}} (re-run full workflow)
- Or use gh CLI directly: [relevant commands based on failure]
For "Make changes and approve" failures: Always return to original branch before reporting error.
Take pulumi/pr-review from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.