Run QA, create a GitHub PR, and manage post-merge workflow. Never push directly to main.
/pr [--skip-qa]
Prerequisites: an authenticated platform CLI — GitHub CLI (gh, run gh auth login if needed), GitLab CLI (glab), Azure CLI (az), or Bitbucket API credentials — matching your git remote origin. /pr auto-detects the platform from .git/config.
/pr
What you’ll see: a mode line, a revert-safety check, /qa in commit mode, a commit, a tracking issue found or created, your branch rebased on the default branch and pushed, and a PR URL with Summary / QA Results / Test plan sections. For large PRs (>500 changed lines or >15 files), a one-line tech-debt suggestion is appended. If compliance extensions are enabled, a compliance matrix is added too.
Supports GitHub, GitLab, Bitbucket, and Azure DevOps — platform is auto-detected from .git/config. Examples below show GitHub (gh) commands; GitLab uses glab mr create, Bitbucket uses its REST API, Azure DevOps uses az repos pr create.
/pr # full workflow — QA + commit + push + PR
/pr --skip-qa # QA already ran upstream (/fix, /implement) — quick lint + type sanity check only
| Flag | Values | Default | What it does |
|---|---|---|---|
--skip-qa |
— | off | Skips the full QA gate (used when /fix or /implement already ran QA); runs only a quick lint + type-check sanity pass |
.git/config./tech-debt pass is worth running after merge. Skipped silently otherwise, or if disabled in .claude/tech-debt-config.json./revert-check in advisory mode. If it suspects your working tree accidentally undoes recently-merged PRs, it surfaces the warning and asks whether to proceed (user-confirmation checkpoint).tests/run.sh), runs /precheck first and stops on failure. Skipped for non-toolkit projects./qa in commit mode (or just the quick sanity check with --skip-qa). Failures stop the workflow — no PR is created on a failing QA run..env, credentials, or large binaries) and commits in the project’s detected style. Verifies the branch is complete (type check / lint) before pushing.Closes #N..claude/extensions/.enabled.json lists enabled packs, generates a per-pack evidence report and adds a compliance matrix to the PR body. Skipped entirely (zero overhead) if no extensions are enabled.main — branch first.--skip-qa, since that flag signals QA already ran upstream via /fix or /implement — if you pass it standalone with no prior QA, the verifier is still skipped)./onboard for what’s next.| Agent | Model tier | Role |
|---|---|---|
| completion-verifier | sonnet | PR-vs-plan check (skipped with --skip-qa) |
(The QA gate itself runs via the /qa skill, which spawns its own checkers.)
Branch: <name> marker, auto-closed on mergeCloses #N.claude/knowledge/skills/pr.md| Problem | Fix |
|---|---|
Refuses to run on main |
Create a feature branch first — /pr never pushes to main |
✗ Rebase conflicts against origin/main |
/pr stops rather than auto-resolving. Open the conflicting files, fix the markers, git add them, then git rebase --continue and re-run /pr — or bail out entirely with git rebase --abort |
| QA gate fails and PR is not created | Fix the reported failures (route to /fix if needed) and re-run — /pr won’t ship failing code |
| Revert check flags files you changed on purpose | Confirm at the prompt that the changes are intentional and the workflow continues |
| Post-merge cleanup didn’t run | No merge webhook configured — just say “merged” and the post-merge steps run manually |
Unexpected ## Compliance section in the PR body |
Your project has compliance extensions enabled (.claude/extensions/.enabled.json) — see /extensions status for what’s tracked and why |
/precheck ran when I didn’t ask for it |
Expected on the claude-agents toolkit repo itself — /pr runs it automatically before QA to catch failures locally in ~30s |
/pr runs on toolkit projects/pr --skip-qa automatically