Worktree Hygiene — Git skill for Claude Code
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
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 RepositoryRelated Skills
Mise Clean
Sweep the project for hygiene cruft — junk tracked in git, backup/scratch files, stale branches and orphaned w
Branch Cleanup
Clean up merged, stale, and orphaned git branches. Protects main/develop/release/ automatically. Supports --dr
Clean Branches
Safely prune merged and stale Git branches: drop dead remote-tracking refs, list merged candidates for review,
Push All.SKILL
Use when the user explicitly asks to stage all current changes, create a commit, and push to the remote after
Git Contribute Finish
Clean up after your claude-harness pull request merged, by updating master and deleting the feature branch loc
Cleanup Merged
Clean up worktree and local + remote branch for a merged PR
Related Agents
Branch Hygiene
MUST be used whenever the user asks to find stale, merged, or orphaned git branches, or asks to review/clean u
Branch Gardener
Triages local branches and stashes in a managed repo (merged, stale, superseded, unpushed) and proposes deleti
Git Workflow Specialist
Use this agent for git workflow management, branch strategies, commit hygiene, and git worktree operations. Th