merge-main-cleanup

Installation
SKILL.md

Merge Main Cleanup

Overview

Perform a full merge into main and then delete all other branches locally and on the default remote. Remove any worktrees tied to deleted branches.

When to Use

  • User says to merge into main and keep only main.
  • User wants a one-step cleanup of branches after merge.

Workflow

1) Validate repository state

  • Run git status --porcelain and stop if there are uncommitted changes.
  • Run git rev-parse --show-toplevel and work from that root.
  • Run git fetch --all --prune to sync branch state.

2) Determine base branch

  • Prefer main; if missing, use master.
  • Command: git branch --list main master
Related skills

More from cacr92/wereply

Installs
4
Repository
cacr92/wereply
GitHub Stars
1
First Seen
Mar 10, 2026