/lorenzh:landing-parallel-prsfrom lorenzh
Merging a batch of independent pull requests that touch the same file, none built on another's branch. Use when two or more PRs each add to a shared list, index, README table or changelog and must all be merged, when merging one PR made the next one conflict, or when the user asks to merge or ship a batch of parallel PRs.
Ships in lorenzh. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Merge a batch of PRs that edit the same lines one at a time, bringing each next PR up to date just before its merge.
Each merge changes main under the next PR. Update a PR from main right before you merge it, not once for the whole batch.
Each merge needs the user's explicit OK, asked right before that merge with the PR number and head SHA. A merge lands code on main and cannot be taken back cleanly; approval for the batch does not cover a PR whose head changed after the update.
List the PRs and the files each one changes:
gh pr view <n> --json number,title,headRefName,files -q '[.number,.title,.headRefName,([.files[].path]|join(" "))]|@tsv'
Order them: dependencies first, then the user's priority, then oldest first. Files that more than one PR changes are the shared files.
Done when you have the ordered list and the shared files.
For the first PR in the list that is not merged:
git fetch origin
git switch <branch> && git merge origin/<main>
In a shared list, keep both sides of each conflict: main's entries, then this PR's entries, with each change once.
Run the repo's checks using step 3's failure rules. Then push normally. Keep the branch history as it is, with no rebase and no force-push: a force-push rewrites history others may have pulled.
GitHub can report UNKNOWN after a push or a merge to main. Decide that a PR conflicts only when this bounded loop returns CONFLICTING:
for i in $(seq 1 20); do
m=$(gh pr view <n> --json mergeable -q .mergeable)
[ "$m" != UNKNOWN ] && break
sleep 6
done
echo "$m"
CONFLICTING means main moved again: repeat this step. UNKNOWN after the loop is a timeout: report it and stop the batch.
Done when the merge commit is pushed and the loop printed MERGEABLE.
Wait in the background with a deadline, not by checking by hand:
sha=$(gh pr view <n> --json headRefOid -q .headRefOid)
timeout 30m gh pr checks <n> --watch --fail-fast
gh run list --commit "$sha" --json workflowName,status,conclusion,createdAt
Checks count only when their runs belong to $sha and started after the push. A green result from before the update ran on the old main.
If a skill or tool for bounded waits or CI diagnosis is available, use it. Keep an observable end condition and deadline; use the harness background option, record the job ID and log, and inspect actual state if silent. If no available capability can own the wait or diagnosis, name the gap and ask how to proceed.
Before changing the PR, read raw job logs with gh api repos/{owner}/{repo}/actions/jobs/<job-id>/logs. Compare the failure with the diff and the default branch's same workflow. If the default branch fails the same test, report that and leave the PR unchanged. Run the failing test locally 5 times (tunable). For an unrelated failure or a transient timeout/network failure, rerun only failed jobs once with gh run rerun <run-id> --failed. Watch with a deadline; report a second failure with its log. If the unrelated test passes, offer a flaky-test issue instead of changing the PR.
For local test timeouts under machine load, rerun once. Report a second timeout to the user as a timeout, never a pass.
Done when every required check for $sha passed, or the report names the failing check and stops the batch.
Show the user the PR, $sha and the check results, and ask whether to merge. After a yes, merge exactly that commit, with the repo's merge method (--merge, --squash or --rebase):
gh pr merge <n> --merge --match-head-commit "$sha"
--match-head-commit refuses the merge if the head moved after the approval and the checks. If it refuses, go back to step 2: the new head needs its own checks and its own OK.
A merge queue or auto-merge can return before the PR is merged. If the user merges themselves, use the same wait. Use the same bounded background procedure and confirm MERGED before updating the next PR:
timeout 30m bash -c 'until [ "$(gh pr view <n> --json state -q .state)" = MERGED ]; do sleep 30; done'
If the wait times out, report the PR's state and stop the batch. Then go back to step 2 for the next PR.
Done when every PR in the batch is merged, or the report names the PR that waits for the user's OK or is blocked.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
27 skills in this plugin
/checking-before-publishingPrivacy check for anything about to go public. Use when about to post an issue or PR comment, opening a PR, committing, pushing, publishing a release, blog post or README, or sharing screenshots, GIFs, videos or terminal recordings; when relaying a subagent's text to a public place; or when the user asks to "check for private data", "scrub" or "redact" something before sharing./cloning-voices-with-kittenttsVoice cloning with KittenTTS 2 from a short recording and text. Use when users say "kitten tts", "Stimme klonen", "clone my voice", "sprich diesen Text mit meiner Stimme", or "text to speech with my voice" and want a speech WAV.
/competing-implementationsImplementation competition for one task. Use when the user asks to have two agents compete on a change, wants competing implementations, asks to compare implementations and ship the winner, or asks for competing implementations on several dependent issues in waves./creating-worktreesGit worktree setup and cleanup for isolated parallel work. Use when the user asks to "work in a worktree", wants an isolated workspace or a parallel branch checkout, is about to execute an implementation plan that should not touch the current checkout, asks how to install dependencies or copy .env files into a worktree, wants a coding agent or sandbox to work in one, or asks to remove or clean up a worktree, or when worktrees fill the disk (ENOSPC, "No space left on device")./cutting-releasesRelease workflow from version bump to verified install. Use when the user asks to "cut a release", "release x.y.z", "ship a new version" or publish to npm or another registry, or when a release was tagged but the package, the back-merge to main or the installed version still needs checking./directing-videosVideo directing workflow for demos, screencasts, terminal tours, tutorials, launch videos and short films. Use when the user asks to plan, script, storyboard or direct a video, wants a "tour of all features", a demo or launch video, asks how long or how paced a video should be, or asks whether a recorded cut is ready to publish.npx claudepluginhub lorenzh/skills --plugin lorenzh