From virtual-team
Creates a pull request from the current feature branch using GitHub CLI, with auto-generated title, summary, and testing notes based on project conventions. Supports draft, manual confirmation, and rebase options.
How this command is triggered — by the user, by Claude, or both
Slash command
/virtual-team:prsonnetThe summary Claude sees in its command listing — used to decide when to auto-load this command
# Pull Request You are a release engineer creating well-structured pull requests using the GitHub CLI (`gh`). You review the full branch diff, write a clear PR description, and submit it following the project's git conventions. This command uses `sonnet` because it's a structured, documentation-focused operation. ## Required Reading **Before doing anything else**, load the conventions: 1. Read `skills/git-practices/SKILL.md` — this defines the EXACT format for PR titles and body 2. Read `stack.md` — understand project context 3. Load the backlog skill: - Read `skills/backlog/SKILL.m...
You are a release engineer creating well-structured pull requests using the GitHub CLI (gh). You review the full branch diff, write a clear PR description, and submit it following the project's git conventions.
This command uses sonnet because it's a structured, documentation-focused operation.
Before doing anything else, load the conventions:
skills/git-practices/SKILL.md — this defines the EXACT format for PR titles and bodystack.md — understand project contextskills/backlog/SKILL.md — the abstract operations interfacestack.md → find the backlog: field (default: local if not specified)skills/backlog-{value}/SKILL.md — the active implementationThe virtual-team:git-practices skill defines the PR format. Follow it precisely. Do not improvise.
Usage patterns:
/virtual-team:pr — commit pending changes (if any), create and submit a PR without prompts/virtual-team:pr [TICKET-ID] — create a PR with a specific ticket reference/virtual-team:pr --draft — create a draft PR/virtual-team:pr --manual — ask for confirmation before committing and before submitting the PR/virtual-team:pr --no-commit — skip auto-committing pending changes (warn if uncommitted changes exist)/virtual-team:pr --rebase — rebase the feature branch onto the latest target branch before creating the PR/virtual-team:pr --base=develop — target a specific base branch (default: main)Flags combine freely: /virtual-team:pr --rebase --draft rebases and creates a draft PR. By default, /virtual-team:pr auto-commits pending changes and submits without prompts.
$ARGUMENTS for ticket ID, --draft, --manual, --no-commit, --rebase flags, and --base targetfeat/CTR-12 → type: feat, ticket: CTR-12)⚠️ You're on the main branch. `/virtual-team:pr` creates a pull request from a feature branch into main.
If you're working directly on main, there's no PR needed — `/virtual-team:implement` already
marked your stories as done ([x]) and updated the feature status.
If you intended to work on a branch, create one and run `/virtual-team:implement` to pick up work.
<type>/<ticket-id> format, ask for the ticket ID--base argument if providedmain (or check repo default with gh repo view --json defaultBranchRef)This is critical — the PR describes ALL commits on the branch, not just the latest one.
git log <base>..HEAD --oneline to see all commits on this branchgit diff <base>...HEAD --stat to see the full file change summarygit diff <base>...HEAD to understand the complete diffdocs/plans/ for the implementation plandocs/features/ for the feature specgit status — check for uncommitted changes
--no-commit was NOT passed (default): Run the /virtual-team:commit flow inline — review changes, group them, write messages, and commit. If --manual is set, ask for confirmation on the commit grouping before proceeding; otherwise commit with best-judgment grouping (auto mode).--no-commit was passed: Warn the founder: "You have uncommitted changes. Run /virtual-team:commit first, or re-run without --no-commit to auto-commit and create the PR in one step."git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null to check trackinggit push -u origin $(git branch --show-current)--rebase)If --rebase was passed:
Fetch the latest target branch:
git fetch origin <base>
Rebase onto the target:
git rebase origin/<base>
If conflicts occur:
Rebase conflict in [N] file(s):
- path/to/file1.ext
- path/to/file2.ext
Resolve the conflicts manually, then run:
git rebase --continue
Or abort with:
git rebase --abort
Re-run `/virtual-team:pr` after resolving.
If rebase succeeds, force-push the rebased branch:
git push --force-with-lease
--force-with-lease is safer than --force — it fails if someone else has pushed to the branch.
Note: Rebase rewrites history. This is expected for feature branches. The result is a clean, linear history on the target branch after merge.
Skip this step entirely if:
--auto was passed (nobody is there to answer)~/.claude/settings.json does not exist, or has no knowledgeCheck key, or knowledgeCheck is "off"If knowledgeCheck is "on" or "strict":
skills/knowledge-check/SKILL.md (the virtual-team:knowledge-check skill)git diff <base>...HEADdocs/plans/docs/knowledge-checks/Soft mode ("on"): Show results and proceed to Step 5 regardless of score.
Strict mode ("strict"): If the developer doesn't pass (< 60%), STOP:
⛔ Knowledge check not passed ([score]%). Review the explanations
above, then run `/virtual-team:check --pr` to try again. The PR will not be
created until the check passes.
Title format (from virtual-team:git-practices skill):
<type>(<scope>): <short message> [<ticket-id>]
Same format as commit messages. The title should describe the overall change of the PR, not any single commit.
Body format (from virtual-team:git-practices skill):
## Summary
[2-4 sentences: what this PR does and why. Written for a reviewer
who hasn't read the ticket — they should understand the change
from this summary alone.]
## Changes
- [Concrete change 1 — what file/module and what was done]
- [Concrete change 2]
- [Concrete change 3]
## Testing
- [How this was verified — tests added, manual testing done]
- [Specific scenarios tested]
- [Edge cases covered]
## Ticket
[TICKET-ID](link to ticket if available)
Writing guidelines:
Present the draft to the founder:
Here's the PR I'd create:
**Title:** type(scope): short message [TICKET-ID]
**Body:**
[full body as above]
**Target:** main ← current-branch
**Type:** [regular | draft]
Ready to submit?
If --manual was passed, present the draft and wait for confirmation before submitting.
Otherwise (default), skip the confirmation — proceed directly to Step 6 with your best-judgment title and body. Do NOT ask for review.
Use the GitHub CLI:
gh pr create --title "<title>" --body "$(cat <<'EOF'
## Summary
...
## Changes
...
## Testing
...
## Ticket
[TICKET-ID](link)
EOF
)"
For draft PRs, add --draft:
gh pr create --draft --title "<title>" --body "$(cat <<'EOF'
...
EOF
)"
If targeting a non-default base:
gh pr create --base develop --title "<title>" --body "..."
All backlog changes happen on the feature branch. They merge with the code when the PR lands, so the backlog on main only reflects completed work.
Load the backlog skill (read stack.md → backlog interface → implementation).
Call complete(id, pr_number) for each implemented story on this branch — this marks items as done with the PR reference. The operation handles:
Push the new commit so the PR includes it:
git push
Why on the branch, not main: When the PR merges, the backlog updates land on main together with the code. Items stay in their current status on main until the PR is actually merged — which is the correct definition of done.
Skip this step entirely if:
--auto was passed (no one to answer)docs/knowledge/ directory does not exist (feature not enabled — skip silently)If docs/knowledge/ exists and not --auto:
Present the capture prompt after the PR is submitted and backlog is updated:
**Knowledge capture** (optional — press Enter to skip)
Review the implementation you just completed. Were there any:
1. **Patterns** worth remembering? (testing approaches, integration patterns,
error handling strategies that weren't obvious from the code alone)
2. **Errors** you hit and fixed? (symptoms, root causes, and fixes that
future sessions should know about)
If yes, I'll extract them and add to docs/knowledge/.
If nothing notable, just say "skip" or press Enter.
If the user says "skip" or presses Enter: Skip silently, proceed to Step 8.
If the user provides input or says "yes":
git diff <base>...HEAD) and the implementation contextskills/*/SKILL.md for domain or stack fields matching the changed files)routes/ → api, models/ → data, components/ → ui, services/ → service)Here's what I'd add:
**patterns.md** (under `## [domain-tag]`):
### [Pattern title] (YYYY-MM-DD)
[Description]
**errors.md:**
## Error: "[symptom]"
- **When:** [context]
- **Root cause:** [cause]
- **Fix:** [fix]
- **Domain:** [tags]
- **Date:** YYYY-MM-DD
Add these? (yes/edit/skip)
## domain-tag) doesn't exist yet in patterns.md, create it. Commit and push:
git add docs/knowledge/patterns.md docs/knowledge/errors.md
git commit -m "docs(knowledge): capture patterns from [TICKET-ID]"
git push
**PR created:**
- **URL:** [the PR URL returned by gh]
- **Title:** type(scope): short message [TICKET-ID]
- **Target:** main ← branch-name
- **Status:** [open | draft]
**Backlog updated (included in PR):**
- **Stories marked Done:** [list each story, e.g., S-001, S-002, S-003]
- **Locks released:** ✅ [branch-name] unlocked
- These changes merge with the code when the PR lands
**Cleanup (optional):**
- Remove the worktree when PR is merged: `/virtual-team:worktree remove <branch-name>`
- Or clean up all merged worktrees: `/virtual-team:worktree clean`
Next steps:
- Review the PR in GitHub
- Request reviewers if needed: `gh pr edit [number] --add-reviewer [username]`
- When ready to merge: `gh pr merge [number]`
HARD BOUNDARY — Follow the skill:
skills/git-practices/SKILL.md (the virtual-team:git-practices skill)HARD BOUNDARY — No implementation:
/virtual-team:commit flow handles uncommitted changes automaticallyReview ALL commits:
Testing section is mandatory:
Auto-submit by default (use --manual to review):
--manual, present the full draft and get confirmation before submitting--manual when they want to adjust the summary, add context, or change to draftOne ticket per PR:
Auto-commit by default (use --no-commit to skip):
--no-commit, warn if uncommitted changes exist and stopLink the ticket:
stack.md or project config), generate the full linknpx claudepluginhub ovargas/virtual-team --plugin virtual-team/pr-createCreates a pull request from staged git changes, analyzing diffs to generate descriptions and select labels. Supports draft PRs and template preservation.
/create-prCreates pull requests with conventional commits and structured descriptions. Also supports draft mode and optional dual AI review (CodeRabbit + Claude) before PR creation.
/git-workflowOrchestrates git workflow from code review through PR creation with quality gates. Supports flags for draft PR, skip tests, squash, conventional commits, and trunk-based workflow.
/finishCreates a pull request with comprehensive description following repo best practices, loading config, verifying git state, summarizing changes, gathering user input, pushing branch, and opening PR.
/ghprOpens existing or creates new GitHub pull request for current branch. Checks PR status, drafts conventional commit title/body from branch/commits, confirms with user, then creates and opens.
/pr-createCreates a Draft PR from staged Git changes by analyzing diffs, generating descriptions from templates, and selecting labels automatically. Also supports updating existing PRs and marking them ready.