git-worktree-tidy
OfficialTidy and fast-forward worktree-based Git repos
Authorawfixers-stuff
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill automates routine maintenance for repositories that use a bare repository with multiple linked worktrees by fetching updates, pruning remote-tracking refs, identifying gone-upstream branches, and safely removing stale or orphaned worktrees while preserving uncommitted work.
Core Features & Use Cases
- Fetch and prune: Fetches from origin with pruning and reports deleted remote-tracking refs and updated refs.
- Discover stale branches and worktrees: Detects local branches whose upstream is gone and enumerates worktrees that are clean, dirty, or have prunable metadata.
- Safe deletion and confirmations: Presents a full summary of stale worktrees, branches, and metadata and requires explicit user confirmation before any destructive action; flags dirty worktrees separately.
- Fast-forward important branches: Identifies dedicated worktrees for main, dev, or user-specified branches and attempts pull --ff-only, reporting divergences for user guidance.
- Use Case: Clean up a developer workstation hosting many feature worktrees to reclaim disk space, remove orphaned refs, and fast-forward stable branches.
Quick Start
Run the git-worktree-tidy routine to fetch and prune origin, identify stale worktrees and branches, and prompt me to confirm deletions and fast-forward updates.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: git-worktree-tidy Download link: https://github.com/awfixers-stuff/opencode-config/archive/main.zip#git-worktree-tidy Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.