pr-creation
This skill should be used when the user asks to "create a pull request", "create a PR", "submit changes for review", "use gh pr create", "write PR description", or needs guidance on creating well-structured GitHub pull requests in k2-dev workflows.
When & Why to Use This Skill
This Claude skill provides a streamlined way to create and manage GitHub Pull Requests (PRs) using standardized templates and the GitHub CLI. It automates the generation of PR titles and descriptions, ensuring that all submissions follow best practices and organizational workflows like k2-dev. By handling the formatting of change types, ticket IDs, and testing details, it helps developers submit high-quality PRs quickly and efficiently while maintaining consistency across the codebase.
Use Cases
- Automated PR Formatting: Generate PR titles using standard prefixes like feat, fix, or refactor along with ticket IDs for better traceability and cleaner git history.
- Template Enforcement: Automatically populate PR descriptions using project-specific templates to ensure consistent documentation of changes, testing steps, and references.
- GitHub CLI Integration: Execute 'gh pr create' and 'gh pr view' commands to submit changes and retrieve PR URLs directly, reducing manual context switching.
- Workflow Standardization: Maintain high standards across development teams by ensuring every pull request meets the required structural criteria for efficient code reviews.
| name | PR Creation |
|---|---|
| description | Quick PR creation reference |
| version | 0.1.0 |
PR Creation
Title Format
<type>: <summary> (<ticket-id>)
Types: feat, fix, refactor, docs, test, chore, perf, security
Description Template
IMPORTANT: Always follow the Pull Request template in .github/pull_request_template.md if it exists.
If no template exists, use:
## Summary
Brief description of changes
## Changes
- List of changes
## Testing
- How validated
## References
- Implements: <ticket>
Create PR
gh pr create --title "feat: Add feature (beads-123)" \
--body "$(cat <<'EOF'
## Summary
...
## Changes
- ...
## Testing
- ...
## References
- Implements: beads-123
EOF
)"
Get PR URL
gh pr view --json url -q .url