From flow
Shows all active worktrees with issue, branch, dirty state, and PR status. Also detects stale branches and suggests cleanup.
How this command is triggered — by the user, by Claude, or both
Slash command
/flow:statusThe summary Claude sees in its command listing — used to decide when to auto-load this command
# Flow: Status of Active Worktrees Show all active worktrees with their issue, branch, dirty state, and PR status. ## Instructions When the user invokes `/flow:status`, perform these steps: ### Step 1: Detect Repository ### Step 2: List Worktrees ### Step 3: For Each Worktree, Gather State For each worktree (skip the main repo entry): ### Step 4: Fetch Issue Titles For each detected issue number: ### Step 5: Output ### Step 6: Detect Stale Branches Check for local branches that may need cleanup: If stale branches or prunable references exist, append to output: ## ...
Show all active worktrees with their issue, branch, dirty state, and PR status.
When the user invokes /flow:status, perform these steps:
REPO=$(basename "$(git rev-parse --show-toplevel)")
git worktree list
For each worktree (skip the main repo entry):
# Get branch name
BRANCH=$(git -C "$WORKTREE_PATH" branch --show-current 2>/dev/null)
# Extract issue number from branch name (issue-N-*)
ISSUE_NUM=$(echo "$BRANCH" | grep -oP 'issue-\K[0-9]+' || echo "")
# Check for uncommitted changes
DIRTY=$(git -C "$WORKTREE_PATH" status --porcelain 2>/dev/null | wc -l)
# Check for unpushed commits
UNPUSHED=$(git -C "$WORKTREE_PATH" rev-list --count origin/main..HEAD 2>/dev/null || echo "0")
# Check PR status (if branch is pushed)
if [[ -n "$BRANCH" ]]; then
PR_INFO=$(gh pr list --head "$BRANCH" --json number,url,state --jq '.[0]' 2>/dev/null || echo "")
fi
For each detected issue number:
ISSUE_TITLE=$(gh issue view "$ISSUE_NUM" --json title --jq '.title' 2>/dev/null || echo "Unknown")
## Flow Status - {repo}
| Worktree | Issue | Branch | Status | PR |
|----------|-------|--------|--------|----|
| .claude/worktrees/issue-42-fix-login | #42 Fix login bug | issue-42-fix-login | 3 dirty files, 2 unpushed | - |
| .claude/worktrees/issue-55-add-tests | #55 Add tests | issue-55-add-tests | Clean | PR #78 (OPEN) |
### Suggestions
- **#42**: Has uncommitted work - commit or stash before switching
- **#55**: PR is open - check for reviews, then `/flow:merge`
Check for local branches that may need cleanup:
# Count local issue-* branches with no active worktree
WORKTREE_BRANCHES=$(git worktree list --porcelain | grep "^branch " | sed 's|branch refs/heads/||')
STALE_COUNT=0
for branch in $(git branch | grep 'issue-' | sed 's/^[ *]*//'); do
echo "$WORKTREE_BRANCHES" | grep -q "^${branch}$" && continue
STALE_COUNT=$((STALE_COUNT + 1))
done
# Check for prunable worktree references
PRUNABLE=$(git worktree list --porcelain | grep -c "prunable" || echo "0")
If stale branches or prunable references exist, append to output:
### Cleanup Available
- {N} local issue branches with no active worktree
- {M} stale worktree references
Run `/flow:cleanup` to remove stale branches and references.
main or non-issue branches are listed but marked as "(not issue-linked)"/flow:start <issue> to begin."npx claudepluginhub cooneycw/claude-power-pack --plugin flow/triageReviews git state across worktrees, stashes, and branches to inventory work in progress.
/prune-worktreeBatch removes git worktrees for completed GitHub issues by checking issue status and branch merge state, then cleans up associated local branches.
/just-ship-statusDisplays local repository state including branches, PRs, board ticket status, and worktrees. Read-only overview with cleanup suggestions for stale branches.
/in-flightShows active branches and PRs in the repository to avoid duplication or conflicts before planning. Supports --all and --mine flags.
/statusDisplays Git Flow status report: branch type (main/develop/feature/etc.), sync status, uncommitted changes, commit history, merge targets, and recommendations.
/statusShows detailed status of one or all git worktrees, including branch, file changes, last commit, and ahead/behind counts relative to main.