git-cleanup

Remove merged Git branches, stale worktrees, and associated port slots and databases.

2|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/elijahmurray/vandra-dev --skill git-cleanup-elijahmurray
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-cleanup
Source: https://github.com/elijahmurray/vandra-dev/tree/main/skills/git-cleanup
Command: npx skills add https://github.com/elijahmurray/vandra-dev --skill git-cleanup-elijahmurray

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps you maintain a clean and organized Git repository by automating the removal of stale branches, unused worktrees, and associated resources like port slots and databases.

Core Features & Use Cases

  • Branch Cleanup: Removes merged branches to keep your Git history tidy.
  • Worktree Management: Deletes abandoned or completed worktrees.
  • Resource Deallocation: Cleans up port slots and database clones associated with worktrees.
  • Use Case: After completing a feature and merging it, you can use this Skill to automatically remove the feature branch, its corresponding worktree, and any temporary database or port assignments, preventing clutter.

Quick Start

Run the git cleanup command to maintain your repositories.

Frequently Asked Questions about git-cleanup

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

FAQPage Schema
How do I clean up merged Git branches and stale worktrees?

This Skill cleans up merged Git branches, stale worktrees, and associated port slots and databases. It automates repository maintenance by removing obsolete elements like feature branches and temporary database assignments after a merge.

Can Git automatically deallocate port slots and databases when removing worktrees?

Yes, this cleanup process deallocates port slots and database clones associated with worktrees. It ensures that removing a worktree also cleans up its temporary database and port assignments, preventing resource clutter in development environments.

What is the best way to automate repository maintenance after merging a feature?

The best way to automate repository maintenance after a merge is to run a cleanup script. This removes the merged feature branch, its corresponding worktree, and any temporary resources, ensuring a tidy project state without manual intervention.

Do I need any dependencies to automate Git branch cleanup?

No dependencies are required to automate Git branch cleanup. The Skill operates using standalone scripts, allowing you to maintain a tidy project state and remove obsolete elements directly within your development environment.

Why does my development environment have unused port slots and database clones?

Unused port slots and database clones often accumulate from abandoned or completed worktrees. Running a repository maintenance cleanup deallocates these associated resources, preventing clutter and ensuring a tidy project state.