# worktree-status

worktree-status is a Claude Code command that reports the branch, path, commit hash, and modified-file count for each active git worktree.

- command · `type=command` · Claude Code, Codex, GitHub Copilot, Gemini CLI · ★ 6529 repo stars
- Author: FlorianBruniaux
- License: CC-BY-SA-4.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/FlorianBruniaux/claude-code-ultimate-guide/tree/HEAD/.claude/commands/worktree-status.md
- Updated: 2026-10-22
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/commands/worktree-status

## What it does

This command inspects linked working trees using `git worktree list` and prints a structured summary for each. You see the associated branch, folder path, short commit hash, and whether working files are clean or modified.

A bash script handles the collection under the hood. For non-main branches, it counts commits ahead of main and flags missing directories where worktree folders were removed manually.

Running this command outside a git repository halts execution immediately with an error. The definition runs on the Haiku model by default.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/commands/worktree-status.md` — Call it with /worktree-status. For all projects use ~/.claude/commands/

### Codex

**Manually: put the files in place**
- File: `~/.codex/prompts/worktree-status.md` — Call it with /prompts:worktree-status. Codex marks this format deprecated in favour of skills

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/prompts/worktree-status.prompt.md`

### Gemini CLI

**Manually: put the files in place**
- File: `.gemini/commands/worktree-status.toml` — Gemini stores commands as TOML: the prompt text goes into the prompt field

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/FlorianBruniaux/claude-code-ultimate-guide/tree/HEAD/.claude/commands/worktree-status.md

## When to use it
- Inspect all active git worktrees across the repository
- Spot uncommitted file modifications inside secondary trees
- Check how many commits a branch is ahead of main
- Identify stale worktree records pointing to deleted folders

## Example prompts
- /worktree-status
- /worktree-status feature/pr-9

## Similar
- [git-worktree](https://affpapa.org/en/nevibecode/skills/git-worktree.md) — skill · 111 installs
- [ce-worktree](https://affpapa.org/en/nevibecode/skills/ce-worktree.md) — skill · 3200 installs
- [status](https://affpapa.org/en/nevibecode/commands/carlrannaberg-status.md) — command · ★ 763 repo stars
- [worktree-init](https://affpapa.org/en/nevibecode/commands/worktree-init.md) — command · 94 installs
- [worktree-cleanup](https://affpapa.org/en/nevibecode/commands/worktree-cleanup.md) — command · 89 installs
- [git-worktree-isolation](https://affpapa.org/en/nevibecode/skills/git-worktree-isolation.md) — skill · 2300 installs

From the same set: [florianbruniaux/claude-code-ultimate-guide](https://affpapa.org/en/nevibecode/by/florianbruniaux/claude-code-ultimate-guide.md) — 45 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
