stale-worktree-cleanup

Official

Safely clean stale git worktrees and databases.

Authortrycompai
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This skill defines a safe, reversible process to reap both the worktree directories and their dangling PostgreSQL databases created by per-worktree setups, preventing disk usage from accumulating while protecting active work.

Core Features & Use Cases

  • Safe inventory and classification of worktrees (main, safe-to-remove, needs-confirm, keep, and skip) with explicit guidance.
  • Steps to enumerate worktrees, list orphan compdev_* databases, and map relations to their worktrees.
  • End-to-end cleanup with safeguards that remove the worktree and drop its corresponding compdev_* database only after explicit confirmation and safety checks.

Quick Start

From the main worktree, run the cleanup workflow to identify and remove stale worktrees and their compdev_* databases.

Dependency Matrix

Required Modules

None required

Components

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: stale-worktree-cleanup
Download link: https://github.com/trycompai/comp/archive/main.zip#stale-worktree-cleanup

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 510,000+ vetted skills library on demand.