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.