clean-remote-worktrees

Community

Clean remote worktrees after merged PRs.

Authorsmallorbit
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Sweep orphaned remote worktree-* branches left behind by merged PRs, crashes, or merges that skipped the delete operation. This keeps remote refs tidy without altering local state.

Core Features & Use Cases

  • Classifies remote branches by PR state and identifies candidates for deletion without touching local worktrees.
  • Deletes only branches whose most-recent PR is MERGED; skips OPEN, CLOSED-not-merged, and no-PR branches; supports interactive and automated cleanups.
  • Complements swarmkit:clean-worktrees by focusing solely on remote state while leaving local worktrees intact and safe.

Quick Start

Identify stale remote worktree branches with classify.sh and delete the merged ones after confirmation.

Dependency Matrix

Required Modules

gitghjq

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