Dev & Engineering git-worktreeparallel-developmentslash-commandenvironment-isolationport-managementgit

Git Worktree Parallel Environment Skill

Spin up fully isolated git worktrees — separate ports, databases, and config — so parallel branch environments run side by side without conflicts.

FollowSkills review · FSRS-1.0
Use with care
57/ 100 5-point scale 2.9 / 5
This review was completed under FSRS 1.0. Dimension scores are not converted; it is queued for re-review under FSRS 2.0.
1 2 3 4 5 6
1Utility11 / 20 · 2.8/5

Creates isolated git worktrees (with independent port/database config), explicitly scoped to trigger only when the user explicitly asks for a skill to create one — avoids accidental triggering.

2Reliability11 / 20 · 2.8/5
3Safety18 / 25 · 3.6/5
4Evidence5 / 15 · 1.7/5
5Usability7 / 10 · 3.5/5
6Maintenance5 / 10 · 2.5/5
Evidence confidence:Low Reviewed Jul 17, 2026
Review evidence [1]
See the full review method →

What does this skill do, and when should you use it?

This is one of four skills bundled in the disler/claude-code-hooks-multi-agent-observability repository, located at .claude/skills/create-worktree-skill/. It is a thin wrapper: Claude Code's SlashCommand tool invokes the repo's own /create_worktree_prompt slash command, which creates a git worktree under trees/<branch-name>, assigns non-conflicting ports, writes environment files, installs dependencies, and starts services. The skill deliberately restricts its trigger: it should fire only when the user explicitly asks to use a skill to create a worktree. It depends on the companion slash command and the bun runtime, so it does not work outside the repo's .claude directory.

Extracts a required branch name and an optional port offset from the user's request (stopping to ask if no branch name is given); runs /create_worktree_prompt <branch-name> [port-offset] via the SlashCommand tool; that command creates the git worktree in trees/<branch-name>, auto-increments ports to avoid conflicts, sets up environment files, installs server and client dependencies, and starts both services automatically; then surfaces access URLs, ports in use, and how to stop, restart, or remove the worktree.

  1. A developer wants an isolated environment on the feature-dashboard branch without disturbing the current working tree
  2. A team needs services from feature-a, feature-b, and feature-c running simultaneously for comparison testing
  3. A hotfix on hotfix-security should use a specific port offset (e.g., 5) to avoid port collisions
  4. Multiple branches each need a fully isolated testing environment with independent ports, databases, and configuration
  5. The user explicitly asks to use a skill or slash command to create a worktree

What are this skill's strengths and limitations?

Pros
  • One command handles worktree creation, port allocation, environment config, dependency install, and service startup end to end
  • Ports auto-increment across parallel worktrees, eliminating manual conflict management
  • SKILL.md explicitly constrains trigger conditions, reducing false activations
  • Includes troubleshooting guidance for common failures (port conflicts, branch collisions, missing bun)
Limitations
  • Hard-depends on Claude Code's SlashCommand tool and the repo's /create_worktree_prompt command; unusable outside this .claude directory
  • Implicitly requires bun; no support for other package managers is documented
  • Part of a four-skill bundle whose README mostly covers the observability system; the skill itself lacks standalone docs and test evidence
  • License is not stated in the source, so verify before commercial use

How do you install this skill?

Copy the repo's .claude directory into your project root: cp -R .claude /path/to/your/project/. The skill lives at .claude/skills/create-worktree-skill/ and depends on the /create_worktree_prompt command in the same repo's .claude/commands/, so deploy them together. bun must be installed (used for dependency installation). License is not stated in the source.

How do you use this skill?

In Claude Code, explicitly request the skill, e.g., 'use a skill to create a worktree for feature-auth' (without mentioning skill, it will not trigger). With a port offset: 'invoke the worktree skill on hotfix-security with port offset 5'. Multiple worktrees at once: run it once per branch (feature-a, feature-b, feature-c); ports are staggered automatically (e.g., 4010/5183, 4020/5193, 4030/5203). Troubleshooting: branch already exists as a worktree, ports in use (the command kills them automatically), missing bun dependency, or git worktree errors (handle uncommitted changes first).

How does this skill compare with similar options?

The same author's Claude Code Hooks Mastery project (linked in the README) covers the hook system itself; this skill instead focuses on worktree orchestration within the same Claude Code workflow ecosystem. No other comparators are named in the source.

FAQ

Will it trigger if I don't say 'skill'?
No. SKILL.md explicitly states it should only fire when the user says things like 'use a skill to create a worktree' or 'invoke the worktree skill'.
How are ports assigned?
They are auto-calculated with increments to avoid conflicts; you can also pass an explicit port offset (offset 2 maps to ports 4020/5193). Ports in use are killed automatically by the command.
Can I install it standalone, outside this repo?
Not directly. It depends on the /create_worktree_prompt slash command in the same repo's .claude/commands/, so the whole .claude directory must be deployed to your project root.
What if the command fails?
Common causes: the branch already has a worktree, ports are occupied, bun is not installed, or git worktree reports uncommitted changes. The slash command provides detailed error messages and suggestions.

More skills from this repository

All from disler/claude-code-hooks-multi-agent-observability

Related skills