/roost:stacked-prsfrom roost
Manages GitHub stacked pull requests with gh stack: branch creation, commits, PRs with "Stacked on" banners, conflict resolution, and stack traversal.
Ships in roost. 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.
This team ships most work as a stack of pull requests managed with gh stack (vcs.stacking: gh-stack in the roost config). Each PR is based on the branch below it, so a mistake in one place shows up in every PR above it. Getting this right quickly matters more than explaining it.
First, load the team config with roost-config. This skill uses vcs, repos and deploy.
With vcs.stacking: none, there are no stacks: every branch starts from main and is its own PR against main ("Without stacking" in roost-config). Skip every gh stack step and "One deploy per stack", and publish a change this way instead, with the rules below, the commit and PR title rules, and the Release order comment as usual:
git switch -c <branch> origin/main # or from the branch it needs, if it needs one
# commit (signed, if required)
git push -u origin <branch>
gh pr create --base main --title "…" --body "…" # add "Waits for #<PR>." when it started from another branch
When the branch it started from merges, rebase it onto main (git rebase --onto origin/main <that branch> <branch>), force-push with lease, and drop the "Waits for" line.
vcs.signed_commits is true. Never pass --no-gpg-sign. If signing fails because it's blocked on the user (vcs.signing_blocker; errors like vcs.signing_errors), stop, say so in one line, and wait. Don't retry in a loop.git add -A, because another session may be editing the same repo.Run these before creating a branch, opening a PR, or saying what's deployed:
git status --short
git log --oneline origin/main..HEAD | head -20 # commits not on main yet
gh stack view --short # this stack's branches and PRs, bottom to top
Code that isn't on main isn't running in staging or production. Don't reason about an environment from a branch.
gh stack checkout <PR number or branch in the stack>
gh stack top # go to the top branch
gh stack add PROJ-1234-short-description
Branch names follow vcs.branch_name, starting with the ticket key. Each fix gets its own branch unless the user says otherwise.
A stack holds the PRs of one deploy only. Merging a stack merges every PR linked into it, so a branch meant for a later deploy must never be linked into an earlier deploy's stack.
gh stack link, read the branch's deploy in the epic's Release order comment (its Deploy column). Link it only into the stack whose PRs share that deploy.> Ships in Deploy <N>. Waits for Deploy <N-1> (#<PRs>) to merge. Later branches of the same deploy stack on it as usual.main, bottom to top: gh stack rebase, or from the top branch git rebase --update-refs --onto origin/main <old base> <top branch>, which moves every branch in it. Push every rewritten branch (force-with-lease), and retarget the bottom PR to main.gh stack view --short) and check every one is in this deploy. If one isn't, unlink it first.vcs.pr_title is conventional, use a Conventional Commit, for example fix(PROJ-1234): ….
The PR title follows vcs.pr_title too, for example feat(PROJ-1234): API keys page on the managed-list pattern. The repos' title checks fail on anything else ("PROJ-1234 backend (1/2): …" fails). With vcs.merge_method: squash, the title becomes the commit message.gh stack push.main:
gh pr create --base <parent branch> --title "…" --body "$(cat <<'EOF'
> [!NOTE]
> Stacked on #<parent PR number>.
## Summary
…
EOF
)"
gh stack link <stack number> <new branch>. Get the stack number from gh stack view. If link asks for the full list, give every PR in the stack, bottom to top.gh stack view --short shows the new branch on top, and the PR's base is the parent branch.If the user says "we're already on a PR", don't open another one: push and update the existing PR's title and description instead (gh pr edit).
Don't write dependency prose into PR descriptions ("the frontend still waits for this branch, because …"). Every PR in a stack ends up with one, and readers miss them. Instead:
run-slice and the tech lead keep it current).depends_on that can't ship until a PR in the repo it depends on is deployed gets one banner line under the "Stacked on" note, linking that comment:
> [!IMPORTANT]
> Ships after <that repo's name> #577 and #578 are deployed. Release order: <link to the epic's comment>.depends_on) carry no dependency note.When deploy.migrations_run_on_deploy is false, staging and production don't run migrations on deploy (deploy.migrations_note), so a migration that only reached the local database is easy to forget. Whenever a branch adds a migration, make sure a deploy note covers it, and add one only if it's missing:
deploy.migration_apply, where $CONN is read from that environment's deployed secret when the step runs (deploy.secret_read, as write-runbook does). Never paste a connection string or password into the tracker, in the sub-task or a comment. The step is done when deploy.migration_verify, with the same context and $CONN, shows them applied, so it checks the environment that was migrated. Create the sub-tasks once; later migrations go into the existing ones.gh can't attach images to a PR. Put screenshots on the story's ticket (see "Attach a file" in the tracker adapter) and add a PR comment that lists them and links the story. Never pass this to the user.
GitHub's own steps, which the user expects followed exactly:
gh stack checkout <PR number>
gh stack rebase
# fix the conflicts, then commit (signed, if required)
gh stack push
gh pr view <number> --json mergeable,mergeStateStatus.When the user asks to "refresh the local gh stack tracking", run gh stack checkout <a PR in the stack>. It pulls the stack's branches and tracking from GitHub. Don't use gh stack sync unless asked: it also rebases and force-pushes every branch.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub beakpoint-insights/roost --plugin roost23 skills in this plugin
/automate-testsAutomate the tests linked to a story or slice. Read each test's scenarios, find which already have automation, write the missing automation at the right layer, run it, and only when every scenario passes mark the test automated. Use when a developer agent is asked to "automate the tests for PROJ-X", "figure out why these tests aren't automated", or to finish the e2e work for a slice./automate-xray-testsThe old name of automate-tests, kept so it still works. Use automate-tests./bug-bashFix a list of bugs from the tracker in this repo, one branch each, test-first, with each fix placed by its parent (on the epic's GitHub stack for a bug in an unreleased epic, or its own PR from main for a standalone bug), moving each ticket through In Progress and Ready for Release. When a fix needs another repo, hand it off with pasteable comments instead of touching it. Use when the user gives a list of bugs to fix, says "bug bash", or pastes a "Big Bug Fix Bash" prompt./build-epicBuild an epic from its tech lead prompt to release QA, through the user's repo sessions (one per repo in the team's roost config). If the stories have no kickoff comments yet, it first sends the epic's tech lead prompt to the lead repo's session, brings the plan to the user for approval, and has the kickoffs posted. Then it runs run-slice for each story in order, slice-handoff between stories, the epic's "before release" work, review-epic, close-out-epic and release-qa. Starts without asking and keeps going on its own; stops only for decisions that are the user's (the plan, each slice's checkpoints, each handoff's sorting table) and for real blockers. Answers "where are we on the epic?" from the tracker, GitHub and its state file. Use when the user says "build PROJ-X", "build the epic", "develop PROJ-X", "start building PROJ-X", "do all the slices", "take this epic to release", or the older "run the epic" and "run the rest of PROJ-X". Run it from a separate orchestrator session, not from inside any of the repos./close-out-epicClose out an epic before it's released, so that its open-ticket count means something. Lists every open ticket under the epic and proposes, for each, fix before release, move to the epic's follow-up epic, or make standalone, then waits for the user's decisions. Moves the deferred tickets out of the epic with a link back, rewrites each one's description so it still makes sense outside the epic, posts one closing comment on the epic saying what was deferred and where it went, and checks the epic has no open tickets left. Run it again after the release ships, to confirm production runs it, check each release workflow and its tracker sync, close any ticket left waiting to ship with the version it shipped in, rewrite the epic's Release order and Close-out comments as shipped, and offer to draft the epic's release notes. Use when the user says "close out PROJ-X", "get PROJ-X ready to release", "move the leftovers out of the epic", "what's still open in this epic", "wrap up the epic" or "the epic shipped", and from build-epic right before release QA./create-xray-testFile Cucumber scenarios you already have into Jira as Xray Test issues, or update the scenarios on an existing Xray Test, through the browser. Only for teams whose tests are Xray (tests.kind xray); with any other kind, tests are filed as that kind's tests adapter says, not with this skill. Sets the parent epic, Components and the link to the story, and checks what was saved. Doesn't write or check scenarios; use live-verified-bdd to write them for a feature that already runs, or shape-epic for a new epic.Other plugins' skills for the same job