ck:worktree

Create isolated Git worktrees and branches for parallel feature development.

Updated Apr 9, 2026
One-click install
npx skills add https://github.com/jangtrinh/demo-Lam --skill ck-worktree-jangtrinh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ck:worktree
Source: https://github.com/jangtrinh/demo-Lam/tree/main/.claude/skills/worktree
Command: npx skills add https://github.com/jangtrinh/demo-Lam --skill ck-worktree-jangtrinh

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

It solves the problem of safely working on multiple features in parallel without polluting your main working directory or repeatedly stashing and context-switching.

Core Features & Use Cases

  • Create isolated worktrees for parallel work: Generates a dedicated git worktree directory and a correctly prefixed feature branch for the requested change.
  • Smart repo and branch handling: Detects whether the repo is standalone vs monorepo (via .gitmodules), chooses an appropriate worktree root, selects a base branch (dev/develop/main/master), and prevents creating duplicate branches.
  • Environment template bootstrapping: Copies .env*.example templates into the new worktree (and supports optional legacy .env copying via a safe --env list), so the new branch starts runnable faster.
  • Cleanup utilities: Removes worktrees by name/path with branch deletion when possible, and supports non-destructive dry runs.

Quick Start

Ask your AI to create a new feature worktree by running the worktree tool with the command: "Create a worktree for add authentication using the feat prefix."

Frequently Asked Questions about ck:worktree

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

FAQPage Schema
How do I set up isolated Git worktrees for parallel feature development?

To create isolated Git worktrees for parallel development, this tool runs git worktree add to generate a dedicated directory and a correctly prefixed feature branch, allowing concurrent changes without disrupting your main checkout.

Can I automatically copy .env templates when creating a new Git worktree?

Yes, you can copy .env templates when creating a Git worktree. The tool automatically bootstraps the environment by copying .env*.example files into the new worktree, and supports optional legacy .env copying via a safe --env list parameter.

Does this worktree automation tool support monorepos with multiple project paths?

Yes, this worktree automation tool supports monorepos by detecting .gitmodules, automatically selecting an appropriate worktree root, and detecting monorepo project paths to manage isolated branches across complex repository structures.

What is the best way to manage parallel Git branches without stashing changes?

Using Git worktrees is the best way to manage parallel branches without stashing changes, as each worktree provides an isolated working directory linked to a separate branch, eliminating context-switching and repeated stashing.

How do I safely clean up and remove Git worktrees and their branches?

You can safely clean up and remove Git worktrees by name or path using the removal utility, which executes git worktree remove and attempts branch deletion when possible, while also supporting non-destructive dry runs to preview changes.

Can I preview worktree creation with a dry run before making changes?

Yes, you can preview worktree creation with a dry run. The tool supports non-destructive dry runs that validate inputs and show exactly what worktree and branch actions will occur before any changes are made to your repository.