prepare-pr
Installation
SKILL.md
Prepare PR
Overview
Prepare a PR branch for merge with review fixes, green CI, and an updated head branch.
Inputs
- Ask for PR number or URL if not provided.
- If review findings exist, use them to guide fixes.
Safety
- Never push to
mainororigin/main. Push only to the PR head branch. - Never run bare
git push. Always specify remote and branch explicitly. - Do not run
git add -Aorgit add .. Stage only specific changed files. - Do not run
git clean -fdx.
Workflow
1. Checkout the PR branch
gh pr checkout <number>
2. Rebase onto latest main
git fetch origin main
git rebase origin/main
3. Fix review findings
Address BLOCKER and IMPORTANT issues from the review. For each fix:
- Make the minimal change needed
- Stage only the specific files changed
- Commit with a descriptive message:
fix: address review — <description>
4. Run validation
npm run validate # or the project's equivalent: lint + typecheck + test
5. Fix any validation errors
If lint/typecheck/test fails, fix and commit.
6. Push to PR branch
git push origin HEAD:<head-branch> --force-with-lease
7. Verify PR is up to date
gh pr checks <number>
gh pr view <number> --json mergeable
Output
Confirm: "PR # is prepared and ready for merge."
Related skills
More from phuetz/code-buddy
blender
Blender 3D modeling, animation, and rendering automation via Python bpy scripting and CLI
19figma
Automate Figma design workflows via REST API, Plugin API, and MCP integration
3github
Interact with GitHub using the gh CLI for issues, PRs, CI runs, releases, and API queries
3gif-search
Search and download GIFs from Tenor and Giphy APIs
3ableton-live
Ableton Live music production automation via OSC protocol, MIDI, and Max for Live
3gitlab
GitLab DevOps platform with CI/CD pipelines, API automation, and glab CLI control
3