Skip to main content
skill CX Codex

create-worktree-skill — Claude Code skill for Git worktrees

Creates a separate Git worktree for a chosen branch and prepares its ports and configuration. Use it to run multiple project branches side by side.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add disler/claude-code-hooks-multi-agent-observability --skill create-worktree-skill -a claude-code
Open on GitHub

What create-worktree-skill does

The create-worktree-skill skill sets up a Git worktree under trees/<branch-name>. Each environment has its own ports, database, and configuration, allowing several project instances to run at the same time. Port assignments are calculated automatically, with an optional manual offset.

To build the environment, the skill invokes /create_worktree_prompt <branch-name> [port-offset]. The command prepares environment files, installs server and client dependencies, and starts both services. Its output includes access URLs and instructions for managing the new worktree.

A branch name is required. If you leave it out, the skill asks you to provide one. Dependency installation requires bun. An existing worktree for the same branch or uncommitted Git changes can prevent setup from completing.

What it helps with

  • Create a dedicated worktree for a feature branch
  • Run multiple branches of one project at once
  • Assign separate ports to parallel application instances
  • Prepare an isolated environment for testing a fix
  • Install dependencies and launch the client and server in a new worktree

Example prompts for the agent

  • Create a separate worktree for the feature-dashboard branch.
  • Set up the hotfix-security branch with a port offset of 5.
  • Create separate worktrees for feature-a, feature-b, and feature-c.

How to install create-worktree-skill

1Skills CLI (Vercel)

npx skills add disler/claude-code-hooks-multi-agent-observability --skill create-worktree-skill -a claude-code

2Manually: put the files in place

~/.claude/skills/create-worktree-skill/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/create-worktree-skill/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about create-worktree-skill

How do I install create-worktree-skill in Claude Code?

Run npx skills add disler/claude-code-hooks-multi-agent-observability --skill create-worktree-skill -a claude-code. The skill will be available at ~/.claude/skills/create-worktree-skill/SKILL.md.

What does create-worktree-skill do?

It creates a Git worktree with separate ports, database, and configuration. It also installs the server and client dependencies and starts both services.

What do I need before creating a worktree?

Provide a Git branch name and have bun installed for dependency setup. Uncommitted changes or an existing worktree for that branch can block creation.

Similar skills

All skills for Git and GitHub →

From the same set4

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor