worktree-status
SolidAudit all git worktrees in the current project. Use when the user asks about worktree status, which branches are merged, which have uncommitted changes, or which worktrees can be safely cleaned up.
Code & Development 27 stars
8 forks Updated today MIT
Install
Quality Score: 83/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# worktree-status
Report the status of every git worktree for the current project, covering
dirty state and merge status.
## When to use
- User asks "which worktrees can I clean up?"
- User asks "what's the status of my worktrees / branches?"
- Before batch-cleaning worktrees, to avoid losing uncommitted work
## Procedure
### 1. Pull latest main (MANDATORY)
You MUST pull latest main before any status checks. Without this, merge
detection (both ancestry and content diff) will produce stale results and
you may mistakenly conclude a branch is not merged.
```bash
cd "$(git rev-parse --show-toplevel)" && git pull origin main
```
### 2. Collect worktree info
```bash
PROJECT_DIR="$(git rev-parse --show-toplevel)"
for wt in $(git worktree list --porcelain | grep "^worktree " | sed 's/^worktree //' | grep -v "$PROJECT_DIR$"); do
branch=$(git -C "$wt" branch --show-current 2>/dev/null)
[ -z "$branch" ] && branch="(detached)"
name=$(basename "$wt")
# dirty?
if [ -z "$(git -C "$wt" status --short 2>/dev/null)" ]; then
dirty="clean"
else
dirty="DIRTY"
fi
# merged into origin/main?
# NOTE: This project uses squash merges exclusively. `git merge-base
# --is-ancestor` does NOT detect squash-merged branches. Always follow
# up with a content diff (step 3) for branches that appear "not merged".
if [ "$branch" != "(detached)" ]; then
if git merge-base --is-ancestor "$branch" origin/main 2>/dev/null; then
merged="merged"
else
merged...
Details
- Author
- Pythoughts-labs
- Repository
- Pythoughts-labs/pythinker-code
- Created
- 4 months ago
- Last Updated
- today
- Language
- TypeScript
- License
- MIT
Similar Skills
Semantically similar based on skill content — not just same category
AI & Automation Featured
git-worktree-status
Check status of background verification tasks running in a git worktree
6,031 Updated yesterday
FlorianBruniaux AI & Automation Featured
git-worktree-clean
Clean up stale git worktrees with merged branch detection and disk usage report
6,031 Updated yesterday
FlorianBruniaux AI & Automation Listed
wt-list
List active worktrees with branch, status, sync state, and staleness info. Use this when the user asks what worktrees exist, wants to see what's in flight, check which branches have worktrees, or asks about stale or forgotten parallel work. Also triggers for `/wt-list [--stale]`.
1 Updated 3 weeks ago
ThinkVelta