git-cleanup

Solid

Identifies and removes stale git branches, orphaned remote branches, and unused worktrees. Cross-references with Linear (or other integrations) to check issue status before deleting. Use when your repos have accumulated stale branches and you want to tidy up.

Code & Development 4 stars 0 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 83/100

Stars 20%
23
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Git Cleanup Intelligently identify and remove stale branches, orphaned remotes, and unused worktrees — with confirmation at every step. ## Preferences Before starting, use the `Read` tool to read `~/.claude/skills/git-cleanup/preferences.md`. If the file does not exist, treat as "no preferences set". ## Context _On startup, use Bash to detect: working directory, git repos in cwd (directories with `.git`), and current git branch. Skip any that fail._ ## Command routing Check `$ARGUMENTS`: - **`help`** → display help then stop - **`config`** → interactive setup then stop - **`reset`** → delete `~/.claude/skills/git-cleanup/preferences.md`, confirm, stop - **anything else** → parse as natural language or repo path, then run ### Help ``` Git Cleanup — Smart cleanup of stale branches, remotes, and worktrees Usage: /git-cleanup Auto-detect repos, clean everything /git-cleanup ai-assemble Clean a specific repo /git-cleanup just local branches Natural language — local only /git-cleanup dry run Show what would be deleted /git-cleanup skip linear Skip Linear issue checks /git-cleanup ai-assemble remote only Clean only remote branches /git-cleanup config Set preferences /git-cleanup reset Clear preferences /git-cleanup help This help Smart detection: - If inside a git repo, uses that repo ...

Details

Author
mostafa-drz
Repository
mostafa-drz/claude-skills
Created
7 months ago
Last Updated
yesterday
Language
HTML
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category