gitviewlisted
Install: claude install-skill dbhq-uk/devskills
# gitview - the state of every branch and worktree
One table: worktree, branch, open pull request, ahead, behind, unpushed, and whether the branch is finished.
## Run it
```bash
python3 "$CLAUDE_SKILL_DIR/scripts/gitview.py" [PATH]
```
`PATH` defaults to the current directory. Add `--no-pr` to skip the pull request lookup, which makes it work offline.
Print the table as it comes. Do not re-sort it, re-format it, or drop rows to make it shorter.
## How to read it
**Safe to delete is the column that answers the question.** It is computed by merging the trunk into a throwaway copy of the branch and comparing trees. `YES` means the branch adds nothing to the trunk.
**Ahead is a commit count, not a measure of unlanded work.** A branch merged by squash stays ahead of the trunk forever while contributing nothing. Never tell someone a branch has unlanded work because its ahead number is large. [references/safe-to-delete.md](references/safe-to-delete.md) explains why, and why the two obvious cheaper checks are both wrong.
**Unpushed reading `no remote` is the urgent one.** That work exists on one machine and nothing is backing it up.
**The worktree column is a directory basename, not a branch name.** When the two disagree, say so. A directory named after a branch deleted weeks ago misleads whoever opens it next.
## What to say
Lead with whatever is at risk of being lost, then what is finished, then what is in flight. Unpushed commits and branches with no remote come first,