From go-workflow
Batch removes git worktrees for closed GitHub issues and merged branches. Checks status via gh CLI, reports summary, confirms before pruning and branch deletion.
npx claudepluginhub gopherguides/gopher-ai --plugin go-workflowThis skill uses the workspace's default tool permissions.
Batch cleanup of all git worktrees for issues that are closed and branches that are merged.
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
Batch cleanup of all git worktrees for issues that are closed and branches that are merged.
$prune-worktree
git worktree list | grep "issue-" || echo "No issue worktrees found"
If no issue worktrees found, inform the user and stop.
DEFAULT_BRANCH=$(git remote show origin | grep 'HEAD branch' | sed 's/.*: //')
git fetch origin "$DEFAULT_BRANCH"
For each issue worktree:
Extract the issue number from the path:
ISSUE_NUM=$(echo "$WORKTREE_PATH" | grep -oE 'issue-([0-9]+)' | grep -oE '[0-9]+')
Check if the issue is closed:
STATE=$(gh issue view "$ISSUE_NUM" --json state --jq '.state' 2>/dev/null)
Check if the branch is merged:
BRANCH=$(cd "$WORKTREE_PATH" && git branch --show-current)
MERGED=$(git branch -r --merged "origin/$DEFAULT_BRANCH" | grep -q "origin/$BRANCH" && echo "true" || echo "false")
Classify as:
STATE = CLOSED) AND branch is merged (MERGED = true)Display a summary:
Ask the user to confirm before removing any worktrees.
For each confirmed worktree:
git worktree remove "$WORKTREE_PATH"
git branch -D "$BRANCH" 2>/dev/null || true
git worktree prune
Report what was removed and what remains.