Skip to content
Agent Orchestration
Skill

/finishing-a-development-branch

MUST USE when implementation is verified and you need to choose the branch outcome: merge, PR, keep, or discard. Triggers on: "merge this", "create a PR", "squash and merge", "we're done with this branch", "clean up the branch", "push this", "get it merged", after

BOOST
From plugin
superpowers-optimized
14224 skills2 agents6 hooks
Install
$ npx -y skills add REPOZY/superpowers-optimized --skill finishing-a-development-branch --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/finishing-a-development-branch

Context preview

The summary Claude sees to decide when to auto-load this skill.

MUST USE when implementation is verified and you need to choose the branch outcome: merge, PR, keep, or discard. Triggers on: "merge this", "create a PR", "squash and merge", "we're done with this branch", "clean up the branch", "push this", "get it merged", after

SKILL.md

finishing-a-development-branch.SKILL.md
name: finishing-a-development-branch
description: >
  MUST USE when implementation is verified and you need to choose the
  branch outcome: merge, PR, keep, or discard. Triggers on: "merge this",
  "create a PR", "squash and merge", "we're done with this branch",
  "clean up the branch", "push this", "get it merged", after
  verification-before-completion passes. Routed by using-superpowers
  or executing-plans at completion.

Finishing a Development Branch

Close development work with explicit integration choice.

Step 1: Verify

Run full project verification before offering options.

If verification fails, stop and return to implementation.

Step 2: Identify Base Branch

Detect merge base (`main`/`master` or repo default) and confirm if unclear.

Step 3: Offer Exactly Four Options

1. Merge back to `<base-branch>` locally 2. Push branch and open PR 3. Keep branch/worktree as-is 4. Discard branch/worktree

Step 4: Execute Safely

Option 1

  • Checkout base
  • Pull latest
  • Merge feature branch
  • Re-run verification
  • Delete merged branch
  • Remove worktree

Option 2

  • Push feature branch
  • Create PR with a description that includes:
  • **What changed** — one-paragraph summary of the change set
  • **Why** — the motivation or problem this solves (link to plan doc if one exists)
  • **How to verify** — exact commands or steps a reviewer can run to confirm the change works
  • **Notable decisions** — any trade-offs made, alternatives rejected, or non-obvious choices.

If `session-log.md` has `[saved]` entries written during this branch's lifetime, extract the Decisions and Rejected bullets from the most recent entry and include them here. This ensures PR reviewers see the "why" without needing to read the log.

  • Keep worktree by default (remove only if user asks)

Option 3

  • Keep branch and worktree
  • Report exact path and branch name

Option 4

  • Show destructive impact summary
  • Require exact confirmation: `discard`
  • Delete branch and remove worktree

Hard Rules

  • Never merge with failing tests.
  • Never delete work without explicit confirmation.
  • Never force-push unless explicitly requested.

Final Report

Include:

  • Selected option
  • Commands executed
  • Final branch/worktree status
  • PR link (if created)
Read more
Ships withsuperpowers-optimized

The production-grade fork of obra/superpowers — same trusted workflow, dramatically leaner, safer, and more intelligent.

Get the whole plugin

Other skills on superpowers-optimized.