pull-request
Installation
SKILL.md
Contains Shell Commands
This skill contains shell command directives (!`command`) that may execute system commands. Review carefully before installing.
Pull Request Skill
Create a GitHub pull request from the current branch following this project's conventions.
Context
- Current branch: !
git branch --show-current - Default branch:
main - Commits ahead of base: !
git log --oneline origin/main..HEAD - Full diff from base: !
git diff origin/main...HEAD - Unpushed status: !
git status -sb
Steps
- Verify branch — confirm you are not on the default branch; if so, warn the user and stop
- Push branch — if the branch has not been pushed yet, run
git push -u origin <branch> - Analyze commits — review all commits ahead of the base branch (not just the latest) to understand the full scope of changes
- Draft PR title — derive a concise title (under 70 characters) from the commit history; follow the same Conventional Commits style used by the commit skill when applicable
- Draft PR body — use the template below
- Create PR — run
gh pr createwith the title and body via a HEREDOC
PR Body Template
## Summary
- <bullet summarising what changed and why>
- <additional bullets as needed>
## Why
<Explain the motivation behind these changes — e.g. the problem being solved, the requirement driving the work, or the context that makes this change necessary. Omit this section if the reason is self-evident from the summary.>
Rules
- Never open a PR from the default branch into itself
- Always include at least one summary bullet
- Include a Why section whenever the motivation is not self-evident from the summary (e.g. a bug fix, a requirement-driven change, or a non-obvious architectural decision)
- Keep the title under 70 characters
- Do NOT add a
Co-Authored-Bytrailer to the PR body - If
ghis not authenticated, instruct the user to rungh auth loginfirst
Related skills