بنقرة واحدة
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. Use after /reviewpr. Never merge or push to main.
// 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.
Security scanning and remediation for AI coding agents. Scan code for vulnerabilities, generate fix patches, detect sensitive data leaks, and produce compliance reports — all from your OpenClaw agent.
Merge a GitHub PR via squash after /preparepr. Use when asked to merge a ready PR. Do not push to main or modify code. Ensure the PR ends in MERGED state and clean up worktrees after success.
Review-only GitHub pull request analysis with the gh CLI. Use when asked to review a PR, provide structured feedback, or assess readiness to land. Do not merge, push, or make code changes you intend to keep.
| 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. |
Prepare a PR branch for merge with review fixes, green gates, and an updated head branch.
main or origin/main. Push only to the PR head branch.git push without specifying remote and branch explicitly. Do not run bare git push.git clean -fdx.git add -A or git add .. Stage only specific files changed.origin/main..local/review.md..local/prep.md with a prep summary.PR is ready for /mergepr.Create a checklist of all prep steps, print it, then continue and execute the commands.
Use an isolated worktree for all prep work.
git rev-parse --show-toplevel
WORKTREE_DIR=".worktrees/pr-<PR>"
Run all commands inside the worktree directory.
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
.local/review.md (all BLOCKER and IMPORTANT items)CHANGELOG.md if flagged in reviewpnpm install && pnpm build && pnpm check && pnpm test).local/prep.md/mergepr may reuse it.gh pr merge.