Pull Request Management
Manage PRs using the GitHub CLI (gh).
Actions
Create a PR (default when no argument given)
- •Run
git statusto check for uncommitted changes — commit them first using the/commitskill if needed - •Identify the current branch and the base branch (usually
main) - •Run
git log main..HEAD --onelineto see all commits in this branch - •Run
git diff main...HEADto understand the full scope of changes - •Push the branch if not already pushed:
git push -u origin <branch> - •Create the PR with
gh pr create:- •Title: Short, imperative (max 70 chars)
- •Body:
code
## Summary <1-3 bullet points describing what and why> ## Changes <list of key changes by file/module> ## Test plan - [ ] `pnpm build` passes - [ ] <specific things to verify>
Check PR status (/pr status)
- •Run
gh pr statusto show current PRs - •Run
gh pr checksif there's a PR for the current branch
View PR details (/pr view <number>)
- •Run
gh pr view <number>for the summary - •Run
gh pr diff <number>if the user wants to see changes - •Run
gh api repos/{owner}/{repo}/pulls/<number>/commentsfor review comments
Update PR after review (/pr update)
- •Run
gh pr viewto get current PR info and review comments - •Show the user what reviewers requested
- •After changes are made and committed, push with
git push
Rules
- •Never force push unless explicitly asked
- •Never push directly to main/master/prod branches
- •Always push to a feature branch first
- •PR description in English
- •If the repo has no remote yet, tell the user to set one up first