npx skills add ...
npx skills add bitwarden/ai-plugins --skill creating-pull-request
npx skills add bitwarden/ai-plugins --skill creating-pull-request
Open a pull request from a branch in a Bitwarden repository — pick the conventional commit type prefix that drives the t: label, fill in the repo's PR template, choose an ai-review label, and confirm a full submission preview before running gh pr create.
This workflow exists because Bitwarden PRs depend on three signals that are easy to forget and hard to fix after submission:
t: label),Missing any one of these is silent — CI won't reject the PR, and the reviewer just becomes confused. So this workflow surfaces each decision step by step and shows a full submission preview before anything is pushed, so slip-ups are caught while they're cheap to fix.
Follow these steps in order. Each one produces information the next step needs, and the preview in Step 5 depends on all of them.
A PR opened on broken work wastes reviewer time and tends to mask the real problem under a pile of comment threads. Use the AskUserQuestion tool to confirm preflight before continuing:
perform-preflight already run on this branch?"Yes — proceed — continue to Step 2No — run it now — invoke perform-preflight, then continue to Step 2 once it passesSkip preflight — proceed only if the user explicitly opts outThe title must follow this exact format:
The <type>: prefix is what CI scans (lowercased) to assign the t: label. Without it, the PR ships with no type label and triage can't filter it. Read ${CLAUDE_PLUGIN_ROOT}/references/change-type-labels.md to pick the right keyword.
If the Jira ticket key isn't in the branch name or recent conversation, ask the user. Don't leave PM-XXXXX as a placeholder — a real ticket key is required for tracking links to resolve.
Show the proposed title to the user before continuing. This is the first chance for them to catch typos, a missing prefix, or the wrong ticket key.
Always read .github/PULL_REQUEST_TEMPLATE.md from the target repo before drafting the body. Even when you have a body draft in mind, the template's sections are what other reviewers expect to scan. Skipping this is a common failure mode — PRs ship with improvised bodies that miss sections reviewers depend on.
If the template exists:
## 🎟️ Tracking, ## 📔 Objective) — they're load-bearing for reviewer scanning,If no template exists, fall back to:
Use the AskUserQuestion tool to ask:
ai-review, ai-review-vnext, No labelCapture the answer. You'll surface it in Step 5 and pass it on the command line in Step 6.
This is the most important step in this workflow. Before running any git push or gh pr create, show the user a single preview block containing every decision made above. This is the catch-net for failure modes like title typos, missing type prefix, body drifting from the template, or the AI review label getting dropped between Step 4 and submission.
Use this exact format:
Then use the AskUserQuestion tool to confirm:
Submit as shown — proceed to Step 6 with the previewed valuesEdit title or body — apply the requested edit, then redisplay the preview and re-askChange ai-review label — re-run the Step 4 label question, then redisplay the preview and re-askCancel — stop without pushing or creating the PROnly continue to Step 6 when the user selects Submit as shown. The recap is non-negotiable — some failures (title in the merge commit, label-driven automation routing) are painful to undo once the PR is live, so a visible chance to catch issues at submission time pays for itself many times over.
Push the branch and run gh pr create with the confirmed values:
Defaults that hold unless the user said otherwise:
--draft if the user explicitly asked for a ready-for-review PR,--label only if the user picked a label in Step 4 (omit it for "No label"),--label.After gh pr create returns, post the PR URL back to the user.
These are what the Step 5 preview is built to prevent. Recognizing them helps when adjusting the draft mid-workflow:
[PM-12345] Add autofill for passkeys ships with no t: label. Include feat:, fix:, etc.PM-XXXXX left as a placeholder → tracking links won't resolve. Catch in Step 2 or Step 5.If any of these slip past the preview, recovery is awkward — the title is permanent in the merge commit, and labels feed downstream filtering and automation.
git push -u origin <branch-name>
gh pr create --draft \
--title "[PM-XXXXX] <type>: <summary>" \
--body "<body from template>" \
--label "<label>"