agent-browser-automati…
Automate browser interactions for development testing using Puppeteer MCP
Create pull requests with intelligent analysis and programmatic workflow
How it fires
How this command gets triggered: by you, by Claude, or both.
/pr-createContext preview
What this command does when you run it.
Create pull requests with intelligent analysis and programmatic workflow
allowed-tools: Bash(gh pr create:*), Bash(gh pr list:*), Bash(gh auth status:*), Bash(git status:*), Bash(git push:*), Bash(git branch:*), Bash(git diff:*), Bash(git log:*), Bash(gh issue view:*), Bash(gdate:*), Bash(jq:*) name: "Pr Create" description: "Create pull requests with intelligent analysis and programmatic workflow" 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 creation session and validate prerequisites
{
"sessionId": "$SESSION_ID",
"timestamp": "$(gdate -Iseconds 2>/dev/null || date -Iseconds)",
"branch": "$(git branch --show-current)",
"arguments": "$ARGUMENTS",
"phase": "validation",
"pr_config": {},
"validation_results": {}
}TRY:
**Prerequisites Validation:**
IF GitHub auth != "authenticated":
IF git repository not detected:
IF uncommitted changes > 0:
CATCH (validation_failed):
STEP 2: Parse arguments and configure PR parameters
**Argument Processing:**
# Parse common argument patterns draft_mode=$(echo "$ARGUMENTS" | grep -q "draft" && echo "true" || echo "false") base_branch=$(echo "$ARGUMENTS" | grep -oE 'base=([^\s]+)' | cut -d'=' -f2 || echo "main") reviewers=$(echo "$ARGUMENTS" | grep -oE 'reviewers=([^\s]+)' | cut -d'=' -f2 || echo "") labels=$(echo "$ARGUMENTS" | grep -oE 'labels=([^\s]+)' | cut -d'=' -f2 || echo "") custom_title=$(echo "$ARGUMENTS" | grep -oE 'title="([^"]+)"' | sed 's/title="//;s/"$//' || echo "") template=$(echo "$ARGUMENTS" | grep -oE 'template=([^\s]+)' | cut -d'=' -f2 || echo "")
STEP 3: Intelligent change analysis and PR content generation
Think deeply about the optimal PR content generation strategy based on commit history, file changes, and project conventions.
TRY:
**Change Analysis Execution:**
# Get base branch (fallback chain) base_branch=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' || echo "main") # Analyze commits and changes commit_messages=$(git log --pretty=format:"%s" origin/$base_branch...HEAD 2>/dev/null || echo "") file_changes=$(git diff --name-status origin/$base_branch...HEAD 2>/dev/null || echo "") change_summary=$(git diff --stat origin/$base_branch...HEAD 2>/dev/null || echo "") # Extract issue numbers from branch or commits issue_numbers=$(echo "$(git branch --show-current)\n$commit_messages" | grep -oE '#[0-9]+' | sort -u || echo "") # Check for existing PR existing_pr=$(gh pr list --head $(git branch --show-current) --json number,state 2>/dev/null | jq -r '.[0].number // "none"' 2>/dev/null || echo "none")
**Title Generation Logic:**
IF custom_title provided:
ELSE IF single commit with conventional format:
ELSE:
CATCH (analysis_failed):
STEP 4: Handle existing PR or create new PR
IF existing_pr != "none":
ELSE:
STEP 5: Execute PR creation with intelligent content
**PR
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