Skip to content
Back to skills

Finishing A Development Branch

ASecurity

5-step branch completion workflow — verify tests, determine base branch, present merge options, execute, and clean up.

  • 7 stars
  • 0 votes
  • 0 copies
  • 7 views
  • Added May 27, 2026
developmentgogit

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add Vimalk0703/shipworthy --skill finishing-a-development-branch --agent claude-code

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.

Security grade badge for Finishing A Development Branch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vimalk0703-finishing-a-development-branch/badge)](https://www.skillsdirectory.com/skills/vimalk0703-finishing-a-development-branch)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: finishing-a-development-branch
description: 5-step branch completion workflow — verify tests, determine base branch, present merge options, execute, and clean up.
invoke_when: Use when finishing a feature branch, merging completed work, or when the user says they are done with a branch.
---

# Finishing a Development Branch

## The 5-Step Completion Workflow

### Step 1: Verify Everything Passes
Before any merge activity:
- Run the full test suite — ALL tests must pass
- Run the build — zero errors
- Run the linter — zero errors
- This is non-negotiable. Do NOT skip to step 2 with failing tests.

### Step 2: Determine the Base Branch
- Check what branch this was branched from
- Usually `main` or `develop`
- Verify the base branch is up to date: `git fetch origin`
- Check for conflicts: `git diff main...HEAD`

### Step 3: Present Options
Tell the user their options:
1. **Merge commit**: `git merge --no-ff` (preserves branch history)
2. **Squash merge**: `git merge --squash` (clean single commit)
3. **Rebase and merge**: `git rebase main` then fast-forward merge
4. **Create PR**: push and create a pull request for review

Recommend based on:
- Single logical change → squash
- Multiple meaningful commits → merge commit
- Needs review → PR

### Step 4: Execute
Carry out the user's chosen strategy. If creating a PR, use `gh pr create` with a clear title and description.

### Step 5: Clean Up
After successful merge:
- Delete the local branch: `git branch -d feature/branch-name`
- Delete the remote branch (if applicable): `git push origin --delete feature/branch-name`
- Remove worktree (if used): `git worktree remove .worktrees/branch-name`
- Verify main is clean: `git checkout main && git pull && npm test`

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.