Installs into .claude/skills of the current project.
Are you the author of Finishing A Development Branch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/skeletorflet-finishing-a-development-branch)
---
name: finishing-a-development-branch
description: Use when implementation is complete, all tests pass, and you need to decide how to integrate the work
---
# Finishing a Development Branch
## Overview
Guide completion of development work by presenting clear options and handling chosen workflow.
**Core principle:** Verify tests → Detect environment → Present options → Execute choice → Clean up.
## The Process
### Step 1: Verify Tests
Run test suite. If tests fail, stop. If pass, continue.
### Step 2: Detect Environment
Determine workspace state (normal repo vs worktree vs detached HEAD).
### Step 3: Determine Base Branch
`git merge-base HEAD main` or ask.
### Step 4: Present Options
1. Merge back to base branch locally
2. Push and create a Pull Request
3. Keep the branch as-is
4. Discard this work
### Step 5: Execute Choice
Merge locally: Checkout base, merge, verify tests, cleanup.
Create PR: Push branch, create PR with gh CLI.
Keep as-is: Report branch name and location.
Discard: Confirm first, then cleanup.
### Step 6: Cleanup Workspace
Only for Options 1 and 4. Remove worktree and prune.
## Red Flags
Never: Proceed with failing tests, delete work without confirmation, force-push without explicit request.