Generate PR title and description to file
Generates comprehensive PR description comparing current branch with base branch and saves to PR_DETAILS.md.
/plugin marketplace add adeonir/claude-code-stuff/plugin install git-helpers@claude-code-stuff[base-branch]Generate a comprehensive PR description comparing current branch with base branch, save to PR_DETAILS.md.
base-branch: Use specified branch as base for comparisonCRITICAL: Always validate before running analysis:
# 1. Verify base branch exists
git branch -a | grep -E "(main|master|develop|development)$"
# 2. Confirm current branch is NOT the base branch
git branch --show-current
Requirements:
Detect base branch (if not specified):
git branch -a | grep -E "(main|master|develop|development)$" | head -1
Gather context (run in parallel):
# Extract tickets from branch name
git branch --show-current
# Get diff statistics
git diff {base}...HEAD --stat
# Get file change status
git diff {base}...HEAD --name-status
# Get commit history
git log {base}..HEAD --oneline
# Get detailed diff for content analysis
git diff {base}...HEAD
Analyze changes and categorize files:
Assess risk and impact:
Generate PR_DETAILS.md using Write tool with template below.
# Brief Descriptive Title
## Summary
[2-3 sentences describing the main functional change or feature - focus on business value, not implementation details]
## Key Changes
### Core Changes (X files)
- **[filename]**: [Brief functional description of changes]
### API Changes (X files)
- **[filename]**: [Brief description]
### State Management (X files)
- **[filename]**: [Brief description]
### UI Components (X files)
- **[filename]**: [Brief description]
### Configuration/Build (X files)
- **[filename]**: [Brief description]
### Documentation (X files)
- **[filename]**: [Brief description]
## Technical Flow
**Change Flow Description:**
1. [User action or trigger that initiates the change]
2. [How modified components handle the interaction]
3. [API calls or state updates that occur]
4. [Final outcome or UI response]
5. [Fallback mechanisms or error handling]
**Key Components Involved:**
- **[Component Name]**: [Role in the change]
- **[API/Service Name]**: [API modifications or interactions]
- **[State Management]**: [State changes if applicable]
**Data Flow:**
- Input: [What triggers the change]
- Processing: [How the change is handled]
- Output: [What the user experiences]
## Impact Assessment
### Risk Level: [LOW/MEDIUM/HIGH]
- [Justification for risk level]
- [Potential issues to watch for]
### Performance Impact: [POSITIVE/NEUTRAL/NEGATIVE]
- [Description of performance changes]
### Compatibility Impact: [NONE/MINOR/MAJOR]
- [Backward compatibility considerations]
- [API changes if any]
## Priority Review Areas
- **HIGH**: [Critical areas - breaking changes, core business logic, state management]
- **MEDIUM**: [Important areas - UI changes, new features, refactoring]
- **LOW**: [Minor areas - documentation, styling, configuration]
## Testing Instructions
1. [Step-by-step instructions to test the changes]
2. [Expected outcomes for each step]
3. [Edge cases to verify]
## Additional Notes
[Any additional context, future considerations, or related work]
Generate PR description for current branch with $ARGUMENTS and save to PR_DETAILS.md.
After analyzing all changes: