/dev-workflows:pr Optional: 'new' to force a fresh PR, or a note for the PR titlefrom Dev Workflows
Use when you have follow-up changes to get onto a pull request, when updating a PR after main moved on, when a PR has conflicts with its base, or when you are unsure whether to update the current PR or open a new one. Also use after a PR was merged and you have more changes.
Ships in Dev Workflows. 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.
Get the current branch's work onto the right pull request — synced with the base, verified, and pushed — without you having to spell out the steps each time.
Core principle: the branch decides the PR, and the live PR status decides update-vs-new. Never trust session memory about a PR — re-check it every run.
The recurring failure this prevents: an agent assumes "the PR from earlier this session" is still the active one and pushes follow-up work to it. But that PR may already be merged (follow-up work then needs a new PR), and the branch is usually behind main (the push needs a rebase first). /pr always queries the live PR status for the current branch, rebases onto the base, and routes accordingly.
/pr leaves the PR rebased-on-base, verified, and pushed — or it pushes nothing. A bare push that leaves the PR behind base or conflicting is the exact problem this skill exists to end. So:
/pr. Leaving the PR conflicting is the failure, not a shortcut.If someone explicitly asks you to push without syncing/verifying, that's outside this skill — stop and say so, and confirm they want a raw git push instead of /pr. Don't silently downgrade /pr into a bare push.
Don't use for: the very first finish of a fresh feature when you'd rather run the full superpowers:finishing-a-development-branch flow (changelog/cleanup prompts). /pr is the lightweight update/follow-up path; it will still create a PR if the branch has none.
digraph pr_decision {
rankdir=TB;
"Query LIVE PR status for current branch\n(gh pr view --json state,number,url,baseRefName)" [shape=box];
"status?" [shape=diamond];
"OPEN: UPDATE it" [shape=box];
"MERGED / CLOSED: NEW PR" [shape=box];
"NONE: CREATE first PR" [shape=box];
"Query LIVE PR status for current branch\n(gh pr view --json state,number,url,baseRefName)" -> "status?";
"status?" -> "OPEN: UPDATE it" [label="OPEN"];
"status?" -> "MERGED / CLOSED: NEW PR" [label="MERGED/CLOSED"];
"status?" -> "NONE: CREATE first PR" [label="no PR found"];
}
Branching on stale assumptions instead of the live query is the bug. Run the query first, every time.
BRANCH=$(git branch --show-current).BASE = the repo's default branch: git remote show origin | sed -n 's/.*HEAD branch: //p' (fallback main). Most repos: main.git status --porcelain is non-empty, commit it to BRANCH now (a normal scoped commit) — a rebase needs a clean tree. (Stash only if you're unsure where it belongs.)git fetch origin.gh pr view "$BRANCH" --json state,number,url,baseRefName
Non-zero / "no pull requests found" ⇒ status is NONE.OPEN → update this PR (the common case):
git rebase "origin/$BASE"git add <files> and git rebase --continue. Repeat until the rebase finishes.git push --force-with-lease (rebase rewrote history; --force-with-lease is safe, plain --force is not). The open PR updates automatically.BASE, and verify is green.MERGED / CLOSED → open a NEW PR for the follow-up: The branch's PR is done; pushing more commits to it goes nowhere. Put the follow-up on a fresh branch based on the updated base, not on the stale branch:
git checkout -b "<type>/<slug>-followup" "origin/$BASE" (<type> = feature/improve/fix per the change).git cherry-pick <the commits that aren't in BASE> (or, if the follow-up was uncommitted, re-apply/commit it here).git push -u origin HEAD.gh pr create --base "$BASE" --head "$(git branch --show-current)" --title "…" --body "…".NONE → create this branch's first PR:
git push --force-with-lease (or -u origin HEAD if never pushed).gh pr create --base "$BASE" --head "$BRANCH" --title "…" --body "…"; report number + URL./pr new ⇒ force the NEW PR path even if an open PR exists (you deliberately want to split this work out).When this branch's work included a UI change verified by the e2e gate (/feature §7 / /improve §6 invoked e2e-smoke), the PR description must include that evidence: the per-step screenshots (embedded as images/thumbnails, not bare paths) and the Playwright video/report link (the CI artifact URL from the e2e job, or a preserved local capture under e2e-evidence/). When updating an existing PR and newer evidence exists, refresh it. A UI PR should show the working flow. (Pure non-UI changes: a normal summary + test plan is enough.)
| Live PR status | Action | Push |
|---|---|---|
| OPEN | rebase onto base → resolve → verify → push | git push --force-with-lease |
| MERGED / CLOSED | new branch off origin/BASE → cherry-pick follow-up → verify → push → gh pr create | git push -u origin HEAD |
| NONE | rebase → verify → push → gh pr create | --force-with-lease / -u |
Sync is always rebase onto origin/BASE. Push after a rebase is always --force-with-lease. Verify is always before the push, and a red verify always stops the push.
gh pr view this run — you're trusting memory. Query first.git merge origin/main or a merge commit — house style is rebase. Use git rebase "origin/$BASE"./pr prevents. Rebase first.git push --force — use --force-with-lease.origin/BASE — it'll be born behind/conflicting. Branch off the synced base.| Mistake | Reality |
|---|---|
| "The PR from this session is still open, just push" | It may be merged. One gh pr view is cheap; a wrong push is not. Check every run. |
| "Merge is safer than rebase on a shared branch" | This workflow's house style is rebase + --force-with-lease. Don't switch to merge to dodge the force-push. |
| "I'm in a hurry — skip the rebase, just push, deal with main later" | Leaving the PR behind/conflicting is the exact problem /pr ends. The rebase IS the task, not ceremony. If you truly want a raw push, that's not /pr — say so and confirm. |
| "Push now so CI starts, rebase after" | CI on a behind/conflicting branch tests the wrong tree. Rebase + verify first, then one clean push. |
| "Conflicts resolved, ship it" | Run [VERIFY] first. A clean rebase with a broken build is still broken. |
| "PR was merged, I'll branch off the old branch for the follow-up" | That branch is behind base. Branch off origin/BASE so the new PR is current. |
| "force-push to update the rebased branch" | --force-with-lease, not --force — it refuses to clobber commits you haven't seen. |
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub miroo93/dev-workflows --plugin dev-workflows17 skills in this plugin
/analyzeRun a read-only cross-artifact consistency check across spec.md, plan.md, and tasks.md for the current feature, before implementation. Defers to your project's spec tooling (e.g. GitHub Spec-Kit's /speckit-analyze) if installed./checklistGenerate a requirements-quality checklist ("unit tests for the requirements") for the current feature on a chosen dimension like security, ux, or api. Defers to your project's spec tooling (e.g. GitHub Spec-Kit's /speckit-checklist) if installed./e2e-smokeInternal skill invoked by /feature, /improve, /troubleshoot to run a local real-browser smoke check against the running app and return PASS/FAIL/BLOCKED. Not user-invocable.