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. If arth-memory is configured and healthy, a non-blocking “Constraint Advisories” section may be added when the changed files match known org constraints.
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.constraint_check against the changed files and PR summary; any matches render as a non-blocking ## ⚠ Constraint Advisories section in the PR body. Skipped silently (zero overhead) if memory isn’t configured, unhealthy, or returns no matches, this step never fails PR creation.main, branch first.Completion verification, a completion-verifier agent confirms the PR matches the plan/spec (skipped with --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).
With the decisions product on (/arth-setup → decisions), the verifier step first asks the Jev decision layer whether the QA evidence already proves completeness. In enforce mode you may see COMPLETION CHECK: PASS (jev, n=5) (verifier skipped, all five checks cleared) or GAPS FOUND (jev): <statement> (a named gap, verifier skipped, nothing blocked) instead of a verifier spawn; anything in between spawns the verifier exactly as before. In shadow mode (the default after setup) nothing changes: the verifier runs as today and the decision is only logged.
Post-merge workflow, when the merge is detected (a Monitor watcher fires automatically if configured, otherwise tell it “merged”): verifies the issue closed, deletes remote and local branches, checks out main, pulls, and runs /onboard for what’s next.
With the decisions product on, the post-merge step also records the human review decision (approved / changes requested / merged without review) as the outcome of /review-pr’s triage decision, and review comments that arrive while the PR is open are sized first (nit, small local change, design change, question, optional bot finding, or an echo of our own comment) so nothing acts on an echo of its own comment.
| 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 |
Unexpected ## ⚠ Constraint Advisories section in the PR body |
arth-memory is configured (/memory-setup) and constraint_check flagged advisory-only matches for your changed files: review them; this section never blocks the PR |
/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