workbranch

Automate git worktree creation and isolate feature branches from main.

Updated Jan 13, 2026
One-click install
npx skills add https://github.com/thirteen37/workbranch --skill workbranch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: workbranch
Source: https://github.com/thirteen37/workbranch/tree/main/skills/workbranch
Command: npx skills add https://github.com/thirteen37/workbranch --skill workbranch

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This skill automates and standardizes the git worktree workflow to isolate feature and bugfix development from the main branch, reducing accidental commits and setup friction.

Core Features & Use Cases

  • Automates creation of isolated worktrees for new features or bug fixes.
  • Copies project configuration into the new worktree to preserve environment.
  • Runs post-create hooks (e.g., npm install) after worktree creation.
  • Soft-blocks commits on main/master to encourage using worktrees for development.
  • Cleans up merged worktrees and supports rescue and move workflows for recovering mistakes.

Quick Start

wb new <branch-name> # create a new worktree for the feature/bugfix Navigate to the new worktree directory and begin development.

Frequently Asked Questions about workbranch

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I isolate feature development from the main branch using git worktrees?

Git worktrees isolate feature development by creating separate working directories linked to your repository, preventing accidental commits to main. This skill automates that workflow, copying project configuration and running post-create hooks like npm install to preserve your environment.

How do I move uncommitted changes off my main branch into a new worktree?

Moving uncommitted changes off main requires a rescue or move workflow to transfer in-progress work to an isolated worktree. This skill supports these workflows, allowing you to preserve main while safely relocating your changes to a new feature branch environment.

Can I run post-create hooks like npm install automatically after creating a git worktree?

Yes, you can run post-create hooks like npm install automatically after worktree creation. This skill executes configured hooks immediately upon setting up the isolated worktree, ensuring dependencies are installed and the environment is ready for development.

Do I need ZSH to use git worktrees for feature branch isolation?

Yes, you need a ZSH shell to use this skill's automated worktree management. It requires ZSH to run the wb scripts that handle worktree creation, configuration copying, and post-create hook execution for isolated feature and bugfix development.

What is the best way to prevent accidental commits to main during feature development?

Preventing accidental commits to main is achieved by soft-blocking commits on main or master branches. This skill enforces this behavior while encouraging the use of isolated git worktrees, ensuring feature development happens safely away from the primary branch.

How do I clean up git worktrees after merging a feature branch?

Cleaning up git worktrees after merging is handled by the skill's built-in cleanup functionality. It removes merged worktrees from your system, keeping your workspace organized and preventing leftover directories from accumulating after feature branch integration.