prune
БесплатноЗапускает вложенные скриптыНе проверенClean up merged and stale git branches, prune old local and remote branches safely. Use for cleaning up old branches or pruning stale remotes.
от drn★ 23 звезды на GitHubОб этом скилле
Branch Cleanup
Delete merged and stale local branches safely, with preview and confirmation.
Arguments
$ARGUMENTS- Optional:--stale-days <N>to override the 30-day stale threshold,--remoteto also delete remote branches
Context
- Current branch: !
git branch --show-current - Remote: !
git remote 2>/dev/null | head -5
Instructions
Resolve the script path — use the first that exists:
~/.claude/skills/prune/scripts/prune.sh(deployed via symlink)agents/skills/prune/scripts/prune.sh(repo-relative, for development/workspaces)
Step 1: Preview branches
Run the preview command, forwarding any --stale-days argument:
bash <script-path> preview [--stale-days N]
Handle the exit code:
- Exit 0 — Present the output as a formatted table (see format below). Proceed to Step 2.
- Exit 3 — Tell the user: "All branches are current — nothing to prune." and stop.
- Exit 1 — Report the error from stderr.
Format the preview output as:
## Branch Cleanup Preview
### Merged (safe to delete)
| Branch | Last Commit | Merged Into |
|--------|------------|-------------|
| <branch> | <date> | <default> |
### Stale (no commits in N days)
| Branch | Last Commit |
|--------|------------|
| <branch> | <date> |
### Skipped
| Branch | Reason |
|--------|--------|
| <branch> | <reason> |
Step 2: Confirm and delete
Ask the user which branches to delete. Accept "all", specific branch names, or "none".
For confirmed branches, run the delete command:
bash <script-path> delete [--remote] <branch1> [branch2 ...]
Include --remote only if the user passed it in $ARGUMENTS.
Handle the exit code:
- Exit 0 — Show the output block verbatim as your final response.
- Exit 1 — Report the error from stderr.
Установить prune в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Bash(bash ~/.claude/skills/prune/scripts/prune.sh:*)Bash(bash agents/skills/prune/scripts/prune.sh:*)Вложенные файлы
FAQ
Что делает скилл prune?
Clean up merged and stale git branches, prune old local and remote branches safely. Use for cleaning up old branches or pruning stale remotes.
Как установить скилл prune?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл prune запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic