All skills
Skillintermediate
PR Writer
Generate comprehensive pull request descriptions from git changes.
Claude Code Knowledge Pack7/10/2026
Overview
PR Writer
Generate comprehensive pull request descriptions from git changes.
Process
- Analyze - Review git diff and commit history
- Categorize - Group changes by type
- Summarize - Write clear description
- Checklist - Add testing/review checklist
- Create - Generate PR via gh CLI
Analysis Commands
# Get commit history for branch
git log main..HEAD --oneline
# Get full diff
git diff main...HEAD --stat
# Get changed files
git diff main...HEAD --name-only
# Get detailed diff (for understanding changes)
git diff main...HEAD
# Check branch name for ticket reference
git branch --show-current
PR Template
## Summary
[2-3 sentence description of what this PR does and why]
## Changes
### Added
- [New feature or file]
### Changed
- [Modified behavior]
### Fixed
- [Bug fix]
### Removed
- [Deleted code/feature]
## Files Changed
| File | Changes |
|------|---------|
| `src/...` | [Brief description] |
## Testing
### Manual Testing
- [ ] Tested locally with `npm run dev`
- [ ] Verified [specific feature] works
- [ ] Checked for console errors
### Automated Testing
- [ ] All existing tests pass (`npm test`)
- [ ] Added tests for new functionality
- [ ] Coverage maintained/improved
## Screenshots
[If UI changes, add before/after screenshots]
## Checklist
- [ ] Code follows project style
- [ ] Self-reviewed the diff
- [ ] No console.logs left
- [ ] Documentation updated (if needed)
- [ ] No breaking changes (or documented)
## Related
- Closes #[issue number]
- Related to #[PR/issue number]
Output
Generate PR directly using gh CLI:
gh pr create \\
--title "[type]: Brief description" \\
--body "$(cat <<'EOF'
## Summary
[Generated summary based on changes]
## Changes
[Categorized list of changes]
## Testing
- [ ] Tested locally
- [ ] All tests pass
## Checklist
- [ ] Code reviewed
- [ ] No console.logs
EOF
)"
Change Categories
feat: New feature fix: Bug fix refactor: Code restructure (no behavior change) style: Formatting, lint fixes docs: Documentation only test: Adding/updating tests chore: Maintenance, dependencies perf: Performance improvement
Example Output
Based on analyzing changes:
## Summary
Adds user profile editing functionality. Users can now update their name, email, and avatar from the settings page.
## Changes
### Added
- `src/app/settings/page.tsx` - New settings page component
- `src/api/users/[id]/route.ts` - PUT endpoint for user updates
- `src/components/AvatarUpload.tsx` - Avatar upload component
### Changed
- `src/components/Navbar.tsx` - Added link to settings
- `prisma/schema.prisma` - Added avatar field to User model
### Fixed
- `src/lib/auth.ts` - Session not refreshing after profile update
## Files Changed
| File | Changes |
|------|---------|
| `src/app/settings/page.tsx` | New settings page with form |
| `src/api/users/[id]/route.ts` | New PUT handler for updates |
| `src/components/AvatarUpload.tsx` | Image upload with preview |
| `src/components/Navbar.tsx` | Added settings link |
| `prisma/schema.prisma` | Added avatar URL field |
| `src/lib/auth.ts` | Fixed session refresh |
## Testing
### Manual Testing
- [x] Edit profile name - saves correctly
- [x] Upload avatar - displays properly
- [x] Email validation - rejects invalid formats
- [x] Cancel button - discards changes
### Automated Testing
- [x] `npm test` passes
- [ ] Need to add tests for new API endpoint
## Screenshots
[Before: No settings page]
[After: Settings page with form]
## Checklist
- [x] Code follows project style
- [x] Self-reviewed the diff
- [x] No console.logs left
- [ ] Documentation updated
- [x] No breaking changes
## Related
- Closes #42 (User settings feature request)
Rules
- Be specific - Mention actual files and changes
- Explain why - Not just what changed, but why
- Testing proof - Show what was tested
- Link issues - Reference related tickets
- Screenshots - For any UI changes
- Keep it scannable - Use lists and tables