Post-Merge Cleanup

Automates Git post-merge cleanup by pruning remote tracking branches and deleting obsolete local branches.

9|1|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/Aureliolo/synthorg --skill post-merge-cleanup-aureliolo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Post-Merge Cleanup
Source: https://github.com/Aureliolo/synthorg/tree/main/.claude/skills/post-merge-cleanup
Command: npx skills add https://github.com/Aureliolo/synthorg --skill post-merge-cleanup-aureliolo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the process of cleaning up local Git branches after a pull request has been merged, ensuring your local repository remains tidy and up-to-date.

Core Features & Use Cases

  • Remote Branch Pruning: Fetches the latest changes and removes local branches that no longer exist on the remote.
  • Safe Branch Deletion: Provides clear steps for safely deleting obsolete local branches, with warnings against accidental bulk deletion.
  • Status Confirmation: Verifies the workspace is clean and reports any remaining non-main branches that should not be deleted.
  • Use Case: After merging a feature branch, run this Skill to automatically remove the now-obsolete local branch and ensure your main branch is up-to-date with the remote.

Quick Start

Run the post-merge cleanup skill to tidy up your local Git repository.

Frequently Asked Questions about Post-Merge Cleanup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I clean up local Git branches after a merge?

Cleaning up local Git branches after a merge involves pruning remote tracking branches and safely deleting obsolete local branches. This ensures repository hygiene by removing merged feature branches while requiring explicit user confirmation before deletion proceeds.

What is the best way to prune remote tracking branches in Git?

Pruning remote tracking branches requires fetching latest changes to remove local references to branches no longer existing on the remote. This updates repository state and prevents stale branch accumulation.

Does Git branch cleanup require explicit user confirmation?

Yes, safe Git branch cleanup requires explicit user confirmation for branch deletion. The process verifies workspace cleanliness, checks for uncommitted changes, and reports any remaining non-main branches that should not be deleted before proceeding.

Why should I avoid bulk deletion of obsolete local branches?

Avoiding bulk deletion of obsolete local branches prevents accidental removal of active feature branches. Safe deletion provides warnings against accidental bulk removal, verifies workspace cleanliness, and reports remaining non-main branches that should be preserved.

When do I need to clean up my local Git repository?

You need to clean up your local Git repository after a pull request has been merged. Running post-merge cleanup removes the now-obsolete local branch and ensures your main branch is synchronized with the remote repository.