bengous/claude-code-plugins/git-sweep
Claude Code and agent skill by bengous/claude-code-plugins
- community
Checking that the SKILL.md file is still in the repository.
Clean stale git branches and worktrees interactively. Audits local/remote branches, proves which ones the base already contains (including after a squash or rebase), frees finished worktrees, and confirms before deleting. Use when: "git sweep", "sweep branches", "branch cleanup", "prune stale branches", "clean up agent worktrees".
Install
npx vskill@latest install bengous/claude-code-plugins/git-sweepSKILL.md
The same SKILL.md was published earlier as bengous/claude-code-plugins/git-sweep.
Git Sweep
Route to the correct cleanup phase based on repo state. The phase files audit.md and apply.md live in this skill's base directory.
Inputs
- base: $ARGUMENTS
(optional: the base branch to audit against, e.g. /git-sweep dev; empty lets the backend resolve the trunk: git config sweep.base, then origin/HEAD, then main/master/trunk/dev/develop)
- branch: !
git branch --show-current - repo: !
git rev-parse --show-toplevel - worktrees: !
git worktree list - pending: !
test -f "$(git rev-parse --absolute-git-dir)/git-sweep-manifest.json" && echo "yes" || echo "no" - tools: !
test -x "${CLAUDE_PLUGIN_ROOT}/scripts/git-clean-audit.ts" && test -x "${CLAUDE_PLUGIN_ROOT}/scripts/git-clean-apply.ts" && echo "ok" || echo "missing"
Routing
The audit phase handles all "nothing to clean" detection itself (local branches, remote branches, worktrees). Do not short-circuit here.
Configuration (git config, all optional)
sweep.base— trunk to audit against when no argument is givensweep.protect(multi-valued) — extra branches never proposed for deletionsweep.unprotect(multi-valued) — lift names from the default protected
set (main, master, trunk, dev, develop); the audited base stays protected
sweep.agentPrefix/sweep.backupPrefix— classification prefixes
(defaults worktree-agent-, backup/; they must not overlap)
sweep.maxAgeDays— age bound for the containment test (default 180)
Suggest the right key when a repo needs it (custom trunk name, other branch conventions); never set one without the user asking.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinggit-sweep/skills/git-sweep/SKILL.md
Popularity
- Repository stars
- 6
- Repository forks
- 1
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/bengous/claude-code-plugins/git-sweep)