mschabow

Worktree Hygiene — Git skill for Claude Code

Git community

Report the state of every git branch and worktree in a repo (unpushed, unmerged, stale, merged) and clean up on request.

How to install Worktree Hygiene

Installs to ~/.claude/commands/mschabow-agentic-sdlc-worktree-hygiene.md

Terminal
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/mschabow/agentic-sdlc/HEAD/.claude/commands/worktree-hygiene.md -o ~/.claude/commands/mschabow-agentic-sdlc-worktree-hygiene.md

Restart Claude Code, or start a new session, for it to be picked up.

What Worktree Hygiene does


name: worktree-hygiene version: 1.0.0 description: Report the state of every git branch and worktree in a repo (unpushed, unmerged, stale, merged) and clean up on request. Use when the user asks "did we commit and push", "what branch is this on", "any unpushed work", or wants to prune worktrees or combine branches. changelog:

  • "1.0.0 (2026-10-03): Added to the sdlc-workflow plugin so it ships to every account from one source."

Worktree hygiene

The user runs many agent sessions in

Alternatives in Git

  • Clean Worktrees (Automatic) — Automatically remove all worktrees for branches merged into master 25.5k ★
  • Worktree Deliver — Commit all work, push, and create a pull request from the current worktree 23.4k ★
  • Yeet — Stage, commit, push code, and open a GitHub pull request via CLI 14.6k ★

Full documentation available on GitHub

View Source Repository