bengous/claude-code-plugins/git-sweep

Claude Code and agent skill by bengous/claude-code-plugins

Trust tier 2
  • community
LLM review pending
Source check pending

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-sweep

SKILL.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

if tools == "missing":
STOP — tell user: git-clean-audit and/or git-clean-apply not executable.
Run: chmod +x "${CLAUDE_PLUGIN_ROOT}/scripts/git-clean-audit.ts" "${CLAUDE_PLUGIN_ROOT}/scripts/git-clean-apply.ts"
if pending == "yes":
# A previous run left operations unexecuted (partial failure, or an
# interrupted hand-off). The file holds an already-confirmed selection.
AskUserQuestion:
header: "Manifest"
question: "A pending cleanup manifest exists. Apply it, or re-audit?"
options: "Apply pending manifest (Recommended)"
| "Re-audit (overwrites it)"
if "Apply pending manifest":
Read apply.md and follow it
(do not continue below)
Read audit.md and follow it

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 given
  • sweep.protect (multi-valued) — extra branches never proposed for deletion
  • sweep.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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/bengous/claude-code-plugins/git-sweep/badge)](https://verified-skill.com/skills/bengous/claude-code-plugins/git-sweep)

Something wrong with this skill or its page? Tell us.