agent-browser-automati…
Automate browser interactions for development testing using Puppeteer MCP
Update existing pull requests with comprehensive metadata management
How it fires
How this command gets triggered: by you, by Claude, or both.
/pr-updateContext preview
What this command does when you run it.
Update existing pull requests with comprehensive metadata management
allowed-tools: Bash(gh pr edit:*), Bash(gh pr view:*), Bash(gh pr list:*), Bash(gh pr ready:*), Bash(gh pr close:*), Bash(gh pr reopen:*), Bash(gh label list:*), Bash(git branch:*), Bash(git status:*), Bash(gdate:*) name: "Pr Update" description: "Update existing pull requests with comprehensive metadata management" author: "wcygan" tags: ["git","pr"] version: "1.0.0" created_at: "2025-07-14T00:00:00Z" updated_at: "2025-07-14T00:00:00Z"
STEP 1: Initialize PR update session
{
"sessionId": "$SESSION_ID",
"timestamp": "ISO_8601_TIMESTAMP",
"target_pr": null,
"current_branch": "DETECTED_BRANCH",
"requested_updates": [],
"validation_results": {},
"execution_log": []
}STEP 2: Parse arguments and determine target PR
IF $ARGUMENTS contains PR number:
ELSE:
STEP 3: Validate PR state and permissions
TRY:
CATCH (pr_access_error):
STEP 4: Parse and validate update requests
FOR EACH update request in $ARGUMENTS:
STEP 5: Execute PR updates systematically
TRY:
**Update Execution Patterns:**
**Title Updates:**
gh pr edit $PR_NUMBER --title "$NEW_TITLE"
**Body Updates:**
gh pr edit $PR_NUMBER --body "$(cat <<'EOF' $NEW_BODY_CONTENT EOF )"
**Label Management:**
# Add labels gh pr edit $PR_NUMBER --add-label "label1,label2" # Remove labels gh pr edit $PR_NUMBER --remove-label "label1,label2"
**Reviewer Management:**
# Add reviewers gh pr edit $PR_NUMBER --add-reviewer "user1,user2,@team" # Remove reviewers gh pr edit $PR_NUMBER --remove-reviewer "user1"
**State Changes:**
# Ready for review gh pr ready $PR_NUMBER # Convert to draft gh pr edit $PR_NUMBER --draft # Close/reopen gh pr close $PR_NUMBER gh pr reopen $PR_NUMBER
CATCH (update_execution_failed):
STEP 6: Verify updates and generate summary
STEP 7: Session cleanup and reporting
FINALLY:
Updates existing pull requests using the GitHub CLI (`gh`) with support for title, description, labels, and metadata changes.
/pr-update [PR_NUMBER] /pr-update title="New PR title" [PR_NUMBER] /pr-update body="Updated description" [PR_NUMBER] /pr-update add-label=bug,priority-high [PR_NUMBER] /pr-update remove-label=wip [PR_NUMBER] /pr-update add-reviewer=alice,bob [PR_NUMBER] /pr-update milestone=v2.0 [PR_NUMBER] /pr-update ready [PR_NUMBER] /pr-update draft [PR_NUMBER]
This command provides comprehensive PR update capabilities through the `gh` CLI, allowing you to modify pull requests after creation without using the web interface.
If no PR number provided, automatically detects current branch PR:
# Get PR for current branch CURRENT_PR=$(gh pr list --head $(git branch --show-current) --json number -q '.[0].number') # Verify PR exists and is open gh pr view $PR_NUMBER --json state,number,title
# Update PR title gh pr edit $PR_NUMBER --title "feat: improved user authentication flow" # Update PR body/description gh pr edit $PR_NUMBER --body "$(cat <<'EOF' ## Summary Updated implementation based on review feedback ## Changes - Improved error handling - Added comprehensive tests - Updated documentation ## Review Notes All previous comments have been addressed EOF )" # Update both title and body gh pr edit $PR_NUMBER --title "New title" --body "New description"
# Add labels gh pr edit $PR_NUMBER --add-label "bug" --add-label "priority-high" # Remove labels gh pr edi
A lightweight (~46kB) and comprehensive CLI tool for managing Claude commands, configurations, and workflows.
Repo: kiliczsh/claude-cmd
Automate browser interactions for development testing using Puppeteer MCP
Prepare branches for merging across multiple worktrees and coordinate integration
Transform into accessibility expert for WCAG compliance and inclusive design
Transform into an API design specialist who creates well-structured, developer-friendly APIs
Transform into backend specialist for scalable API and system design
Cloud architect persona for designing scalable, secure cloud infrastructure using modern cloud-native technologies