# Pr Creator

> Automate PR generation with version detection and release notes. Streamlines contribution workflow and version management. Creates professional PR descriptions with checklist and automation templates.

- Skill: `wxy/pr-creator` (Agent Skill)
- Install (CLI): `npx skillmds add wxy/pr-creator`
- Raw SKILL.md: https://api.skillmd.com/api/skills/wxy/pr-creator/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: wxy (https://skillmd.com/u/wxy)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/wxy/pr-creator

---


# _pr-creator

## Overview

Automates professional Pull Request creation with structured descriptions, checklists, and proper formatting. Integrates with version detection and release notes generation.

**When to use**: Creating pull requests for features, fixes, or releases

**Key principle**: Use structured file-based descriptions, not inline PR text

---

## PR Creation Workflow

### Step 1: Detect Version & Changes

```bash
# Check current version
cat package.json | grep version

# Understand what changed
git log --oneline master..HEAD | head -10
git diff --name-only master...HEAD
```

### Step 2: Create PR Description File

Store PR description in `.github/PR_DESCRIPTION.local.md`:

```markdown
# <Type>: <Clear Title>

## Description

Brief summary of what this PR does (2-3 sentences).

## Changes

- Change 1
- Change 2
- Change 3

## Testing

How was this tested?
- Unit tests pass
- Manual testing steps

## Checklist

- [ ] Code follows style guidelines
- [ ] Self-review completed  
- [ ] Comments added for complex areas
- [ ] Tests added (if applicable)
- [ ] Documentation updated (if applicable)
- [ ] No breaking changes (or documented)

---

🤖 Generated by _pr-creator skill
```

### Step 3: Key PR Title Patterns

```markdown
# For Features
- `feat: Add OAuth authentication`
- `feat: Implement caching layer`

# For Fixes
- `fix: Resolve race condition in data sync`
- `fix: Correct validation error message`

# For Documentation
- `docs: Update API reference`
- `docs: Add setup guide`

# For Releases
- `release: v2.1.0 release preparation`
- `chore(release): Prepare v3.0.0`
```

### Step 4: Create the PR

```bash
# Push branch
git push origin feature/your-feature

# Create PR using GitHub CLI
gh pr create --title "feat: Add X" \
  --body-file .github/PR_DESCRIPTION.local.md \
  --base master

# Or create via GitHub Web UI:
# 1. Navigate to repo
# 2. Click "New pull request"
# 3. Select base and compare branches
# 4. Copy content from PR_DESCRIPTION.local.md
```

### Step 5: Clean Up

```bash
# Delete temporary description file
rm .github/PR_DESCRIPTION.local.md
```

---

## PR Description Template

```markdown
# <Type>: <Descriptive Title>

## Summary
2-3 sentence summary of the change.

## Problem
What problem does this solve or feature does this add?

## Solution
How was it solved/implemented?

## Testing
- Unit tests: ✅ Passed
- Integration tests: ✅ Passed
- Manual testing: (describe steps)

## Checklist
- [ ] Code style compliance
- [ ] Tests added/updated
- [ ] Documentation updated
- [ ] No breaking changes
- [ ] Linked to issue (if applicable)

---

🤖 Generated by _pr-creator skill
```

---

## PR Types & Examples

### Feature PR

```markdown
# feat: Implement user profile caching

## Summary
Adds in-memory caching for user profiles to reduce database queries.

## Changes
- Add ProfileCache class using LRU strategy
- Cache TTL: 5 minutes (configurable)
- Metrics: ~60% reduction in profile queries

## Testing
- ✅ 12 new unit tests
- ✅ 2 integration tests
- ✅ Manual browser testing

## Performance
- Query latency: 200ms → 50ms
- Database load: 40% reduction
```

### Bug Fix PR

```markdown
# fix: Prevent duplicate API calls on rapid clicks

## Problem
Double-clicking quickly triggers API request twice.

## Solution
Add debounce wrapper to API call. Throttle: 500ms.

## Testing
- ✅ Verified with rapid clicks
- ✅ No API duplicates observed
```

### Release PR

```markdown
# release: v2.0.0 release preparation

## Changes From v1.9.0
- ✨ Added new export API
- 🐛 Fixed auth timeout issues
- ♻️ Refactored cache layer
- 📚 Updated documentation

## Checklist
- [x] CHANGELOG updated
- [x] Docs updated
- [x] Tests passing (98% coverage)
- [x] Build successful
```

---

## PR Description Checklist

Before submitting:

```markdown
## PR Submission Checklist

- [ ] Title is clear and descriptive
- [ ] Type is specified (feat/fix/docs/etc)
- [ ] Description explains what and why
- [ ] Changes are properly listed
- [ ] Testing steps documented
- [ ] No hardcoded values or debug code
- [ ] Related issue linked (#123)
- [ ] Breaking changes documented (if any)
- [ ] Signature line included (🤖 marker)
```

---

## Integration with Version Detection

For release PRs, include version info:

```bash
# Extract version from package.json
VERSION=$(cat package.json | grep '"version"' | head -1 | \
  awk -F'"' '{print $4}')

# Generate notes from commits
git log --oneline --grep="feat\|fix" v$PREV_VERSION..HEAD
```

---

## GitHub CLI Commands

```bash
# Create PR with body file
gh pr create --title "feat: X" \
  --body-file .github/PR_DESCRIPTION.local.md

# Create PR and mark draft
gh pr create --title "WIP: X" --draft

# Create PR with assignees/labels
gh pr create --title "fix: X" \
  --assignee @me \
  --label "bug,urgent"

# List your PRs
gh pr list --creator @me

# View PR details
gh pr view <number>
```

---

## Common PR Anti-patterns

| Anti-pattern | Problem | Fix |
|-------------|---------|-----|
| Vague title "Updates" | Unclear scope | Use specific: "feat: Add X" |
| Empty description | No context | Write summary + testing |
| No tests mentioned | Reviewers unsure | Document test coverage |
| Mixing scopes | Too big to review | Split into smaller PRs |
| Commits unclear | Hard to revert | Use _git-commit skill format |

---

## Best Practices

1. **Keep PRs focused** - one feature/fix per PR
2. **Write clear descriptions** - help reviewers understand
3. **Link to issues** - context and traceability
4. **Include test proof** - screenshots/coverage
5. **Clean up drafts** - delete temp `.local.md` files
6. **Request review early** - don't wait until perfect

---

## Quick Workflow

```bash
# Feature branch work
git checkout -b feature/my-feature
# ... edit files ...

# Prepare description
cat > .github/PR_DESCRIPTION.local.md << 'EOF'
# feat: Describe feature

[see template above for full format]

🤖 Generated by _pr-creator skill
EOF

# Create PR
gh pr create \
  --title "feat: My feature" \
  --body-file .github/PR_DESCRIPTION.local.md

# Clean up
rm .github/PR_DESCRIPTION.local.md
```

---

## Related Skills

- **_git-commit**: Proper commit message formatting
- **_code-health-check**: Quality checks before PR creation
- **_release-process**: Release PR creation and merge process

