Repository inventory

gotalab/skillport

Skills indexed from this repository, with install-style signals scoped to the repo.
2 skills538 GitHub stars0 weekly installsPythonGitHubOwner profile

Overview

This skill analyzes and safely cleans up local Git branches by categorizing them by merge status, staleness, remote tracking, and worktree association. It provides interactive selection, dry-run previews, and safety guards to prevent accidental deletion of important branches. Use it to safely remove merged or abandoned branches and keep your repository tidy.

How this skill works

The skill collects branch metadata (last commit date, upstream tracking, merged/unmerged status, worktree presence, and ahead/behind info) and classifies branches into categories like Merged (safe), Gone Remote, Stale, Ahead of Upstream, Has Worktree, and Unmerged. It then displays results, prompts the user to choose categories or individual branches to delete, verifies safety rules (protected names, current branch, unpushed commits, worktrees), and executes deletion after confirmation or a dry run when requested.

When to use it

  • Cleaning up local branches after feature merge cycles
  • Removing branches whose remote was deleted
  • Identifying and reviewing stale branches (default 30+ days)
  • Previewing deletions before running destructive commands (--dry-run)
  • Maintaining a clean local repo before onboarding or CI runs

Best practices

  • Always run a dry run first to preview deletions
  • Respect protected branch names (main, master, develop, trunk) and current branch
  • Do not delete branches that are ahead of upstream without reviewing unpushed commits
  • Remove or detach worktrees before deleting associated branches
  • Adjust stale threshold to your team cadence (e.g., 14 days for 2-week sprints)

Example use cases

  • Bulk-delete merged branches while excluding protected and current branches
  • Prune branches whose remotes were removed and clean up their worktrees
  • List oldest branches to find candidates for archival or deletion
  • Run interactive selection to delete only merged + remote-deleted categories
  • Use dry-run mode to generate a safe deletion list for team review

FAQ

Dry run lists branches that would be deleted without running git branch -d/-D. Use flags like --dry-run, preview, or ask to just show results.

What branches are never deleted automatically?

Protected names (main, master, trunk, develop, development) and the currently checked out branch are always excluded. Branches ahead of upstream are also blocked until reviewed.

2 skills

More from this maintainer
Other repositories and skills published under the same GitHub owner.
Skills library
Jump back to the full directory or explore grouped topics.
Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational