clean-worktrees

Community

Clean swarm agent worktrees and orphaned branches

Authorsmallorbit
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Remove clutter from Git worktrees by deleting all agent worktrees (non-main) and their orphaned local branches that start with worktree-agent-.

Core Features & Use Cases

  • Enumerates current worktrees and identifies those to remove and to prune, based on naming conventions.
  • Deletes non-main worktrees and orphaned branches safely, with safety checks to avoid touching the main repo or active worktrees.
  • Supports post-run cleanup in swarmkit workflows and regular maintenance of local repos.

Quick Start

Run clean-worktrees to automatically remove all non-main agent worktrees and their orphaned branches

Dependency Matrix

Required Modules

gitjq

Components

scripts

💻 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: clean-worktrees
Download link: https://github.com/smallorbit/smallorbit-plugins/archive/main.zip#clean-worktrees

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.