From dev-team
Creates PRs, manages merge strategy, and cleans up branches after implementation is complete. Useful for shipping finished work.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dev-team:branch-workflowThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Role: worker. This command performs PR creation, merge, and branch cleanup
Role: worker. This command performs PR creation, merge, and branch cleanup directly via git/gh commands.
The three-phase workflow ends at the Phase 3 human gate. This skill formalizes what happens after approval: PR creation, merge decision, and branch cleanup. Without this, branches linger and merge conflicts accumulate.
Before creating the PR, verify:
/code-review passed or warnings are documentedAfter confirming the base branch, present exactly four choices. If this session entered a worktree via EnterWorktree for this branch, each option's cleanup step is performed with the paired ExitWorktree call below — never raw git worktree remove. If no worktree was entered via EnterWorktree (branch-workflow can also run directly in the primary checkout), the ExitWorktree steps are a no-op — skip them.
ExitWorktree(action="remove")gh pr create. Once the PR is opened, call ExitWorktree(action="keep") so the worktree persists on disk while the session's CWD bookkeeping is closedExitWorktree(action="keep") immediately after the option is confirmed — do not leave the worktree silently "entered" for the rest of the sessionExitWorktree(action="remove", discard_changes=true)Before performing the checkout/merge that Option 1 ("Merge locally") requires, verify the working tree is safe to switch:
git status --short, or the worktree-tool equivalent) covering the feature branch's tree. This surfaces both tracked changes (modified/staged) and untracked files — not just tracked ones.This step applies only to the branch/worktree switch Option 1 performs. It does not replace or duplicate the Pre-PR Checklist's "Branch is rebased on latest main" item (§1) — that is a rebase-currency check performed earlier, not a dirty-tree check performed at the moment of switching. It also does not modify Post-Merge Verification & Cleanup (§5), which handles branch/worktree deletion after the merge, not the switch before it.
| Situation | Strategy | Why |
|---|---|---|
| Single logical change, clean history | Squash merge | One commit tells the story |
| Multiple logical changes that should stay separate | Merge commit | Preserves the history of each change |
| Long-lived branch with many commits | Squash merge | Reduces noise in main history |
| Experimental/spike work | Squash merge | The journey doesn't matter, only the result |
Default: squash merge unless the human specifies otherwise.
EnterWorktree for this branch, call ExitWorktree(action="remove") for options 1 and 4 (never raw git worktree remove); options 2 and 3 use ExitWorktree(action="keep") as described in Section 3. If no worktree was entered via EnterWorktree, this step is a no-op.git worktree list and git branch should show nothing for the deleted branchA merged PR with clean branch history, closed issues, and deleted feature branch.
npx claudepluginhub bdfinst/agentic-dev-team --plugin dev-teamGuides completion of development branches by verifying tests, presenting structured options (merge, PR, keep, discard), and executing the chosen workflow.
Runs verification checks, reviews the diff, picks the integration path (merge, PR, squash, stacked PR), writes the PR/merge message, pushes, and cleans up branches and worktrees.
Verifies tests pass, determines base branch, then guides integration via local git merge, GitHub PR creation, keeping branch, or discard with execution and cleanup.