prepare-pr
Prepare a GitHub PR for merge by rebasing onto main, fixing review findings, running gates, committing fixes, and pushing to the PR head branch.
Skill by cogpy
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/cogpy-prepare-pr
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
prepare-pr- Description
- Prepare a GitHub PR for merge by rebasing onto main, fixing review findings, running gates, committing fixes, and pushing to the PR head branch. Use after /reviewpr. Never merge or push to main.
- License
- MIT
- Instructions
- 274 lines in SKILL.md · view on GitHub
Files (2)
- SKILL.md
- openai.yaml · agents/
SKILL.md (first lines)
# Prepare PR
## Overview
Prepare a PR branch for merge with review fixes, green gates, and an updated head branch.
## Inputs
- Ask for PR number or URL.
- If missing, auto-detect from conversation.
- If ambiguous, ask.
## Safety
- Never push to `main` or `origin/main`. Push only to the PR head branch.
- Never run `git push` without specifying remote and branch explicitly. Do not run bare `git push`.
- Do not run gateway stop commands. Do not kill processes. Do not touch port 18792.
- Do not run `git clean -fdx`.
- Do not run `git add -A` or `git add .`. Stage only specific files changed.
## Execution Rule
- Execute the workflow. Do not stop after printing the TODO checklist.
- If delegating, require the delegate to run commands and capture outputs.
## Known Footguns
- If you see "fatal: not a git repository", you are in the wrong directory. Use `~/dev/openclaw` if available; otherwise ask user.
- Do not run `git clean -fdx`.
- Do not run `git add -A` or `git add .`.
## Completion Criteria
- Rebase PR commits onto `origin/main`.
- Fix all BLOCKER and IMPORTANT items from `.local/review.md`.
- Run required gates and pass (docs-only PRs may skip `pnpm test` when high-confidence docs-only criteria are met and documented).
- Commit prep changes.
- Push the updated HEAD back to the PR head branch.
- Write `.local/prep.md` with a prep summary.
- Output exactly: `PR is ready for /mergepr`.
## First: Create a TODO Checklist
Create a checklist of all prep steps, print it, then continue and execute the commands.
## Setup: Use a Worktree
Use an isolated worktree for all prep work.
```sh
cd ~/openclaw
# Sanity: confirm you are in the repo
git rev-parse --show-toplevel
WORKTREE_DIR=".worktrees/pr-<PR>"
```
Run all commands inside the worktree directory.
## Load Review Findings (Mandatory)
```sh
if [ -f .local/review.md ]; then
echo "Found review findings from /reviewpr"
else
echo "Missing .local/review.md. Run /reviewpr first and save findings."
exit 1
fi
# Read it
sed -n '1,200p' .local/review.md
```
## Steps
1. Identify PR meta (author, head branch, head repo URL)
```sh
gh pr view <PR> --json number,title,author,headRefName,baseRefName,headRepository,body --jq '{number,title,author:.author.login,head:.headRefName,base:.baseRefName,headRepo:.headRepository.nameWithOwner,body}'
contrib=$(gh pr view <PR> --json author --jq .author.login)
head=$(gh pr view <PR> --json headRefName --jq .headRefName)
head_repo_url=$(gh pr view <PR> --json headRepository --jq .headRepository.url)
```
2. Fetch the PR branch tip into a local ref
```sh
git fetch origin pull/<PR>/head:pr-<PR>
```
3. Rebase PR commits onto latest main
```sh
# Move worktree to the PR tip first
git reset --hard pr-<PR>
# Rebase onto current main
git fetch origin main
git rebase origin/main
```
If conflicts happen:
- Resolve each conflicted file.
- Run `git add <resolved_file>` for each file.
- Run `git rebase --continue`.
If the rebase gets confusing or you resolve conflicts 3 or more times, stop and report.
4. Fix issues from `.local/review.md`
- Fix all BLOCKER and IMPORTANT items.
- NITs are optional.
- Keep scope tight.
Keep a running log in `.local/prep.md`:
- List which review items you fixed.
- List which files you touched.From cogpy/clawcog, MIT.
More from cogpy/clawcog
- 0.390score
1password
cogpy
Set up and use 1Password CLI (op).
SkillDFreshness: DClaude Code +9 - 0.385score
apple-notes
cogpy
Manage Apple Notes via the `memo` CLI on macOS (create, view, edit, delete, search, move, and export notes).
SkillDFreshness: DClaude Code +9 - 0.385score
bluebubbles
cogpy
Use when you need to send or manage iMessages via BlueBubbles (recommended iMessage integration).
SkillDFreshness: DClaude Code +9 - 0.382score
apple-reminders
cogpy
Manage Apple Reminders via the `remindctl` CLI on macOS (list, add, edit, complete, delete).
SkillDFreshness: DClaude Code +9 - 0.382score
prose
cogpy
OpenProse VM skill pack.
SkillDFreshness: DClaude Code +9 - 0.227score
coding-agent
cogpy
Run Codex CLI, Claude Code, OpenCode, or Pi Coding Agent via background process for programmatic control.
SkillDFreshness: DClaude Code +9 - 0.227score
blogwatcher
cogpy
Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.
SkillDFreshness: DClaude Code +9 - 0.227score
blucli
cogpy
BluOS CLI (blu) for discovery, playback, grouping, and volume.
SkillDFreshness: DClaude Code +9 - 0.225score
camsnap
cogpy
Capture frames or clips from RTSP/ONVIF cameras.
SkillDFreshness: DClaude Code +9 - 0.225score
bear-notes
cogpy
Create, search, and manage Bear notes via grizzly CLI.
SkillDFreshness: DClaude Code +9 - 0.211score
canvas
cogpy
No description from the publisher yet.
SkillDFreshness: DClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Feb 10, 2026 (8 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/cogpy/clawcog
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.508score
prepare-pr
NJX-njx
Prepare a GitHub PR for merge by rebasing onto main, fixing review findings, running gates, committing fixes, and pushing to the PR head branch.
SkillDFreshness: D★ 59Claude Code +9 - 0.257score
prepare-pr
Fallenproud
Prepare a GitHub PR for merge by rebasing onto main, fixing review findings, running gates, committing fixes, and pushing to the PR head branch.
SkillDFreshness: D★ 1Claude Code +9
More from cogpy
- 0.390score
1password
cogpy
Set up and use 1Password CLI (op).
SkillDFreshness: DClaude Code +9 - 0.385score
apple-notes
cogpy
Manage Apple Notes via the `memo` CLI on macOS (create, view, edit, delete, search, move, and export notes).
SkillDFreshness: DClaude Code +9 - 0.385score
bluebubbles
cogpy
Use when you need to send or manage iMessages via BlueBubbles (recommended iMessage integration).
SkillDFreshness: DClaude Code +9 - 0.382score
prose
cogpy
OpenProse VM skill pack.
SkillDFreshness: DClaude Code +9 - 0.382score
apple-reminders
cogpy
Manage Apple Reminders via the `remindctl` CLI on macOS (list, add, edit, complete, delete).
SkillDFreshness: DClaude Code +9
Cite this page
prepare-pr skill. Agent Mart. https://agentmart.dev/skills/cogpy-prepare-pr (last updated 2026-10-24)