prepare-pr
Prepare PR
Overview
Prepare the PR head branch for merge after /review-pr.
Inputs
- Ask for PR number or URL.
- If missing, use
.local/pr-meta.envif present in the PR worktree.
Safety
- Never push to
main. - Only push to PR head with explicit
--force-with-leaseagainst known head SHA. - Do not run
git clean -fdx. - Wrappers are cwd-agnostic; run from repo root or PR worktree.
Execution Contract
- Run setup:
scripts/pr-prepare init <PR>
- Resolve findings from structured review:
.local/review.jsonis mandatory.- Resolve all
BLOCKERandIMPORTANTitems.
-
Commit scoped changes with concise subjects (no PR number/thanks; those belong on the final merge/squash commit).
-
Run gates via wrapper.
-
Push via wrapper (includes pre-push remote verification, one automatic lease-retry path, and post-push API propagation retry).
Optional one-shot path:
scripts/pr-prepare run <PR>
Steps
- Setup and artifacts
scripts/pr-prepare init <PR>
ls -la .local/review.md .local/review.json .local/pr-meta.env .local/prep-context.env
jq . .local/review.json >/dev/null
- Resolve required findings
List required items:
jq -r '.findings[] | select(.severity=="BLOCKER" or .severity=="IMPORTANT") | "- [\(.severity)] \(.id): \(.title) => \(.fix)"' .local/review.json
Fix all required findings. Keep scope tight.
- Update changelog/docs (changelog is mandatory in this workflow)
jq -r '.changelog' .local/review.json
jq -r '.docs' .local/review.json
Changelog gate requirement:
CHANGELOG.mdmust include a newly added changelog entry line.- When PR author metadata is available, that same changelog entry line must include
(#<PR>) thanks @<pr-author>.
- Commit scoped changes
Use concise, action-oriented subject lines without PR numbers/thanks. The final merge/squash commit is the only place we include PR numbers and contributor thanks.
Use explicit file list:
scripts/committer "fix: <summary>" <file1> <file2> ...
- Run gates
scripts/pr-prepare gates <PR>
- Push safely to PR head
scripts/pr-prepare push <PR>
This push step includes:
- robust fork remote resolution from owner/name,
- pre-push remote SHA verification,
- one automatic rebase + gate rerun + retry if lease push fails,
- post-push PR-head propagation retry,
- idempotent behavior when local prep HEAD is already on the PR head,
- post-push SHA verification and
.local/prep.envgeneration.
- Verify handoff artifacts
ls -la .local/prep.md .local/prep.env
- Output
- Summarize resolved findings and gate results.
- Print exactly:
PR is ready for /merge-pr.
Guardrails
- Do not run
gh pr mergein this skill. - Do not delete worktree.
More from linuxhsj/openclaw-zero-token
imsg
iMessage/SMS CLI for listing chats, history, and sending messages via Messages.app.
23obsidian
Work with Obsidian vaults (plain Markdown notes) and automate via obsidian-cli.
23coding-agent
Delegate coding tasks to Codex, Claude Code, or Pi agents via background process. Use when: (1) building/creating new features or apps, (2) reviewing PRs (spawn in temp dir), (3) refactoring large codebases, (4) iterative coding that needs file exploration. NOT for: simple one-liner fixes (just edit), reading code (use read tool), thread-bound ACP harness requests in chat (for example spawn/run Codex or Claude Code in a Discord thread; use sessions_spawn with runtime:"acp"), or any work in ~/clawd workspace (never spawn agents here). Claude Code: use --print --permission-mode bypassPermissions (no PTY). Codex/Pi/OpenCode: pty:true required.
22sherpa-onnx-tts
Local text-to-speech via sherpa-onnx (offline, no cloud)
22sonoscli
Control Sonos speakers (discover/status/play/volume/group).
20openai-image-gen
Batch-generate images via OpenAI Images API. Random prompt sampler + `index.html` gallery.
19