Create pull requests with formatted code, logical commits, and comprehensive descriptions
/plugin marketplace add claudeforge/marketplace/plugin install pr-creator@claudeforge-marketplaceAutomate pull request creation with code formatting, commit organization, and detailed PR descriptions.
Run when you're ready to create a PR from your changes:
/create-pr
The command handles everything from formatting to PR submission.
1. Format Code
# Run project formatter
npm run format
# or
biome format --write .
2. Analyze Changes
git status
git diff
3. Create Feature Branch
git checkout -b feature/user-profile-editor
4. Organize Commits
# Group related changes
git add src/components/Profile*.tsx
git commit -m "feat(profile): add profile editor component"
git add src/api/profile.ts
git commit -m "feat(api): add profile update endpoint"
5. Push and Create PR
git push -u origin feature/user-profile-editor
gh pr create --title "Add user profile editor" --body "..."
## Summary
Brief overview of what this PR accomplishes
## Changes
- Added profile editor component
- Created profile update API endpoint
- Added form validation
- Wrote unit tests
## Type of Change
- [x] New feature
- [ ] Bug fix
- [ ] Breaking change
- [ ] Documentation update
## Testing
- All unit tests passing
- Manually tested on Chrome/Firefox
- Verified form validation edge cases
## Related Issues
Closes #234
Scenario: Adding export functionality
Step 1: Format
npm run format
# Fixed formatting in 3 files
Step 2: Create Branch
git checkout -b feature/export-data
Step 3: Commit Changes
git add src/services/export.ts src/services/export.test.ts
git commit -m "feat(export): add data export service"
git add src/components/ExportButton.tsx
git commit -m "feat(ui): add export button to dashboard"
git add README.md
git commit -m "docs: add export feature documentation"
Step 4: Create PR
git push -u origin feature/export-data
gh pr create \
--title "Add data export functionality" \
--body "Closes #123. Adds CSV/JSON export with download button."
Good Organization
✓ feat(auth): add login form component
✓ feat(auth): add authentication API
✓ test(auth): add login tests
✓ docs(auth): update authentication guide
Poor Organization
✗ update stuff
✗ WIP
✗ more changes
✗ fix
Use descriptive branch names with prefixes:
feature/add-dark-modefix/validation-errorrefactor/extract-utilsdocs/api-documentationThe command runs formatters automatically:
JavaScript/TypeScript
prettier --write .
# or
biome format --write .
Python
black .
ruff format .
Go
go fmt ./...
Before creating PR, verify:
# Run tests
npm test
# Run linter
npm run lint
# Build project
npm run build
# Type check (if TypeScript)
npm run typecheck
All checks must pass before creating PR.
Request specific reviewers:
gh pr create \
--reviewer alice,bob \
--assignee charlie \
--label "needs-review"
For work in progress:
gh pr create --draft --title "WIP: Feature in progress"
Mark ready when complete:
gh pr ready
Formatting Fails: Check formatter config, fix errors manually
Push Rejected: Pull latest changes, rebase, try again
PR Creation Fails: Verify GitHub CLI is authenticated
Tests Fail: Fix tests before creating PR
Merge Conflicts: Resolve conflicts with base branch
A good PR includes:
/create-prStreamlines pull request creation by handling the entire workflow: creating a new branch, committing changes, formatting modified files with Biome, and submitting the PR.