npx skills add ...
npx skills add klausborges/workflow-skills --skill manage-pr
Create and update GitHub pull requests, including stacked PRs and the stack merge loop. Use when the user wants a PR opened or updated, work delivered as a stack, or says "let's get the PRs merged" or "merged #N".
npx skills add klausborges/workflow-skills --skill manage-pr
Titles, style, and remote naming follow the git-conventions skill. PRs live on the repo's primary remote; this skill supports GitHub through gh. An explicit repo convention (PR template, title check, contributing doc) wins over these defaults.
git log <base>..HEAD --oneline, git diff <base>...HEAD --stat, and gh pr view for existing PR state.type(scope): description.--body-file; pass explicit flags so gh never prompts.git push -u <primary> <branch>; repos usually have two remotes, and an unset upstream makes gh prompt).gh pr create --assignee @me --base <base> --title <title> --body-file <file>.Template (omit Notes when empty):
When work spans several PRs, chain branches bottom-up: the first PR bases on the default branch, each later PR bases on the previous branch. Keep every PR independently green and order the stack so it reads as an argument.
On "let's get the PRs merged": map the stack bottom-up, record every branch's current tip, hand back the bottom PR's link, and wait. On each "merged #N" (any merge method, often squash):
git rebase --onto <default> <old-base-tip> <branch>. Then rebase each remaining branch onto its rewritten parent the same way: git rebase --onto <parent> <old-parent-tip> <branch>. Record the new tips.git range-diff <old-base-tip>..<old-tip> <new-base>..<branch> shows only the base change. Push with --force-with-lease only then.gh pr edit <next> --base <default>), reply with its link, and wait for the next "merged #N". Resync this way even when the merge was not a squash. After the last PR, confirm the stack is complete and offer local cleanup (a branch checked out in a worktree needs git worktree remove first).origin does not exist in these repos.The PR URL, or during the merge loop the next PR's link and remaining stack.