git-pr
Used when creating pull requests. Generates PR title and description based on branch changes.
When & Why to Use This Skill
This Claude skill automates the Git Pull Request creation process by intelligently analyzing branch commits and code diffs. It generates professional, context-aware PR titles and descriptions, supports GitHub templates, and utilizes the GitHub CLI to streamline the transition from local development to collaborative code review, significantly enhancing developer productivity and documentation quality.
Use Cases
- Automated PR Documentation: Generate comprehensive pull request descriptions that summarize complex code changes, saving developers from manual writing and ensuring technical accuracy.
- Standardized Commit Formatting: Enforce the use of Conventional Commit formats for PR titles to maintain a clean, readable, and searchable project history.
- Template Compliance: Automatically detect and populate .github/pull_request_template.md files with relevant technical details, test plans, and change overviews based on actual code modifications.
- Streamlined Workflow Integration: Push local branches and create draft or final pull requests directly through the GitHub CLI (gh) without leaving the terminal or agent environment.
| name | git-pr |
|---|---|
| description | Used when creating pull requests. Generates PR title and description based on branch changes. |
Git Pull Request
Create a pull request with appropriate title and description.
Steps
- Use the base branch specified in the command arguments
- Analyze all commits and changes from base branch
- Generate PR title and description:
- Title: Single-line summary using conventional commit format
- Description: If template exists, fill it in with appropriate content. Otherwise, include summary, test plan, and changes overview
- Match language (English/Japanese) from commit history
- Push branch if needed:
git push -u origin <branch> - Create PR with base branch:
gh pr create --draft --base <base-branch> --title "title" --body "description" - Return PR URL
Notes
- No Claude Code references
- Analyze ALL commits in the branch, not just the latest
- Include base branch comparison (e.g.,
git diff main...HEAD) - Push with
-uflag if branch not yet pushed - PR template locations to check:
.github/pull_request_template.md,.github/PULL_REQUEST_TEMPLATE.md - If template exists, respect its structure and fill in all sections appropriately