git-branch-cleanup

🔓Unverified
by gotalab · v1.0.0 · MIT

|

Install on your platform

We auto-selected OpenClaw based on this skill’s supported platforms.

1Run this command in your terminal. The skill is immediately available.
terminal

About This Skill

What it does

This skill automates the process of identifying and deleting stale or merged Git branches. It can filter branches based on whether they have been merged into a specified target branch, and delete those that match the criteria. The skill also allows for dry-run mode to preview changes before actual deletion occurs.

When to use it

  • Clean up after feature development: Regularly remove branches that have already been merged into main or develop.
  • Automate repository maintenance: Schedule periodic runs to keep the branch list manageable, especially in teams with frequent branching and merging.
  • Identify orphaned branches: Find branches that haven't been merged and may be candidates for deletion after investigation.
  • Prepare a repository for archiving: Before archiving a Git repository, remove unnecessary branches to reduce its size.

Key capabilities

  • Filters branches based on merge status with a target branch.
  • Supports dry-run mode for previewing deletions.
  • Allows specification of the target branch for merge comparison.
  • Provides clear output indicating which branches will be deleted (or would be, in dry-run mode).

Example prompts

  • "Clean up all merged branches into main."
  • "Dry run: Show me what branches would be deleted if I cleaned up branches merged into develop."
  • "Delete branches that have been merged into release/1.0 and are older than 6 months."

Tips & gotchas

The skill requires access to a Git repository with appropriate permissions to delete branches. Always run in dry-run mode first to verify the intended branches will be affected before executing the actual deletion.

Tags

🛡️

TrustedSkills Verification

Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.

Security Audits

Gen Agent Trust HubPass
SocketPass
SnykPass

Details

Version
v1.0.0
License
MIT
Author
gotalab
Installs
0

🔓 Unverified

Not yet reviewed. Use with caution.