bonsai

Community

Safely create and prune git worktrees

Authorepologee
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This skill removes the friction and risk of managing multiple git worktrees by automating creation, environment setup, and safe cleanup so developers do not lose uncommitted or unpushed work.

Core Features & Use Cases

  • Automates creating a new worktree, calculating a deterministic development port, copying local runtime files listed in a project .bonsai file, installing common dependencies, and opening a Claude session in a new iTerm2 pane.
  • Provides a context-aware prune workflow that classifies worktrees, performs safety checks for uncommitted changes and unpushed commits, detects PR integration, and prunes branches only when safe.
  • Use case examples: quickly spawn an isolated worktree for a GitHub issue with a prefilled Claude prompt and assigned port, or run a repository-wide prune to remove merged and clean worktrees while preserving local or active work.

Quick Start

Ask the agent to create a new worktree and start a Claude session by saying: /bonsai new my-branch add a short prompt describing the work so the session starts with context.

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: bonsai
Download link: https://github.com/epologee/leclause-skills/archive/main.zip#bonsai

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.