pull-request
Create a GitHub pull request (PR) with proper formatting and content guidelines. Use when creating or updating pull requests/PRs (or GitLab merge requests/MRs, Gerrit change requests/CRs).
When & Why to Use This Skill
This Claude skill automates the creation and management of Pull Requests (PRs), Merge Requests (MRs), and Change Requests (CRs) across platforms like GitHub, GitLab, and Gerrit. It ensures all submissions adhere to professional standards by enforcing consistent title formatting (conventional or subject-based), structured descriptions, and automated issue linking. By streamlining the submission process, it helps engineering teams maintain high-quality documentation and a clean version control history.
Use Cases
- Automating the creation of GitHub PRs with titles that automatically match the repository's existing commit style (e.g., conventional commits).
- Generating comprehensive PR bodies that include root cause analysis, change summaries, and testing insights to facilitate faster code reviews.
- Ensuring proper issue tracking by automatically linking PRs to tickets using 'Closes' or 'Fixes' syntax without manual editing.
- Standardizing documentation across a team by enforcing specific headers and formatting rules for all outgoing merge requests.
- Updating existing pull requests with formatted content and identifiers to maintain clarity throughout the development lifecycle.
| name | Pull Request |
|---|---|
| description | | |
| allowed-tools | Bash(gh:*), mcp__github |
Pull Request
Guidelines for creating or updating pull requests (PRs), merge requests (MRs), or change requests (CRs).
Title
- Check recent commits (
git log --oneline -20) to determine the repo's commit style:- subject (default):
${subject}: ${summary}(e.g.,api: add timeout to request) - conventional:
${type}: ${summary}(e.g.,fix: add timeout to request)
- subject (default):
- Keep under 50 characters, max 100
- Use imperative mood, lowercase except proper nouns
Body
- Use strategy in
context.mdto gather context if needed - Start with 1-3 sentences summarizing the change (no preceding header)
- Wrap all code identifiers with backticks: function names, class names, file paths, endpoints, status codes, etc.
- Use
##sections for larger changes. Seesections.mdfor detailed guidance on:## Issue- Root cause analysis and issue linking## Changes- High-level description of changes## Testing- Test coverage insights## References- Related links and issues
Issue Handling
When an issue is referenced:
- ONLY reference the issue in the PR body (e.g.,
Closes #123,Fixes #456) - NEVER modify the issue directly - no comments, labels, milestones, or assignees
Workflow
See workflow.md for creating a new pull request.