agents/skills/prune/SKILL.md
Clean up merged and stale git branches, prune old local and remote branches safely. Use for cleaning up old branches or pruning stale remotes.
npx skillsauth add drn/dots pruneInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Delete merged and stale local branches safely, with preview and confirmation.
$ARGUMENTS - Optional: --stale-days <N> to override the 30-day stale threshold, --remote to also delete remote branchesgit branch --show-currentgit remote 2>/dev/null | head -5Resolve 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)Run the preview command, forwarding any --stale-days argument:
bash <script-path> preview [--stale-days N]
Handle the exit code:
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> |
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:
development
Walk every unresolved review thread on a PR, triage each one, reply with a rationale of whether or not the comment will be acted upon, make the code change if warranted, and mark the thread resolved. Use when the user asks to address only the open PR comments without re-running CI, respond to review feedback, resolve review threads, or clear bot comments on a PR.
tools
Iteratively run /rereview, fix the findings, and loop until reviewers approve clean. Use for iterative automated review, when you want /rereview to loop until clean, or for a paranoid pre-merge review that auto-addresses every blocker.
development
Generate self-contained HTML visualizations with Plannotator theming. Use for implementation plans, PR explainers, architecture diagrams, data tables, slide decks, and any visual explanation of technical concepts. Plans and PR explainers follow Plannotator's prescriptive approach; all other visual content delegates to nicobailon/visual-explainer.
development
Create reviewed Codex goal setup packages for long-running /goal work. Use when the user wants to turn an idea, backlog, project mission, or vague objective into durable goal files under a project goals slug folder, with Plannotator review gates for brief, narrative plan with acceptance criteria, verification, blockers, and the final /goal prompt.